-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
177 lines (177 loc) · 6.57 KB
/
.eslintrc.json
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
{
"root": true,
"env": {
"es2020": true,
"node": true,
"browser": true
},
"parserOptions": {
"ecmaVersion": 2023,
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:import/recommended"
],
"plugins": ["import"],
"settings": {
"import/resolver": {
"node": {},
"exports": {}
}
},
"rules": {
"array-bracket-newline": ["error", "consistent"],
"array-bracket-spacing": "error",
"arrow-parens": "error",
"arrow-spacing": "error",
"block-spacing": "error",
"brace-style": "error",
"comma-dangle": "error",
"comma-spacing": "error",
"comma-style": "error",
"curly": "error",
"default-param-last": "error",
"dot-location": ["error", "property"],
"dot-notation": "error",
"eol-last": "error",
"eqeqeq": "error",
"func-call-spacing": "error",
"function-paren-newline": "error",
"generator-star-spacing": ["error", { "before": false, "after": true }],
"implicit-arrow-linebreak": "error",
"indent": ["error", 2, { "ignoreComments": true, "SwitchCase": 1 }],
"key-spacing": "error",
"keyword-spacing": "error",
"linebreak-style": "error",
"max-len": ["warn", { "code": 160, "ignoreStrings": true, "ignoreTemplateLiterals": true, "ignoreRegExpLiterals": true }],
"new-parens": "error",
"no-caller": "error",
"no-case-declarations": "off",
"no-console": "error",
"no-constant-binary-expression": "error",
"no-constructor-return": "error",
"no-duplicate-imports": "error",
"no-empty-static-block": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-extra-parens": ["error", "all", { "nestedBinaryExpressions": false }],
"no-fallthrough": "off",
"no-floating-decimal": "error",
"no-implicit-globals": "error",
"no-invalid-this": "error",
"no-iterator": "error",
"no-loop-func": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": "error",
"no-new-native-nonconstructor": "error",
"no-object-constructor": "error",
"no-promise-executor-return": "error",
"no-proto": "error",
"no-return-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-tabs": "error",
"no-template-curly-in-string": "error",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-unmodified-loop-condition": "error",
"no-unused-private-class-members": "error",
"no-unused-vars": ["error", { "argsIgnorePattern": "_.*" }],
"no-useless-call": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "error",
"no-useless-rename": "error",
"no-whitespace-before-property": "error",
"object-curly-newline": "error",
"object-curly-spacing": ["error", "always"],
"object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
"operator-linebreak": ["error", "before"],
"padded-blocks": ["error", "never"],
"prefer-arrow-callback": "error",
"prefer-const": ["error", { "destructuring": "all" }],
"prefer-numeric-literals": "error",
"prefer-object-has-own": "error",
"prefer-object-spread": "error",
"prefer-promise-reject-errors": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"quotes": ["error", "double", { "allowTemplateLiterals": true }],
"radix": "error",
"rest-spread-spacing": "error",
"semi": "error",
"semi-spacing": "error",
"semi-style": "error",
"space-before-blocks": "error",
"space-before-function-paren": ["error", { "anonymous": "always", "named": "never", "asyncArrow": "always" }],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"strict": "error",
"switch-colon-spacing": "error",
"template-curly-spacing": "error",
"template-tag-spacing": "error",
"unicode-bom": "error",
"wrap-iife": "error",
"yield-star-spacing": "error",
"yoda": "error",
"import/extensions": ["error", "always", { "js": "always", "ignorePackages": true }],
"import/newline-after-import": ["error", { "count": 2 }]
},
"overrides": [
{
"files": ["**/*.ts"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"settings": {
"import/resolver": "typescript"
},
"rules": {
"no-prototype-builtins": ["off"],
"import/extensions": ["error", "always", { "ts": "never" }],
"@typescript-eslint/array-type": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/consistent-type-imports": "error",
"default-param-last": "off",
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/method-signature-style": "error",
"no-duplicate-imports": "off",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
"no-loss-of-precision": "off",
"@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "_.*" }],
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"no-return-await": "off",
"@typescript-eslint/require-await": ["off"],
"@typescript-eslint/return-await": "error"
}
}
]
}