Skip to content

Commit cf03fe5

Browse files
BridgeARcodebytere
authored andcommitted
tools: remove obsolete no-restricted-syntax eslint rules
These rules only apply for the test folder and will already be checked for. PR-URL: #32161 Refs: #32078 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 804982c commit cf03fe5

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

.eslintrc.js

-44
Original file line numberDiff line numberDiff line change
@@ -189,34 +189,6 @@ module.exports = {
189189
// as well to lib/.eslintrc.yaml.
190190
'no-restricted-syntax': [
191191
'error',
192-
{
193-
selector: "CallExpression[callee.property.name='deepStrictEqual'][arguments.2.type='Literal']",
194-
message: 'Do not use a literal for the third argument of assert.deepStrictEqual()',
195-
},
196-
{
197-
selector: "CallExpression[callee.property.name='doesNotThrow']",
198-
message: 'Do not use `assert.doesNotThrow()`. Write the code without the wrapper and add a comment instead.',
199-
},
200-
{
201-
selector: "CallExpression[callee.property.name='doesNotReject']",
202-
message: 'Do not use `assert.doesNotReject()`. Write the code without the wrapper and add a comment instead.',
203-
},
204-
{
205-
selector: "CallExpression[callee.property.name='rejects'][arguments.length<2]",
206-
message: '`assert.rejects()` must be invoked with at least two arguments.',
207-
},
208-
{
209-
selector: "CallExpression[callee.property.name='strictEqual'][arguments.2.type='Literal']",
210-
message: 'Do not use a literal for the third argument of assert.strictEqual()',
211-
},
212-
{
213-
selector: "CallExpression[callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])",
214-
message: 'Use an object as second argument of `assert.throws()`.',
215-
},
216-
{
217-
selector: "CallExpression[callee.property.name='throws'][arguments.length<2]",
218-
message: '`assert.throws()` must be invoked with at least two arguments.',
219-
},
220192
{
221193
selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]",
222194
message: '`setTimeout()` must be invoked with at least two arguments.',
@@ -229,22 +201,6 @@ module.exports = {
229201
selector: 'ThrowStatement > CallExpression[callee.name=/Error$/]',
230202
message: 'Use `new` keyword when throwing an `Error`.',
231203
},
232-
{
233-
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'])",
234-
message: 'The first argument should be the `actual`, not the `expected` value.',
235-
},
236-
{
237-
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'])",
238-
message: 'The first argument should be the `actual`, not the `expected` value.',
239-
},
240-
{
241-
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'])",
242-
message: 'The first argument should be the `actual`, not the `expected` value.',
243-
},
244-
{
245-
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'])",
246-
message: 'The first argument should be the `actual`, not the `expected` value.',
247-
},
248204
{
249205
selector: "CallExpression[callee.name='isNaN']",
250206
message: 'Use Number.isNaN() instead of the global isNaN() function.',

0 commit comments

Comments
 (0)