add linter
This commit is contained in:
parent
28906bfb80
commit
d684ad6045
6 changed files with 1091 additions and 22 deletions
28
.eslintrc.cjs
Normal file
28
.eslintrc.cjs
Normal file
|
@ -0,0 +1,28 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
extends: ['eslint:recommended', 'prettier', 'plugin:unicorn/recommended'],
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 2022
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
es2017: true,
|
||||
node: true
|
||||
},
|
||||
plugins: ['unicorn'],
|
||||
rules: {
|
||||
'no-var': 'error',
|
||||
'prefer-const': 'error',
|
||||
quotes: ['error', 'single', { avoidEscape: true }],
|
||||
'quote-props': ['error', 'as-needed'],
|
||||
'no-constant-condition': ['error', { checkLoops: false }],
|
||||
'no-duplicate-imports': 'error',
|
||||
'no-inner-declarations': 'off',
|
||||
'unicorn/prevent-abbreviations': 'off',
|
||||
'unicorn/prefer-string-replace-all': 'off',
|
||||
'unicorn/numeric-separators-style': 'off',
|
||||
'unicorn/template-indent': 'off',
|
||||
'unicorn/no-nested-ternary': 'off'
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue