Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib,tools,test: remove custom number-isnan rule #31211

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ module.exports = {
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.',
},
],
/* eslint-enable max-len */
'no-return-await': 'error',
Expand Down
2 changes: 2 additions & 0 deletions lib/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ rules:
message: "Please use `require('internal/errors').hideStackFrames()` instead."
- selector: "AssignmentExpression:matches([left.name='prepareStackTrace'], [left.property.name='prepareStackTrace'])"
message: "Use 'overrideStackTrace' from 'lib/internal/errors.js' instead of 'Error.prepareStackTrace'."
- selector: "CallExpression[callee.name='isNaN']"
message: "Use NumberIsNaN() primordial instead of the global isNaN() function."
# Custom rules in tools/eslint-rules
node-core/lowercase-name-for-primitive: error
node-core/non-ascii-character: error
Expand Down
1 change: 0 additions & 1 deletion test/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ rules:
node-core/crypto-check: error
node-core/eslint-check: error
node-core/inspector-check: error
node-core/number-isnan: error
## common module is mandatory in tests
node-core/required-modules:
- error
Expand Down
24 changes: 0 additions & 24 deletions test/parallel/test-eslint-number-isnan.js

This file was deleted.

1 change: 0 additions & 1 deletion test/root.status
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ parallel/test-eslint-eslint-check: SLOW
parallel/test-eslint-inspector-check: SLOW
parallel/test-eslint-lowercase-name-for-primitive: SLOW
parallel/test-eslint-no-unescaped-regexp-dot: SLOW
parallel/test-eslint-number-isnan: SLOW
parallel/test-eslint-prefer-assert-iferror: SLOW
parallel/test-eslint-prefer-assert-methods: SLOW
parallel/test-eslint-prefer-common-mustnotcall: SLOW
Expand Down
14 changes: 0 additions & 14 deletions tools/eslint-rules/number-isnan.js

This file was deleted.