Skip to content

Commit

Permalink
turn off check NaN by default
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Apr 10, 2024
1 parent 619fdf1 commit 0e98670
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion rules/prefer-number-properties.js
Expand Up @@ -80,7 +80,7 @@ const create = context => {
checkNaN,
} = {
checkInfinity: false,
checkNaN: true,
checkNaN: false,
...context.options[0],
};
const {sourceCode} = context;
Expand Down
13 changes: 1 addition & 12 deletions test/prefer-number-properties.mjs
Expand Up @@ -281,18 +281,7 @@ test({
'class Foo { Infinity(){}}',
'const foo = Infinity;',
'const foo = -Infinity;',
{
code: 'const foo = Infinity;',
options: [{checkInfinity: false}],
},
{
code: 'const foo = -Infinity;',
options: [{checkInfinity: false}],
},
{
code: 'const foo = NaN;',
options: [{checkNaN: false}],
},
'const foo = NaN;',
],
invalid: [
{
Expand Down

0 comments on commit 0e98670

Please sign in to comment.