-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
'use strict' | ||
//eslint-disable-next-line no-implicit-globals | ||
const m = 'Use arrow fn instead.' | ||
Check warning Code scanning / ESLint Disallow unused variables Warning
'm' is assigned a value but never used. Allowed unused vars must match /^_$/u.
Check failure Code scanning / ESLint Disallow declarations in the global scope Error
Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.
|
||
|
||
//eslint-disable-next-line no-undef | ||
module.exports = { | ||
Check failure Code scanning / ESLint Disallow the use of undeclared variables unless mentioned in `/*global */` comments Error
'module' is not defined.
|
||
env: { | ||
browser: true, | ||
es2021: true | ||
}, | ||
extends: 'eslint:recommended', | ||
parserOptions: { | ||
ecmaVersion: 'latest' | ||
}, | ||
rules: { | ||
'no-magic-numbers': [ | ||
'warn', | ||
{ | ||
ignore: [ | ||
-1, | ||
0, | ||
1, | ||
2 | ||
], | ||
ignoreArrayIndexes: true, | ||
ignoreDefaultValues: true, | ||
enforceConst: true | ||
} | ||
], | ||
'no-unused-vars': [ | ||
'warn', | ||
{ | ||
varsIgnorePattern: '^_$', | ||
argsIgnorePattern: '^_$' | ||
} | ||
], | ||
'no-param-reassign': 'error', | ||
'no-implicit-globals': [ | ||
'error', | ||
{ | ||
lexicalBindings: true | ||
} | ||
],/* | ||
'no-restricted-syntax': [ | ||
'error', | ||
{ | ||
selector: 'FunctionDeclaration', | ||
message: m | ||
}, | ||
{ | ||
selector: 'FunctionExpression', | ||
message: m | ||
} | ||
],*/ | ||
'no-empty-function': 'error', | ||
'no-loop-func': 'error', | ||
'no-lone-blocks': 'error', | ||
'no-constant-binary-expression': 'error', | ||
'no-self-compare': 'error', | ||
'no-unmodified-loop-condition': 'error', | ||
'no-unreachable-loop': 'error', | ||
'no-extra-label': 'error', | ||
'no-else-return': [ | ||
'error', | ||
{ | ||
'allowElseIf': false | ||
} | ||
], | ||
'require-atomic-updates': 'error', | ||
'no-eval': 'error', | ||
'no-implied-eval': 'error', | ||
'dot-notation': 'error', | ||
'no-array-constructor': 'error', | ||
'max-depth': 'warn', | ||
'max-nested-callbacks': [ | ||
'error', | ||
3 | ||
Check warning Code scanning / ESLint Disallow magic numbers Warning
No magic number: 3.
|
||
], | ||
'max-params': [ | ||
'error', | ||
4 | ||
Check warning Code scanning / ESLint Disallow magic numbers Warning
No magic number: 4.
|
||
], | ||
'indent': [ | ||
'error', | ||
'tab' | ||
], | ||
'linebreak-style': [ | ||
'error', | ||
'unix' | ||
], | ||
'no-template-curly-in-string': 'warn', | ||
'quotes': [ | ||
'error', | ||
'single' | ||
], | ||
'semi': [ | ||
'error', | ||
'never' | ||
] | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2022", | ||
"module": "None", | ||
"checkJs": true, | ||
"strict": true, | ||
"noUncheckedIndexedAccess": true | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |