diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2020-03-09 21:56:04 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2020-05-10 14:00:44 +0200 |
commit | 18584727de5df6bf7332e746b9caee0adb278b98 (patch) | |
tree | 6b79f941e2ddd0cabdadf1773dedb607a9bf7688 /.eslintrc.js | |
parent | 36b2e25b4a20a40ad54046e36c584285d0a24581 (diff) | |
download | ios-node-v8-18584727de5df6bf7332e746b9caee0adb278b98.tar.gz ios-node-v8-18584727de5df6bf7332e746b9caee0adb278b98.tar.bz2 ios-node-v8-18584727de5df6bf7332e746b9caee0adb278b98.zip |
tools: remove obsolete no-restricted-syntax eslint rules
These rules only apply for the test folder and will already be
checked for.
PR-URL: https://github.com/nodejs/node/pull/32161
Refs: https://github.com/nodejs/node/pull/32078
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r-- | .eslintrc.js | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index ba94036b0f..14c53277a1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -190,34 +190,6 @@ module.exports = { 'no-restricted-syntax': [ 'error', { - selector: "CallExpression[callee.property.name='deepStrictEqual'][arguments.2.type='Literal']", - message: 'Do not use a literal for the third argument of assert.deepStrictEqual()', - }, - { - selector: "CallExpression[callee.property.name='doesNotThrow']", - message: 'Do not use `assert.doesNotThrow()`. Write the code without the wrapper and add a comment instead.', - }, - { - selector: "CallExpression[callee.property.name='doesNotReject']", - message: 'Do not use `assert.doesNotReject()`. Write the code without the wrapper and add a comment instead.', - }, - { - selector: "CallExpression[callee.property.name='rejects'][arguments.length<2]", - message: '`assert.rejects()` must be invoked with at least two arguments.', - }, - { - selector: "CallExpression[callee.property.name='strictEqual'][arguments.2.type='Literal']", - message: 'Do not use a literal for the third argument of assert.strictEqual()', - }, - { - selector: "CallExpression[callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])", - message: 'Use an object as second argument of `assert.throws()`.', - }, - { - selector: "CallExpression[callee.property.name='throws'][arguments.length<2]", - message: '`assert.throws()` must be invoked with at least two arguments.', - }, - { selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]", message: '`setTimeout()` must be invoked with at least two arguments.', }, @@ -230,22 +202,6 @@ module.exports = { message: 'Use `new` keyword when throwing an `Error`.', }, { - selector: "CallExpression[callee.property.name='notDeepStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])", - message: 'The first argument should be the `actual`, not the `expected` value.', - }, - { - selector: "CallExpression[callee.property.name='notStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])", - message: 'The first argument should be the `actual`, not the `expected` value.', - }, - { - selector: "CallExpression[callee.property.name='deepStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])", - message: 'The first argument should be the `actual`, not the `expected` value.', - }, - { - selector: "CallExpression[callee.property.name='strictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])", - message: 'The first argument should be the `actual`, not the `expected` value.', - }, - { selector: "CallExpression[callee.name='isNaN']", message: 'Use Number.isNaN() instead of the global isNaN() function.', }, |