Enable the ESLint default-case-last rule, and tweak the existing use-isnan rule

These changes were made possible by ESLint version 7, and neither of these rules required any code changes.

Please find additional details about the ESLint rules at https://eslint.org/docs/rules/default-case-last and https://eslint.org/docs/rules/use-isnan
This commit is contained in:
Jonas Jenwald 2020-05-10 11:33:44 +02:00
parent f8bff283f3
commit 9118cea9f7

View File

@ -65,7 +65,7 @@
"no-unreachable": "error", "no-unreachable": "error",
"no-unsafe-finally": "error", "no-unsafe-finally": "error",
"no-unsafe-negation": "error", "no-unsafe-negation": "error",
"use-isnan": "error", "use-isnan": ["error", { "enforceForIndexOf": true, }],
"valid-typeof": ["error", { "requireStringLiterals": true, }], "valid-typeof": ["error", { "requireStringLiterals": true, }],
// Best Practices // Best Practices
@ -75,6 +75,7 @@
}], }],
"consistent-return": "error", "consistent-return": "error",
"curly": ["error", "all"], "curly": ["error", "all"],
"default-case-last": "error",
"dot-notation": "error", "dot-notation": "error",
"eqeqeq": ["error", "always"], "eqeqeq": ["error", "always"],
"grouped-accessor-pairs": ["error", "getBeforeSet"], "grouped-accessor-pairs": ["error", "getBeforeSet"],