-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
100 lines (100 loc) · 2.55 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/** @type {import('eslint').ESLint.ConfigData} */
module.exports = {
root: true,
env: {
browser: false,
node: true,
es6: true,
es2020: true,
es2021: true,
es2022: true,
},
plugins: [
'@stylistic',
'@typescript-eslint',
],
parser: '@typescript-eslint/parser',
'extends': [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
requireConfigFile: false,
},
settings: {
'import/resolver': {
typescript: true,
node: true,
},
},
rules: {
curly: 2,
'dot-notation': 2,
eqeqeq: 2,
'logical-assignment-operators': 2,
'no-new-func': 2,
'no-new-object': 2,
'no-new-wrappers': 2,
'no-var': 2,
'no-misleading-character-class': 2,
'no-template-curly-in-string': 2,
'no-console': 0,
'no-unused-vars': 0,
'no-redeclare': 1,
'no-unreachable': 1,
'no-inner-declarations': 0,
'no-unneeded-ternary': 2,
'no-else-return': 2,
'no-empty': [2, { allowEmptyCatch: true }],
'no-extra-bind': 2,
'no-labels': 2,
'no-lone-blocks': 2,
'no-loop-func': 2,
'no-magic-numbers': 0,
'no-param-reassign': 2,
'no-shadow': 2,
'no-unused-expressions': 2,
'no-useless-rename': 2,
'no-useless-return': 2,
'no-use-before-define': 2,
'object-shorthand': 2,
'one-var': [2, 'never'],
'prefer-const': 2,
'prefer-arrow-callback': 2,
'prefer-spread': 2,
'prefer-template': 2,
'prefer-rest-params': 2,
'prefer-exponentiation-operator': 2,
'prefer-destructuring': 2,
'require-await': 2,
yoda: 2,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/naming-convention': [
2,
{
selector: ["interface", "typeAlias"],
format: ["PascalCase"],
},
],
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unused-vars': [2, { varsIgnorePattern: '^_' }],
'@stylistic/arrow-parens': 2,
'@stylistic/arrow-spacing': [2, { before: true, after: true }],
'@stylistic/comma-dangle': [1, 'always-multiline'],
'@stylistic/indent': [2, 2, { SwitchCase: 1 }],
'@stylistic/linebreak-style': 0,
'@stylistic/no-floating-decimal': 2,
'@stylistic/no-multi-spaces': 2,
'@stylistic/no-trailing-spaces': 2,
'@stylistic/quote-props': [1, 'as-needed', {
keywords: true,
unnecessary: true,
numbers: false,
}],
'@stylistic/semi': [2, 'always'],
'@stylistic/spaced-comment': 2,
},
};