diff options
Diffstat (limited to '.eslintrc.js')
-rw-r--r-- | .eslintrc.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index 9c3a78d81c..e4192c3539 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -156,6 +156,7 @@ module.exports = { ], /* eslint-disable max-len */ // If this list is modified, please copy the change to lib/.eslintrc.yaml + // and test/.eslintrc.yaml. 'no-restricted-syntax': [ 'error', { @@ -167,6 +168,10 @@ module.exports = { message: 'assert.rejects() must be invoked with at least two arguments.', }, { + selector: "CallExpression[callee.object.name='assert'][callee.property.name='strictEqual'][arguments.2.type='Literal']", + message: 'Do not use a literal for the third argument of assert.strictEqual()' + }, + { selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])", message: 'Use an object as second argument of assert.throws()', }, |