|
38 | 38 | "message": "Use 'Number()' instead of 'parseFloat'."
|
39 | 39 | }
|
40 | 40 | ],
|
41 |
| - "@stylistic/member-delimiter-style": [ |
42 |
| - "off", |
43 |
| - { |
44 |
| - "multiline": { |
45 |
| - "delimiter": "semi", |
46 |
| - "requireLast": true |
47 |
| - }, |
48 |
| - "singleline": { |
49 |
| - "delimiter": "semi", |
50 |
| - "requireLast": false |
51 |
| - } |
52 |
| - } |
53 |
| - ], |
54 |
| - "@stylistic/indent": [ |
55 |
| - "off", |
56 |
| - 4, |
57 |
| - { |
58 |
| - "SwitchCase": 1, |
59 |
| - "VariableDeclarator": 1, |
60 |
| - "outerIIFEBody": 1, |
61 |
| - "MemberExpression": 1, |
62 |
| - "FunctionDeclaration": { |
63 |
| - "parameters": 1, |
64 |
| - "body": 1 |
65 |
| - }, |
66 |
| - "FunctionExpression": { |
67 |
| - "parameters": 1, |
68 |
| - "body": 1 |
69 |
| - }, |
70 |
| - "CallExpression": { |
71 |
| - "arguments": 1 |
72 |
| - }, |
73 |
| - "ArrayExpression": 1, |
74 |
| - "ObjectExpression": 1, |
75 |
| - "ImportDeclaration": 1, |
76 |
| - "flatTernaryExpressions": false, |
77 |
| - "ignoreComments": false |
78 |
| - } |
79 |
| - ], |
| 41 | + |
| 42 | + "@stylistic/member-delimiter-style": ["off"], |
| 43 | + "@stylistic/indent": ["off"], |
| 44 | + "@stylistic/semi": ["error", "always"], |
80 | 45 | "@stylistic/comma-spacing": [
|
81 | 46 | "error",
|
82 | 47 | {
|
83 | 48 | "before": false,
|
84 | 49 | "after": true
|
85 | 50 | }
|
86 | 51 | ],
|
87 |
| - "@typescript-eslint/adjacent-overload-signatures": "error", |
88 |
| - "@typescript-eslint/array-type": [ |
89 |
| - "off", |
| 52 | + "@stylistic/array-bracket-spacing": [ |
| 53 | + "error", |
| 54 | + "always", |
90 | 55 | {
|
91 |
| - "default": "array" |
| 56 | + "objectsInArrays": false |
92 | 57 | }
|
93 | 58 | ],
|
94 |
| - "@typescript-eslint/ban-types": [ |
95 |
| - "off", |
| 59 | + "@stylistic/arrow-parens": ["off", "always"], |
| 60 | + |
| 61 | + "@stylistic/brace-style": [ |
| 62 | + "error", |
| 63 | + "stroustrup", |
96 | 64 | {
|
97 |
| - "types": { |
98 |
| - "Object": false, |
99 |
| - "Function": { |
100 |
| - "message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`." |
101 |
| - }, |
102 |
| - "Boolean": { |
103 |
| - "message": "Avoid using the `Boolean` type. Did you mean `boolean`?" |
104 |
| - }, |
105 |
| - "Number": { |
106 |
| - "message": "Avoid using the `Number` type. Did you mean `number`?" |
107 |
| - }, |
108 |
| - "String": { |
109 |
| - "message": "Avoid using the `String` type. Did you mean `string`?" |
110 |
| - }, |
111 |
| - "Symbol": { |
112 |
| - "message": "Avoid using the `Symbol` type. Did you mean `symbol`?" |
113 |
| - }, |
114 |
| - "{}": false |
115 |
| - } |
| 65 | + "allowSingleLine": true |
116 | 66 | }
|
117 | 67 | ],
|
| 68 | + "@stylistic/space-infix-ops": ["error", { "int32Hint": false }], |
| 69 | + "@stylistic/max-len": [ |
| 70 | + "error", |
| 71 | + { |
| 72 | + "ignoreStrings": true, |
| 73 | + "ignoreTemplateLiterals": true, |
| 74 | + "ignoreRegExpLiterals": true, |
| 75 | + "ignorePattern": "^\\s*[/][/*]\\s*eslint-disable-next-line", |
| 76 | + "code": 120 |
| 77 | + } |
| 78 | + ], |
| 79 | + "@stylistic/new-parens": "error", |
| 80 | + "@typescript-eslint/adjacent-overload-signatures": "error", |
| 81 | + "@typescript-eslint/array-type": "off", |
118 | 82 | "@typescript-eslint/consistent-type-assertions": "off",
|
119 | 83 | "@typescript-eslint/consistent-type-definitions": "off",
|
120 | 84 | "@typescript-eslint/dot-notation": "error",
|
121 | 85 | "@typescript-eslint/explicit-function-return-type": "off",
|
| 86 | + "@typescript-eslint/no-base-to-string": "warn", |
| 87 | + "@typescript-eslint/only-throw-error": "warn", |
| 88 | + "@typescript-eslint/restrict-plus-operands": "warn", |
| 89 | + "@typescript-eslint/restrict-template-expressions": "off", |
| 90 | + "@typescript-eslint/no-unsafe-enum-comparison": "off", |
| 91 | + "@typescript-eslint/no-unsafe-return": "warn", |
| 92 | + "@typescript-eslint/ban-tslint-comment": "warn", |
| 93 | + "@typescript-eslint/require-await": "warn", |
| 94 | + "@typescript-eslint/prefer-promise-reject-errors": "off", |
| 95 | + "@typescript-eslint/no-unnecessary-type-assertion": "warn", |
| 96 | + "@typescript-eslint/no-redundant-type-constituents": "off", |
122 | 97 | "@typescript-eslint/explicit-member-accessibility": [
|
123 | 98 | "error",
|
124 | 99 | {
|
|
138 | 113 | "@typescript-eslint/no-empty-function": "error",
|
139 | 114 | "@typescript-eslint/no-empty-interface": "error",
|
140 | 115 | "@typescript-eslint/no-explicit-any": "off",
|
141 |
| - "@typescript-eslint/no-floating-promises": "error", |
142 | 116 | "@typescript-eslint/no-misused-promises": [
|
143 | 117 | "error",
|
144 | 118 | {
|
145 |
| - "checksVoidReturn": { |
146 |
| - "arguments": false, |
147 |
| - "returns": false, |
148 |
| - "properties": false |
149 |
| - } |
| 119 | + "checksVoidReturn": { |
| 120 | + "arguments": false, |
| 121 | + "returns": false, |
| 122 | + "properties": false |
| 123 | + } |
150 | 124 | }
|
151 |
| - ], |
152 |
| - "@typescript-eslint/no-misused-new": "error", |
153 |
| - "@typescript-eslint/no-namespace": "error", |
| 125 | + ], |
154 | 126 | "@typescript-eslint/no-parameter-properties": "off",
|
155 | 127 | "@typescript-eslint/no-shadow": [
|
156 | 128 | "error",
|
157 | 129 | {
|
158 | 130 | "hoist": "all"
|
159 | 131 | }
|
160 | 132 | ],
|
161 |
| - "no-control-regex": "off", |
162 |
| - "no-unused-vars": "off", |
163 |
| - "@typescript-eslint/no-unused-vars": ["off", |
164 |
| - { |
165 |
| - "args": "none", |
166 |
| - "argsIgnorePattern": "^_", |
167 |
| - "caughtErrors": "none", |
168 |
| - "caughtErrorsIgnorePattern": "^_", |
169 |
| - "destructuredArrayIgnorePattern": "^_", |
170 |
| - "varsIgnorePattern": "^_", |
171 |
| - "ignoreRestSiblings": true |
172 |
| - } |
173 |
| - ], |
174 |
| - "@typescript-eslint/no-unused-expressions": "error", |
175 | 133 | "@typescript-eslint/no-use-before-define": "off",
|
176 | 134 | "@typescript-eslint/no-var-requires": "off",
|
177 | 135 | "@typescript-eslint/prefer-for-of": "off",
|
178 | 136 | "@typescript-eslint/prefer-function-type": "error",
|
179 |
| - "@typescript-eslint/prefer-namespace-keyword": "error", |
180 | 137 | "@typescript-eslint/quotes": "off",
|
181 |
| - "@stylistic/semi": ["error", "always"], |
182 |
| - "@typescript-eslint/triple-slash-reference": [ |
183 |
| - "error", |
184 |
| - { |
185 |
| - "path": "always", |
186 |
| - "types": "prefer-import", |
187 |
| - "lib": "always" |
188 |
| - } |
189 |
| - ], |
| 138 | + "@typescript-eslint/no-unused-vars": "off", |
190 | 139 | "@typescript-eslint/typedef": "off",
|
191 |
| - "@typescript-eslint/unbound-method": "error", |
192 | 140 | "@typescript-eslint/unified-signatures": "error",
|
193 |
| - "@typescript-eslint/no-unsafe-call": "error", |
194 |
| - "@typescript-eslint/no-unsafe-member-access": "error", |
195 |
| - "@typescript-eslint/no-unsafe-argument": "error", |
196 |
| - "@typescript-eslint/no-unsafe-assignment": "error", |
197 |
| - "@typescript-eslint/no-this-alias": "off", |
| 141 | + "@typescript-eslint/no-this-alias": "warn", |
198 | 142 | "@typescript-eslint/prefer-as-const": "off",
|
199 |
| - "no-useless-constructor": "off", |
200 |
| - "@typescript-eslint/no-useless-constructor": "error", |
201 |
| - "@stylistic/array-bracket-spacing": ["error", "always", { "objectsInArrays": false }], |
202 |
| - "@stylistic/arrow-parens": ["off", "always"], |
203 |
| - "@stylistic/brace-style": ["error", "stroustrup", { "allowSingleLine": true }], |
| 143 | + |
| 144 | + "@typescript-eslint/ban-ts-comment": "off", |
204 | 145 | "@stylistic/comma-dangle": "off",
|
205 | 146 | "complexity": "off",
|
206 | 147 | "constructor-super": "error",
|
|
210 | 151 | "id-denylist": "error",
|
211 | 152 | "id-match": "error",
|
212 | 153 | "max-classes-per-file": "off",
|
213 |
| - "@stylistic/max-len": [ |
214 |
| - "error", |
215 |
| - { |
216 |
| - "ignoreStrings": true, |
217 |
| - "ignoreTemplateLiterals": true, |
218 |
| - "ignoreRegExpLiterals": true, |
219 |
| - "code": 120 |
220 |
| - } |
221 |
| - ], |
222 |
| - "@stylistic/new-parens": "error", |
223 | 154 | "no-caller": "error",
|
224 | 155 | "no-cond-assign": "error",
|
225 | 156 | "no-console": "off",
|
226 | 157 | "no-constant-binary-expression": "error",
|
227 |
| - "no-constant-condition": ["error", { "checkLoops": false }], |
| 158 | + |
| 159 | + "no-constant-condition": [ |
| 160 | + "error", |
| 161 | + { |
| 162 | + "checkLoops": false |
| 163 | + } |
| 164 | + ], |
228 | 165 | "no-debugger": "error",
|
229 | 166 | "no-empty": "error",
|
230 | 167 | "no-eval": "error",
|
231 |
| - "no-fallthrough": "off", |
| 168 | + "no-fallthrough": ["error", { "commentPattern": "break[\\s\\w]*omitted" }], |
232 | 169 | "no-invalid-this": "off",
|
233 | 170 | "no-irregular-whitespace": "error",
|
234 | 171 | "no-inner-declarations": "off",
|
235 | 172 | "no-new-object": "error",
|
236 |
| - "no-array-constructor": "error", |
237 | 173 | "no-iterator": "error",
|
238 | 174 | "no-new-wrappers": "error",
|
239 | 175 | "no-shadow": "off",
|
240 | 176 | "no-async-promise-executor": "off",
|
241 |
| - "no-throw-literal": "error", |
242 | 177 | "@stylistic/no-trailing-spaces": "error",
|
243 | 178 | "@stylistic/no-mixed-spaces-and-tabs": "error",
|
244 | 179 | "no-undef-init": "error",
|
245 | 180 | "no-underscore-dangle": "off",
|
246 | 181 | "no-unreachable": "error",
|
247 | 182 | "no-unsafe-finally": "error",
|
248 |
| - "no-unused-expressions": "off", |
249 | 183 | "no-unused-labels": "error",
|
250 |
| - "no-use-before-define": "off", |
251 |
| - "no-var": "off", |
| 184 | + "no-var": "warn", |
252 | 185 | "object-shorthand": "off",
|
253 | 186 | "one-var": ["error", "never"],
|
254 | 187 | "prefer-rest-params": "error",
|
| 188 | + "prefer-const": "off", |
255 | 189 | "quotes": "off",
|
256 | 190 | "no-bitwise": "error",
|
257 | 191 | "radix": "error",
|
258 | 192 | "@stylistic/spaced-comment": [
|
259 |
| - "off", |
| 193 | + "error", |
260 | 194 | "always",
|
261 | 195 | {
|
262 |
| - "markers": ["/"] |
| 196 | + "line": { "exceptions": [], "markers": ["/"] }, |
| 197 | + "block": { "balanced": true, "exceptions": ["*"] } |
263 | 198 | }
|
264 | 199 | ],
|
265 | 200 | "@stylistic/type-generic-spacing": ["error"],
|
266 | 201 | "@stylistic/type-named-tuple-spacing": ["error"],
|
267 | 202 | "use-isnan": "error",
|
268 |
| - "valid-typeof": "off", |
| 203 | + "valid-typeof": "error", |
269 | 204 | "no-restricted-syntax": [
|
270 | 205 | "error",
|
271 | 206 | {
|
|
274 | 209 | },
|
275 | 210 | {
|
276 | 211 | "selector": "CallExpression[callee.property.name='toLocaleString'][arguments.length=0]",
|
277 |
| - "message": "Calls to `toLocaleString()` without arguments are not allowed. Please use 'DEFAULT_LOCALE'." |
| 212 | + "message": "Calls to `toLocaleString()` without arguments are not allowed. Please use `DEFAULT_LOCALE`." |
278 | 213 | },
|
279 | 214 | {
|
280 | 215 | "selector": "MemberExpression[object.type='Literal'][property.name='toLocaleString']",
|
281 |
| - "message": "Calls to `toLocaleString()` without arguments are not allowed. Please use 'DEFAULT_LOCALE'." |
| 216 | + "message": "Calls to `toLocaleString()` without arguments are not allowed. Please use `DEFAULT_LOCALE`." |
282 | 217 | }
|
283 | 218 | ],
|
| 219 | + |
284 | 220 | "no-restricted-properties": [
|
285 | 221 | "error",
|
286 | 222 | {
|
287 | 223 | "object": "url",
|
288 | 224 | "property": "parse",
|
289 | 225 | "message": "Url.parse is insecure and deprecated. Please use `new URL()` instead. https://nodejs.org/api/deprecations.html#DEP0169"
|
290 | 226 | }
|
291 |
| - ] |
| 227 | + ], |
| 228 | + "no-restricted-imports": [ |
| 229 | + "error", |
| 230 | + { |
| 231 | + "paths": [ |
| 232 | + { |
| 233 | + "name": "redis", |
| 234 | + "message": "The 'redis' library is not allowed. Use an alternative if necessary." |
| 235 | + } |
| 236 | + ] |
| 237 | + } |
| 238 | + ], |
| 239 | + "unicorn/prevent-abbreviations": "off", |
| 240 | + "unicorn/switch-case-braces": "off", |
| 241 | + "unicorn/empty-brace-spaces": "off", |
| 242 | + "unicorn/no-negated-condition": "off", |
| 243 | + "unicorn/no-static-only-class": "off", |
| 244 | + "unicorn/no-null": "off", |
| 245 | + "unicorn/catch-error-name": "off", |
| 246 | + "unicorn/no-abusive-eslint-disable": "off", |
| 247 | + "unicorn/template-indent": "off", |
| 248 | + "unicorn/no-await-expression-member": "off", |
| 249 | + "unicorn/no-lonely-if": "off", |
| 250 | + "unicorn/prefer-switch": "off", |
| 251 | + "unicorn/prefer-includes": "off", |
| 252 | + "unicorn/no-nested-ternary": "off", |
| 253 | + "unicorn/no-useless-undefined": "off", |
| 254 | + "unicorn/prefer-type-error": "off", |
| 255 | + "unicorn/no-typeof-undefined": "off", |
| 256 | + "unicorn/prefer-optional-catch-binding": "off", |
| 257 | + "unicorn/prefer-ternary": "off", |
| 258 | + "unicorn/prefer-logical-operator-over-ternary": "off", |
| 259 | + "unicorn/numeric-separators-style": "off", |
| 260 | + "unicorn/prefer-spread": "off", |
| 261 | + "unicorn/prefer-node-protocol": "off", |
| 262 | + "unicorn/prefer-date-now": "off", |
| 263 | + "unicorn/no-array-push-push": "off", |
| 264 | + "unicorn/text-encoding-identifier-case": "off", |
| 265 | + "unicorn/prefer-string-raw": "off", |
| 266 | + "unicorn/no-zero-fractions": "off", |
| 267 | + "unicorn/no-hex-escape": "off", |
| 268 | + "unicorn/number-literal-case": "off", |
| 269 | + "unicorn/no-array-reduce": "off", |
| 270 | + "unicorn/prefer-number-properties": "off", |
| 271 | + "unicorn/import-style": "off", |
| 272 | + "unicorn/prefer-query-selector": "off", |
| 273 | + "unicorn/explicit-length-check": "off", |
| 274 | + "unicorn/prefer-array-some": "off", |
| 275 | + "unicorn/prefer-dom-node-append": "off", |
| 276 | + "unicorn/prefer-dom-node-remove": "off", |
| 277 | + "unicorn/prefer-add-event-listener": "off", |
| 278 | + "unicorn/no-array-for-each": "off", |
| 279 | + "unicorn/no-document-cookie": "off", |
| 280 | + "unicorn/prefer-native-coercion-functions": "off", |
| 281 | + "unicorn/prefer-at": "off", |
| 282 | + "unicorn/consistent-function-scoping": "off", |
| 283 | + "unicorn/no-for-loop": "off", |
| 284 | + "unicorn/prefer-string-replace-all": "off", |
| 285 | + "unicorn/prefer-math-trunc": "off", |
| 286 | + "unicorn/no-object-as-default-parameter": "off", |
| 287 | + "unicorn/prefer-module": "off", |
| 288 | + "security/detect-object-injection": "off", |
| 289 | + "security/detect-non-literal-fs-filename": "off" |
292 | 290 | }
|
293 | 291 | }
|
0 commit comments