Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2020-03-09 23:56:04 +0300
committerShelley Vohr <shelley.vohr@gmail.com>2020-05-11 21:03:50 +0300
commitcf03fe5b67a2ec97cc26950ec0d0d780d178378d (patch)
tree1425f6c57c72a3fde84f8331dce218b8d949e742 /.eslintrc.js
parent804982c1b60f9b4d11f600972301378d67afd06c (diff)
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.js44
1 files changed, 0 insertions, 44 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index ba94036b0f5..14c53277a19 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.',
},