diff options
author | cjihrig <cjihrig@gmail.com> | 2020-01-05 22:49:27 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2020-01-08 00:22:25 -0500 |
commit | ba98d9ab2c7ca03fdd2016818628610c42a04b56 (patch) | |
tree | b78ab02391a69e65e5c64f1f94bc0b2c28ff1d19 /.eslintrc.js | |
parent | a494d127236d09e4413631c33ee95c1324eb8814 (diff) | |
download | ios-node-v8-ba98d9ab2c7ca03fdd2016818628610c42a04b56.tar.gz ios-node-v8-ba98d9ab2c7ca03fdd2016818628610c42a04b56.tar.bz2 ios-node-v8-ba98d9ab2c7ca03fdd2016818628610c42a04b56.zip |
lib,tools,test: remove custom number-isnan rule
This commit removes the custom number-isnan ESLint rule in
favor of the no-restricted-syntax rule. It also applies the
rule across the entire codebase, instead of just the test/
directory.
PR-URL: https://github.com/nodejs/node/pull/31211
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r-- | .eslintrc.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index 8acba223d9..59d585b9d3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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', |