Skip to content

Commit

Permalink
fix: update to latest ESLint 7.x.x
Browse files Browse the repository at this point in the history
- two new rules
- new options for a few rules
- moved one set of tests off of the deprecated CLIEngine class

https://eslint.org/blog/
  • Loading branch information
gurpreetatwal committed Jan 17, 2022
1 parent 1096935 commit 2d1cfb5
Show file tree
Hide file tree
Showing 4 changed files with 378 additions and 265 deletions.
19 changes: 16 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ module.exports = {
'no-unreachable-loop': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': ['error', { enforceForOrderingRelations: true }],
'no-unsafe-optional-chaining': [
'error',
{ disallowArithmeticOperators: true },
],
'no-useless-backreference': 'error',
'use-isnan': 'error',
// https://github.com/eslint/eslint/issues/11899
Expand Down Expand Up @@ -149,7 +153,15 @@ module.exports = {
'no-fallthrough': 'error',
'no-floating-decimal': PRETTIER,
'no-global-assign': 'error',
'no-implicit-coercion': 'error',
'no-implicit-coercion': [
'error',
{
boolean: true,
number: true,
string: true,
disallowTemplateShorthand: true,
},
],
'no-implicit-globals': 'error',
'no-implied-eval': 'error',
'no-invalid-this': 'error',
Expand All @@ -163,6 +175,7 @@ module.exports = {
'no-new': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-nonoctal-decimal-escape': 'error',
'no-octal': 'error',
'no-octal-escape': 'error',
'no-param-reassign': 'off',
Expand All @@ -175,7 +188,7 @@ module.exports = {
'no-script-url': 'error',
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-sequences': ['error', { allowInParentheses: true }],
'no-throw-literal': 'error',
'no-unmodified-loop-condition': 'error',
'no-unused-expressions': 'error',
Expand Down Expand Up @@ -279,7 +292,7 @@ module.exports = {
'no-lonely-if': 'error',
'no-mixed-operators': 'error',
'no-mixed-spaces-and-tabs': PRETTIER,
'no-multi-assign': 'error',
'no-multi-assign': ['error', { ignoreNonDeclaration: false }],
'no-multiple-empty-lines': PRETTIER,
'no-negated-condition': 'off',
'no-nested-ternary': 'error',
Expand Down

0 comments on commit 2d1cfb5

Please sign in to comment.