-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
52 lines (52 loc) · 1.79 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// eslint-disable-next-line no-undef
module.exports = {
'env': {
'browser': true,
'es2021': true,
},
'extends': [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaVersion': 12,
'sourceType': 'module',
},
'plugins': ['@typescript-eslint'],
'rules': {
'object-curly-spacing': ['error', 'always'],
'block-spacing': 'error',
'quotes': ['error', 'single'],
'comma-dangle': ['error', 'only-multiline'],
'no-else-return': 'error',
'prefer-object-spread': 'error',
'arrow-parens': ['error', 'always'],
'prefer-template': ['error'],
'semi': ['error', 'always'],
'no-duplicate-case': 'warn',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'curly': ['warn', 'multi-line'],
'no-sparse-arrays': 'warn',
'no-nested-ternary': 'warn',
'no-case-declarations': 'warn',
'no-prototype-builtins': 'warn',
'no-irregular-whitespace': 'warn',
'@typescript-eslint/ban-ts-comment': 'warn',
'prefer-const': ['warn'],
'max-len': ['error', { 'code': 120 }],
'no-magic-numbers': ['warn', {
'ignoreArrayIndexes': true,
'ignore': [0, 1],
'ignoreDefaultValues': true,
}],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'prefer-rest-params': 'off',
'no-useless-escape': 'off',
},
};