@ethang/eslint-config 16.3.1 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/eslint.config.js +218 -30
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# Opinionated, Strict, Brutal, Unforgiving
|
|
2
2
|
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
3
|
+
* 593 errored rules.
|
|
4
|
+
* 141 rules from vanilla EsLint
|
|
5
|
+
* 112 rules from [sindresorhus/eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
|
|
6
|
+
* 103 rules from [@typescript/eslint](https://github.com/typescript-eslint/typescript-eslint)
|
|
7
|
+
* 75 rules from [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react)
|
|
8
|
+
* 51 rules from [eslint-plugin-astro](https://www.npmjs.com/package/eslint-plugin-astro)
|
|
9
|
+
* 35 rules from [jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
|
|
10
|
+
* 32 rules from [eslint-plugin-sonarjs](https://github.com/SonarSource/eslint-plugin-sonarjs)
|
|
11
|
+
* 21 rules from [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n/tree/67bbfdf3c6862dcbfe455a4afbd83fa60f9d1ea4)
|
|
12
|
+
* 17 rules from [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist)
|
|
13
|
+
* 3 rules from [@tanstack/eslint-plugin-query](https://tanstack.com/query/latest/docs/eslint/eslint-plugin-query)
|
|
14
|
+
* 2 rules from [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks)
|
|
14
15
|
* Includes Prettier built in (do NOT use this with a separate Prettier config.)
|
|
15
|
-
* And more...
|
|
16
16
|
|
|
17
17
|
# Install
|
|
18
18
|
|
package/eslint.config.js
CHANGED
|
@@ -6,11 +6,11 @@ import n from "eslint-plugin-n";
|
|
|
6
6
|
import eslintPluginPrettier from "eslint-plugin-prettier/recommended";
|
|
7
7
|
import react from "eslint-plugin-react";
|
|
8
8
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
9
|
-
import importSort from "eslint-plugin-simple-import-sort";
|
|
10
9
|
import unicorn from "eslint-plugin-unicorn";
|
|
11
10
|
import tseslint from "typescript-eslint";
|
|
12
11
|
import sonar from "eslint-plugin-sonarjs";
|
|
13
12
|
import { rules as tanstackRules } from "@tanstack/eslint-plugin-query";
|
|
13
|
+
import perfectionist from "eslint-plugin-perfectionist";
|
|
14
14
|
|
|
15
15
|
const languageOptions = {
|
|
16
16
|
parser,
|
|
@@ -37,6 +37,7 @@ export default tseslint.config(
|
|
|
37
37
|
"astro/no-deprecated-astro-resolve": "error",
|
|
38
38
|
"astro/no-deprecated-getentrybyslug": "error",
|
|
39
39
|
"astro/no-exports-from-components": "error",
|
|
40
|
+
"astro/no-set-html-directive": "off",
|
|
40
41
|
"astro/no-set-text-directive": "error",
|
|
41
42
|
"astro/no-unused-css-selector": "error",
|
|
42
43
|
"astro/no-unused-define-vars-in-style": "error",
|
|
@@ -45,6 +46,42 @@ export default tseslint.config(
|
|
|
45
46
|
"astro/prefer-split-class-list": "error",
|
|
46
47
|
"astro/semi": "error",
|
|
47
48
|
"astro/valid-compile": "error",
|
|
49
|
+
"astro/jsx-a11y/alt-text": "error",
|
|
50
|
+
"astro/jsx-a11y/anchor-ambiguous-text": "error",
|
|
51
|
+
"astro/jsx-a11y/anchor-has-content": "error",
|
|
52
|
+
"astro/jsx-a11y/anchor-is-valid": "error",
|
|
53
|
+
"astro/jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
|
54
|
+
"astro/jsx-a11y/aria-props": "error",
|
|
55
|
+
"astro/jsx-a11y/aria-proptypes": "error",
|
|
56
|
+
"astro/jsx-a11y/aria-role": "error",
|
|
57
|
+
"astro/jsx-a11y/aria-unsupported-elements": "error",
|
|
58
|
+
"astro/jsx-a11y/autocomplete-valid": "error",
|
|
59
|
+
"astro/jsx-a11y/click-events-have-key-events": "error",
|
|
60
|
+
"astro/jsx-a11y/control-has-associated-label": "error",
|
|
61
|
+
"astro/jsx-a11y/heading-has-content": "error",
|
|
62
|
+
"astro/jsx-a11y/html-has-lang": "error",
|
|
63
|
+
"astro/jsx-a11y/iframe-has-title": "error",
|
|
64
|
+
"astro/jsx-a11y/img-redundant-alt": "error",
|
|
65
|
+
"astro/jsx-a11y/interactive-supports-focus": "error",
|
|
66
|
+
"astro/jsx-a11y/label-has-associated-control": "error",
|
|
67
|
+
"astro/jsx-a11y/lang": "error",
|
|
68
|
+
"astro/jsx-a11y/media-has-caption": "error",
|
|
69
|
+
"astro/jsx-a11y/mouse-events-have-key-events": "error",
|
|
70
|
+
"astro/jsx-a11y/no-access-key": "error",
|
|
71
|
+
"astro/jsx-a11y/no-aria-hidden-on-focusable": "error",
|
|
72
|
+
"astro/jsx-a11y/no-autofocus": "error",
|
|
73
|
+
"astro/jsx-a11y/no-distracting-elements": "error",
|
|
74
|
+
"astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
75
|
+
"astro/jsx-a11y/no-noninteractive-element-interactions": "error",
|
|
76
|
+
"astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
77
|
+
"astro/jsx-a11y/no-noninteractive-tabindex": "error",
|
|
78
|
+
"astro/jsx-a11y/no-redundant-roles": "error",
|
|
79
|
+
"astro/jsx-a11y/no-static-element-interactions": "error",
|
|
80
|
+
"astro/jsx-a11y/prefer-tag-over-role": "error",
|
|
81
|
+
"astro/jsx-a11y/role-has-required-aria-props": "error",
|
|
82
|
+
"astro/jsx-a11y/role-supports-aria-props": "error",
|
|
83
|
+
"astro/jsx-a11y/scope": "error",
|
|
84
|
+
"astro/jsx-a11y/tabindex-no-positive": "error",
|
|
48
85
|
},
|
|
49
86
|
},
|
|
50
87
|
{
|
|
@@ -63,6 +100,10 @@ export default tseslint.config(
|
|
|
63
100
|
"react/destructuring-assignment": "error",
|
|
64
101
|
"react/display-name": "error",
|
|
65
102
|
"react/forbid-component-props": "error",
|
|
103
|
+
"react/forbid-dom-props": "off",
|
|
104
|
+
"react/forbid-elements": "off",
|
|
105
|
+
"react/forbid-foreign-prop-types": "off",
|
|
106
|
+
"react/forbid-prop-types": "off",
|
|
66
107
|
"react/function-component-definition": "error",
|
|
67
108
|
"react/hook-use-state": "error",
|
|
68
109
|
"react/iframe-missing-sandbox": "error",
|
|
@@ -81,11 +122,15 @@ export default tseslint.config(
|
|
|
81
122
|
"react/jsx-no-constructed-context-values": "error",
|
|
82
123
|
"react/jsx-no-duplicate-props": "error",
|
|
83
124
|
"react/jsx-no-leaked-render": "error",
|
|
125
|
+
"react/jsx-no-literals": "off",
|
|
84
126
|
"react/jsx-no-script-url": "error",
|
|
85
127
|
"react/jsx-no-target-blank": "error",
|
|
86
128
|
"react/jsx-no-undef": "error",
|
|
87
129
|
"react/jsx-no-useless-fragment": "error",
|
|
88
130
|
"react/jsx-pascal-case": "error",
|
|
131
|
+
"react/jsx-props-no-spreading": "off",
|
|
132
|
+
"react/jsx-sort-default-props": "off",
|
|
133
|
+
"react/jsx-sort-props": "error",
|
|
89
134
|
"react/jsx-uses-react": "error",
|
|
90
135
|
"react/jsx-uses-vars": "error",
|
|
91
136
|
"react/no-access-state-in-setstate": "error",
|
|
@@ -93,6 +138,7 @@ export default tseslint.config(
|
|
|
93
138
|
"react/no-array-index-key": "error",
|
|
94
139
|
"react/no-arrow-function-lifecycle": "error",
|
|
95
140
|
"react/no-children-prop": "error",
|
|
141
|
+
"react/no-danger": "off",
|
|
96
142
|
"react/no-danger-with-children": "error",
|
|
97
143
|
"react/no-deprecated": "error",
|
|
98
144
|
"react/no-did-mount-set-state": "error",
|
|
@@ -123,6 +169,8 @@ export default tseslint.config(
|
|
|
123
169
|
"react/prefer-read-only-props": "error",
|
|
124
170
|
"react/prefer-stateless-function": "error",
|
|
125
171
|
"react/prop-types": "error",
|
|
172
|
+
"react/react-in-jsx-scope": "off",
|
|
173
|
+
"react/require-default-props": "off",
|
|
126
174
|
"react/require-optimization": "error",
|
|
127
175
|
"react/require-render-return": "error",
|
|
128
176
|
"react/self-closing-comp": "error",
|
|
@@ -146,8 +194,8 @@ export default tseslint.config(
|
|
|
146
194
|
"@typescript-eslint": tseslint.plugin,
|
|
147
195
|
a11y,
|
|
148
196
|
n,
|
|
197
|
+
perfectionist,
|
|
149
198
|
sonar,
|
|
150
|
-
"simple-import-sort": importSort,
|
|
151
199
|
unicorn,
|
|
152
200
|
"@tanstack/query": {
|
|
153
201
|
rules: tanstackRules,
|
|
@@ -157,10 +205,21 @@ export default tseslint.config(
|
|
|
157
205
|
"accessor-pairs": "error",
|
|
158
206
|
"array-callback-return": "error",
|
|
159
207
|
"block-scoped-var": "error",
|
|
160
|
-
"
|
|
208
|
+
"callback-return": "off", // deprecated
|
|
209
|
+
camelcase: "off", // not useful
|
|
210
|
+
complexity: "off", // Handled by Sonar
|
|
211
|
+
"consistent-this": "off",
|
|
212
|
+
"consistent-return": "off",
|
|
161
213
|
"constructor-super": "error",
|
|
214
|
+
"capitalized-comments": "off", // conflicts with commenting/uncommenting shortcuts
|
|
215
|
+
"class-methods-use-this": "off", // not needed
|
|
216
|
+
"default-case": "off",
|
|
217
|
+
"default-case-last": "off",
|
|
218
|
+
"default-param-last": "off", // Handled by tseslint
|
|
219
|
+
"dot-notation": "off", // Handled by tseslint
|
|
162
220
|
eqeqeq: "error",
|
|
163
221
|
"for-direction": "error",
|
|
222
|
+
"func-names": "off",
|
|
164
223
|
"func-name-matching": "error",
|
|
165
224
|
"func-style": [
|
|
166
225
|
"error",
|
|
@@ -170,21 +229,40 @@ export default tseslint.config(
|
|
|
170
229
|
},
|
|
171
230
|
],
|
|
172
231
|
"getter-return": "error",
|
|
232
|
+
"global-require": "off", // Deprecated
|
|
173
233
|
"grouped-accessor-pairs": "error",
|
|
174
234
|
"guard-for-in": "error",
|
|
235
|
+
"handle-callback-err": "off", // Deprecated
|
|
236
|
+
"id-blacklist": "off", // Deprecated
|
|
237
|
+
"id-denylist": "off",
|
|
238
|
+
"id-length": "off",
|
|
239
|
+
"id-match": "off",
|
|
240
|
+
"init-declarations": "off",
|
|
241
|
+
"line-comment-position": "off",
|
|
242
|
+
"lines-around-directive": "off",
|
|
243
|
+
"lines-between-class-members": "off",
|
|
175
244
|
"logical-assignment-operators": "error",
|
|
176
245
|
"max-classes-per-file": "error",
|
|
177
246
|
"max-depth": "error",
|
|
178
247
|
"max-lines": "error",
|
|
179
248
|
"max-lines-per-function": "error",
|
|
180
249
|
"max-nested-callbacks": "error",
|
|
250
|
+
"max-params": "off", // Handled by tseslint
|
|
181
251
|
"max-statements": "error",
|
|
252
|
+
"multiline-comment-style": "off",
|
|
253
|
+
"new-cap": "off",
|
|
254
|
+
"newline-after-var": "off",
|
|
255
|
+
"newline-before-return": "off",
|
|
182
256
|
"no-alert": "error",
|
|
257
|
+
"no-array-constructor": "off", // Handled by tseslint
|
|
183
258
|
"no-async-promise-executor": "error",
|
|
184
259
|
"no-await-in-loop": "error",
|
|
185
260
|
"no-bitwise": "error",
|
|
261
|
+
"no-buffer-constructor": "off",
|
|
186
262
|
"no-caller": "error",
|
|
187
263
|
"no-case-declarations": "error",
|
|
264
|
+
"no-continue": "off",
|
|
265
|
+
"no-catch-shadow": "off",
|
|
188
266
|
"no-class-assign": "error",
|
|
189
267
|
"no-compare-neg-zero": "error",
|
|
190
268
|
"no-cond-assign": "error",
|
|
@@ -198,12 +276,15 @@ export default tseslint.config(
|
|
|
198
276
|
"no-delete-var": "error",
|
|
199
277
|
"no-div-regex": "error",
|
|
200
278
|
"no-dupe-args": "error",
|
|
279
|
+
"no-dupe-class-members": "off", // Checked by ts compiler
|
|
201
280
|
"no-dupe-else-if": "error",
|
|
202
281
|
"no-dupe-keys": "error",
|
|
203
282
|
"no-duplicate-case": "error",
|
|
283
|
+
"no-duplicate-imports": "error",
|
|
204
284
|
"no-else-return": "error",
|
|
205
285
|
"no-empty": "error",
|
|
206
286
|
"no-empty-character-class": "error",
|
|
287
|
+
"no-empty-function": "off", // Handled by tseslint
|
|
207
288
|
"no-empty-pattern": "error",
|
|
208
289
|
"no-empty-static-block": "error",
|
|
209
290
|
"no-eq-null": "error",
|
|
@@ -217,23 +298,36 @@ export default tseslint.config(
|
|
|
217
298
|
"no-func-assign": "error",
|
|
218
299
|
"no-global-assign": "error",
|
|
219
300
|
"no-implicit-coercion": "error",
|
|
301
|
+
"no-implicit-globals": "off",
|
|
302
|
+
"no-implied-eval": "off", // Handled by tseslint
|
|
220
303
|
"no-import-assign": "error",
|
|
304
|
+
"no-inline-comments": "off",
|
|
221
305
|
"no-inner-declarations": "error",
|
|
222
306
|
"no-invalid-regexp": "error",
|
|
307
|
+
"no-invalid-this": "off", // Checked by ts compiler
|
|
223
308
|
"no-irregular-whitespace": "error",
|
|
224
309
|
"no-iterator": "error",
|
|
225
310
|
"no-label-var": "error",
|
|
226
311
|
"no-labels": "error",
|
|
227
312
|
"no-lone-blocks": "error",
|
|
228
313
|
"no-lonely-if": "error",
|
|
314
|
+
"no-loop-func": "off", // Handled by tseslint
|
|
315
|
+
"no-loss-of-precision": "off", // Handled by tseslint
|
|
316
|
+
"no-magic-numbers": "off",
|
|
229
317
|
"no-misleading-character-class": "error",
|
|
318
|
+
"no-mixed-requires": "off",
|
|
230
319
|
"no-multi-assign": "error",
|
|
231
320
|
"no-multi-str": "error",
|
|
321
|
+
"no-native-reassign": "off",
|
|
232
322
|
"no-negated-condition": "error",
|
|
323
|
+
"no-negated-in-lhs": "off",
|
|
233
324
|
"no-nested-ternary": "error",
|
|
234
325
|
"no-new": "error",
|
|
235
326
|
"no-new-func": "error",
|
|
236
327
|
"no-new-native-nonconstructor": "error",
|
|
328
|
+
"no-new-require": "off",
|
|
329
|
+
"no-new-object": "off",
|
|
330
|
+
"no-new-symbol": "off",
|
|
237
331
|
"no-new-wrappers": "error",
|
|
238
332
|
"no-nonoctal-decimal-escape": "error",
|
|
239
333
|
"no-obj-calls": "error",
|
|
@@ -241,21 +335,40 @@ export default tseslint.config(
|
|
|
241
335
|
"no-octal": "error",
|
|
242
336
|
"no-octal-escape": "error",
|
|
243
337
|
"no-param-reassign": "error",
|
|
338
|
+
"no-path-concat": "off",
|
|
244
339
|
"no-plusplus": "error",
|
|
340
|
+
"no-process-env": "off",
|
|
341
|
+
"no-process-exit": "off",
|
|
245
342
|
"no-promise-executor-return": "error",
|
|
246
343
|
"no-proto": "error",
|
|
247
344
|
"no-prototype-builtins": "error",
|
|
345
|
+
"no-redeclare": "off", // Checked by ts compiler
|
|
248
346
|
"no-regex-spaces": "error",
|
|
347
|
+
"no-restricted-exports": "off",
|
|
348
|
+
"no-restricted-globals": "off",
|
|
349
|
+
"no-restricted-imports": "off", // Handled by tseslint
|
|
350
|
+
"no-restricted-modules": "off",
|
|
351
|
+
"no-restricted-properties": "off",
|
|
352
|
+
"no-restricted-syntax": "off",
|
|
249
353
|
"no-return-assign": "error",
|
|
354
|
+
"no-return-await": "off", // Handled by tseslint
|
|
250
355
|
"no-script-url": "error",
|
|
251
356
|
"no-self-assign": "error",
|
|
252
357
|
"no-self-compare": "error",
|
|
253
358
|
"no-sequences": "error",
|
|
254
359
|
"no-setter-return": "error",
|
|
360
|
+
"no-shadow": "off", // Handled by tseslint
|
|
255
361
|
"no-shadow-restricted-names": "error",
|
|
256
362
|
"no-sparse-arrays": "error",
|
|
363
|
+
"no-sync": "off",
|
|
364
|
+
"no-template-curly-in-string": "off",
|
|
365
|
+
"no-ternary": "off",
|
|
257
366
|
"no-this-before-super": "error",
|
|
367
|
+
"no-throw-literal": "off", // Handled by tseslint
|
|
368
|
+
"no-undef": "off",
|
|
258
369
|
"no-undef-init": "error",
|
|
370
|
+
"no-undefined": "off",
|
|
371
|
+
"no-underscore-dangle": "off",
|
|
259
372
|
"no-unmodified-loop-condition": "error",
|
|
260
373
|
"no-unneeded-ternary": "error",
|
|
261
374
|
"no-unreachable": "error",
|
|
@@ -263,29 +376,36 @@ export default tseslint.config(
|
|
|
263
376
|
"no-unsafe-finally": "error",
|
|
264
377
|
"no-unsafe-negation": "error",
|
|
265
378
|
"no-unsafe-optional-chaining": "error",
|
|
379
|
+
"no-unused-expressions": "off", // Handled by tseslint
|
|
266
380
|
"no-unused-labels": "error",
|
|
267
381
|
"no-unused-private-class-members": "error",
|
|
382
|
+
"no-unused-vars": "off", // Handled by tseslint
|
|
383
|
+
"no-use-before-define": "off",
|
|
268
384
|
"no-useless-assignment": "error",
|
|
269
385
|
"no-useless-backreference": "error",
|
|
270
386
|
"no-useless-call": "error",
|
|
271
387
|
"no-useless-catch": "error",
|
|
272
388
|
"no-useless-computed-key": "error",
|
|
273
389
|
"no-useless-concat": "error",
|
|
390
|
+
"no-useless-constructor": "off", // Handled by tseslint
|
|
274
391
|
"no-useless-escape": "error",
|
|
275
392
|
"no-useless-rename": "error",
|
|
276
393
|
"no-useless-return": "error",
|
|
277
394
|
"no-var": "error",
|
|
278
395
|
"no-void": "error",
|
|
396
|
+
"no-warning-comments": "off",
|
|
279
397
|
"no-with": "error",
|
|
280
398
|
"object-shorthand": "error",
|
|
281
399
|
"one-var": "off",
|
|
282
400
|
"operator-assignment": "error",
|
|
401
|
+
"padding-line-between-statements": "off",
|
|
283
402
|
"prefer-const": "error",
|
|
284
403
|
"prefer-exponentiation-operator": "error",
|
|
285
404
|
"prefer-named-capture-group": "error",
|
|
286
405
|
"prefer-numeric-literals": "error",
|
|
287
406
|
"prefer-object-has-own": "error",
|
|
288
407
|
"prefer-object-spread": "error",
|
|
408
|
+
"prefer-reflect": "off",
|
|
289
409
|
"prefer-regex-literals": "error",
|
|
290
410
|
"prefer-rest-params": "error",
|
|
291
411
|
"prefer-spread": "error",
|
|
@@ -294,7 +414,8 @@ export default tseslint.config(
|
|
|
294
414
|
"require-atomic-updates": "error",
|
|
295
415
|
"require-unicode-regexp": "error",
|
|
296
416
|
"require-yield": "error",
|
|
297
|
-
"
|
|
417
|
+
"spaced-comment": "off",
|
|
418
|
+
"sort-imports": "off",
|
|
298
419
|
"sort-vars": "error",
|
|
299
420
|
strict: "error",
|
|
300
421
|
"symbol-description": "error",
|
|
@@ -304,67 +425,84 @@ export default tseslint.config(
|
|
|
304
425
|
"vars-on-top": "error",
|
|
305
426
|
yoda: ["error", "always"],
|
|
306
427
|
|
|
307
|
-
// eslint overloads
|
|
308
|
-
complexity: "off", // Handled by Sonar
|
|
309
|
-
"default-param-last": "off", // Handled by tseslint
|
|
310
|
-
"dot-notation": "off", // Handled by tseslint
|
|
311
|
-
"max-params": "off", // Handled by tseslint
|
|
312
|
-
"no-array-constructor": "off", // Handled by tseslint
|
|
313
|
-
"no-dupe-class-members": "off", // Checked by ts compiler
|
|
314
|
-
"no-empty-function": "off", // Handled by tseslint
|
|
315
|
-
"no-implied-eval": "off", // Handled by tseslint
|
|
316
|
-
"no-invalid-this": "off", // Checked by ts compiler
|
|
317
|
-
"no-loop-func": "off", // Handled by tseslint
|
|
318
|
-
"no-loss-of-precision": "off", // Handled by tseslint
|
|
319
|
-
"no-redeclare": "off", // Checked by ts compiler
|
|
320
|
-
"no-restricted-imports": "off", // Handled by tseslint
|
|
321
|
-
"no-return-await": "off", // Handled by tseslint
|
|
322
|
-
"no-shadow": "off", // Handled by tseslint
|
|
323
|
-
"no-throw-literal": "off", // Handled by tseslint
|
|
324
|
-
"no-unused-expressions": "off", // Handled by tseslint
|
|
325
|
-
"no-unused-vars": "off", // Handled by tseslint
|
|
326
|
-
"no-useless-constructor": "off", // Handled by tseslint
|
|
327
428
|
"prefer-destructuring": "off", // Handled by tseslint
|
|
328
429
|
"prefer-promise-reject-errors": "off", // Handled by tseslint
|
|
329
430
|
"require-await": "off", // Handled by tseslint
|
|
431
|
+
"sort-keys": "off", // Handled by perfectionist
|
|
330
432
|
|
|
433
|
+
"n/callback-return": "off",
|
|
331
434
|
"n/exports-style": ["error", "exports"],
|
|
435
|
+
"n/file-extension-in-import": "error",
|
|
436
|
+
"n/global-require": "off",
|
|
437
|
+
"n/handle-callback-err": "error",
|
|
438
|
+
"n/hashbang": "off",
|
|
439
|
+
"n/no-hide-core-modules": "off",
|
|
440
|
+
"n/no-callback-literal": "off",
|
|
332
441
|
"n/no-deprecated-api": "error",
|
|
333
442
|
"n/no-exports-assign": "error",
|
|
334
443
|
"n/no-extraneous-import": "error",
|
|
335
444
|
"n/no-extraneous-require": "error",
|
|
445
|
+
"n/no-missing-import": "off",
|
|
336
446
|
"n/no-missing-require": "error",
|
|
447
|
+
"n/no-mixed-requires": "off",
|
|
448
|
+
"n/no-new-require": "off",
|
|
449
|
+
"n/no-path-concat": "error",
|
|
450
|
+
"n/no-process-env": "off",
|
|
451
|
+
"n/no-process-exit": "off",
|
|
452
|
+
"n/no-restricted-import": "off",
|
|
453
|
+
"n/no-restricted-require": "off",
|
|
454
|
+
"n/no-sync": "off",
|
|
337
455
|
"n/no-unpublished-bin": "error",
|
|
338
|
-
"n/no-unpublished-require": "
|
|
456
|
+
"n/no-unpublished-require": "off",
|
|
457
|
+
"n/no-unpublished-import": "off",
|
|
339
458
|
"n/no-unsupported-features/es-builtins": "error",
|
|
340
459
|
"n/no-unsupported-features/es-syntax": "error",
|
|
341
460
|
"n/no-unsupported-features/node-builtins": "error",
|
|
461
|
+
"n/prefer-global/buffer": "error",
|
|
462
|
+
"n/prefer-global/console": "error",
|
|
463
|
+
"n/prefer-global/process": "error",
|
|
464
|
+
"n/prefer-global/text-decoder": "error",
|
|
465
|
+
"n/prefer-global/text-encoder": "error",
|
|
466
|
+
"n/prefer-global/url-search-params": "error",
|
|
467
|
+
"n/prefer-global/url": "error",
|
|
468
|
+
"n/prefer-promises/dns": "off",
|
|
469
|
+
"n/prefer-promises/fs": "off",
|
|
342
470
|
"n/prefer-node-protocol": "error",
|
|
471
|
+
"n/process-exit-as-throw": "off",
|
|
472
|
+
"n/shebang": "off",
|
|
343
473
|
|
|
344
|
-
"@typescript-eslint/adjacent-overload-signatures": "
|
|
474
|
+
"@typescript-eslint/adjacent-overload-signatures": "off", // Conflicts with perfectionist
|
|
345
475
|
"@typescript-eslint/array-type": "error",
|
|
346
476
|
"@typescript-eslint/await-thenable": "error",
|
|
347
477
|
"@typescript-eslint/ban-ts-comment": "error",
|
|
348
478
|
"@typescript-eslint/ban-tslint-comment": "error",
|
|
349
479
|
"@typescript-eslint/ban-types": "error",
|
|
350
480
|
"@typescript-eslint/class-literal-property-style": "error",
|
|
481
|
+
"@typescript-eslint/class-methods-use-this": "off",
|
|
351
482
|
"@typescript-eslint/consistent-generic-constructors": "error",
|
|
352
483
|
"@typescript-eslint/consistent-indexed-object-style": "error",
|
|
484
|
+
"@typescript-eslint/consistent-return": "off",
|
|
353
485
|
"@typescript-eslint/consistent-type-assertions": "error",
|
|
354
486
|
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
|
|
355
487
|
"@typescript-eslint/consistent-type-exports": "error",
|
|
356
488
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
357
489
|
"@typescript-eslint/default-param-last": "error",
|
|
358
490
|
"@typescript-eslint/dot-notation": "error",
|
|
491
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
359
492
|
"@typescript-eslint/explicit-member-accessibility": "error",
|
|
493
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
494
|
+
"@typescript-eslint/init-declarations": "off",
|
|
495
|
+
"@typescript-eslint/lines-between-class-members": "off",
|
|
360
496
|
"@typescript-eslint/max-params": "error",
|
|
361
497
|
"@typescript-eslint/member-ordering": "error",
|
|
362
498
|
"@typescript-eslint/method-signature-style": "error",
|
|
499
|
+
"@typescript-eslint/naming-convention": "off",
|
|
363
500
|
"@typescript-eslint/no-array-constructor": "error",
|
|
364
501
|
"@typescript-eslint/no-array-delete": "error",
|
|
365
502
|
"@typescript-eslint/no-base-to-string": "error",
|
|
366
503
|
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
|
367
504
|
"@typescript-eslint/no-confusing-void-expression": "error",
|
|
505
|
+
"@typescript-eslint/no-dupe-class-members": "off",
|
|
368
506
|
"@typescript-eslint/no-duplicate-enum-values": "error",
|
|
369
507
|
"@typescript-eslint/no-duplicate-type-constituents": "error",
|
|
370
508
|
"@typescript-eslint/no-dynamic-delete": "error",
|
|
@@ -378,9 +516,11 @@ export default tseslint.config(
|
|
|
378
516
|
"@typescript-eslint/no-implied-eval": "error",
|
|
379
517
|
"@typescript-eslint/no-import-type-side-effects": "error",
|
|
380
518
|
"@typescript-eslint/no-inferrable-types": "error",
|
|
519
|
+
"@typescript-eslint/no-invalid-this": "off",
|
|
381
520
|
"@typescript-eslint/no-invalid-void-type": "error",
|
|
382
521
|
"@typescript-eslint/no-loop-func": "error",
|
|
383
522
|
"@typescript-eslint/no-loss-of-precision": "error",
|
|
523
|
+
"@typescript-eslint/no-magic-numbers": "off",
|
|
384
524
|
"@typescript-eslint/no-meaningless-void-operator": "error",
|
|
385
525
|
"@typescript-eslint/no-misused-new": "error",
|
|
386
526
|
"@typescript-eslint/no-misused-promises": "error",
|
|
@@ -389,11 +529,14 @@ export default tseslint.config(
|
|
|
389
529
|
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
390
530
|
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
391
531
|
"@typescript-eslint/no-non-null-assertion": "error",
|
|
532
|
+
"@typescript-eslint/no-redeclare": "off",
|
|
392
533
|
"@typescript-eslint/no-redundant-type-constituents": "error",
|
|
393
534
|
"@typescript-eslint/no-require-imports": "error",
|
|
394
535
|
"@typescript-eslint/no-restricted-imports": "error",
|
|
395
536
|
"@typescript-eslint/no-shadow": "error",
|
|
396
537
|
"@typescript-eslint/no-this-alias": "error",
|
|
538
|
+
"@typescript-eslint/no-throw-literal": "off",
|
|
539
|
+
"@typescript-eslint/no-type-alias": "off",
|
|
397
540
|
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
|
398
541
|
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
399
542
|
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
|
@@ -421,12 +564,16 @@ export default tseslint.config(
|
|
|
421
564
|
varsIgnorePattern: "^_",
|
|
422
565
|
},
|
|
423
566
|
],
|
|
567
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
424
568
|
"@typescript-eslint/no-useless-constructor": "error",
|
|
425
569
|
"@typescript-eslint/no-useless-empty-export": "error",
|
|
570
|
+
"@typescript-eslint/no-useless-template-literals": "off",
|
|
426
571
|
"@typescript-eslint/no-unnecessary-template-expression": "error",
|
|
427
572
|
"@typescript-eslint/no-var-requires": "error",
|
|
428
573
|
"@typescript-eslint/non-nullable-type-assertion-style": "error",
|
|
429
574
|
"@typescript-eslint/only-throw-error": "error",
|
|
575
|
+
"@typescript-eslint/padding-line-between-statements": "off",
|
|
576
|
+
"@typescript-eslint/parameter-properties": "off",
|
|
430
577
|
"@typescript-eslint/prefer-as-const": "error",
|
|
431
578
|
"@typescript-eslint/prefer-destructuring": "error",
|
|
432
579
|
"@typescript-eslint/prefer-enum-initializers": "error",
|
|
@@ -440,20 +587,23 @@ export default tseslint.config(
|
|
|
440
587
|
"@typescript-eslint/prefer-optional-chain": "error",
|
|
441
588
|
"@typescript-eslint/prefer-promise-reject-errors": "error",
|
|
442
589
|
"@typescript-eslint/prefer-readonly": "error",
|
|
590
|
+
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
443
591
|
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
|
444
592
|
"@typescript-eslint/prefer-regexp-exec": "error",
|
|
445
593
|
"@typescript-eslint/prefer-return-this-type": "error",
|
|
446
594
|
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
595
|
+
"@typescript-eslint/prefer-ts-expect-error": "off",
|
|
447
596
|
"@typescript-eslint/promise-function-async": "error",
|
|
448
597
|
"@typescript-eslint/require-array-sort-compare": "error",
|
|
449
598
|
"@typescript-eslint/require-await": "error",
|
|
450
599
|
"@typescript-eslint/restrict-plus-operands": "error",
|
|
451
600
|
"@typescript-eslint/restrict-template-expressions": "error",
|
|
452
601
|
"@typescript-eslint/return-await": "error",
|
|
453
|
-
"@typescript-eslint/sort-type-constituents": "
|
|
602
|
+
"@typescript-eslint/sort-type-constituents": "off",
|
|
454
603
|
"@typescript-eslint/strict-boolean-expressions": "error",
|
|
455
604
|
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
456
605
|
"@typescript-eslint/triple-slash-reference": "error",
|
|
606
|
+
"@typescript-eslint/typedef": "off",
|
|
457
607
|
"@typescript-eslint/unbound-method": "error",
|
|
458
608
|
"@typescript-eslint/unified-signatures": "error",
|
|
459
609
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
|
|
@@ -466,14 +616,17 @@ export default tseslint.config(
|
|
|
466
616
|
"unicorn/custom-error-definition": "error",
|
|
467
617
|
"unicorn/error-message": "error",
|
|
468
618
|
"unicorn/escape-case": "error",
|
|
619
|
+
"unicorn/explicit-length-check": "off",
|
|
469
620
|
"unicorn/expiring-todo-comments": "error",
|
|
470
621
|
"unicorn/filename-case": "error",
|
|
622
|
+
"unicorn/import-index": "off",
|
|
471
623
|
"unicorn/import-style": "error",
|
|
472
624
|
"unicorn/new-for-builtins": "error",
|
|
473
625
|
"unicorn/no-abusive-eslint-disable": "error",
|
|
474
626
|
"unicorn/no-anonymous-default-export": "error",
|
|
475
627
|
"unicorn/no-array-callback-reference": "error",
|
|
476
628
|
"unicorn/no-array-for-each": "error",
|
|
629
|
+
"unicorn/no-array-instanceof": "off",
|
|
477
630
|
"unicorn/no-array-method-this-argument": "error",
|
|
478
631
|
"unicorn/no-array-push-push": "error",
|
|
479
632
|
"unicorn/no-array-reduce": "error",
|
|
@@ -483,19 +636,34 @@ export default tseslint.config(
|
|
|
483
636
|
"unicorn/no-document-cookie": "error",
|
|
484
637
|
"unicorn/no-empty-file": "error",
|
|
485
638
|
"unicorn/no-for-loop": "error",
|
|
639
|
+
"unicorn/no-fn-reference-in-iterator": "off",
|
|
486
640
|
"unicorn/no-hex-escape": "error",
|
|
487
641
|
"unicorn/no-instanceof-array": "error",
|
|
488
642
|
"unicorn/no-invalid-fetch-options": "error",
|
|
489
643
|
"unicorn/no-invalid-remove-event-listener": "error",
|
|
490
|
-
"unicorn/no-keyword-prefix": "
|
|
644
|
+
"unicorn/no-keyword-prefix": "off",
|
|
491
645
|
"unicorn/no-lonely-if": "error",
|
|
492
646
|
"unicorn/no-magic-array-flat-depth": "error",
|
|
493
647
|
"unicorn/no-negated-condition": "error",
|
|
494
648
|
"unicorn/no-negation-in-equality-check": "error",
|
|
495
649
|
"unicorn/no-new-array": "error",
|
|
496
650
|
"unicorn/no-new-buffer": "error",
|
|
651
|
+
"unicorn/prefer-dataset": "off",
|
|
652
|
+
"unicorn/prefer-event-key": "off",
|
|
653
|
+
"unicorn/prefer-exponentiation-operator": "off",
|
|
654
|
+
"unicorn/prefer-flat-map": "off",
|
|
655
|
+
"unicorn/prefer-node-append": "off",
|
|
656
|
+
"unicorn/prefer-node-remove": "off",
|
|
657
|
+
"unicorn/prefer-object-has-own": "off",
|
|
658
|
+
"unicorn/prefer-replace-all": "off",
|
|
659
|
+
"unicorn/prefer-starts-ends-with": "off",
|
|
660
|
+
"unicorn/prefer-text-content": "off",
|
|
661
|
+
"unicorn/prefer-trim-start-end": "off",
|
|
662
|
+
"unicorn/regex-shorthand": "off",
|
|
663
|
+
"unicorn/no-null": "off",
|
|
497
664
|
"unicorn/no-object-as-default-parameter": "error",
|
|
498
665
|
"unicorn/no-process-exit": "error",
|
|
666
|
+
"unicorn/no-reduce": "off",
|
|
499
667
|
"unicorn/no-single-promise-in-promise-methods": "error",
|
|
500
668
|
"unicorn/no-static-only-class": "error",
|
|
501
669
|
"unicorn/no-thenable": "error",
|
|
@@ -505,6 +673,7 @@ export default tseslint.config(
|
|
|
505
673
|
"unicorn/no-unnecessary-polyfills": "error",
|
|
506
674
|
"unicorn/no-unreadable-array-destructuring": "error",
|
|
507
675
|
"unicorn/no-unreadable-iife": "error",
|
|
676
|
+
"unicorn/no-unsafe-regex": "off",
|
|
508
677
|
"unicorn/no-unused-properties": "error",
|
|
509
678
|
"unicorn/no-useless-fallback-in-spread": "error",
|
|
510
679
|
"unicorn/no-useless-length-check": "error",
|
|
@@ -609,9 +778,25 @@ export default tseslint.config(
|
|
|
609
778
|
"@tanstack/query/no-rest-destructuring": "error",
|
|
610
779
|
"@tanstack/query/stable-query-client": "error",
|
|
611
780
|
|
|
612
|
-
"
|
|
613
|
-
"
|
|
781
|
+
"perfectionist/sort-array-includes": "error",
|
|
782
|
+
"perfectionist/sort-astro-attributes": "error",
|
|
783
|
+
"perfectionist/sort-classes": "error",
|
|
784
|
+
"perfectionist/sort-enums": "error",
|
|
785
|
+
"perfectionist/sort-exports": "error",
|
|
786
|
+
"perfectionist/sort-imports": "error",
|
|
787
|
+
"perfectionist/sort-interfaces": "error",
|
|
788
|
+
"perfectionist/sort-jsx-props": "error",
|
|
789
|
+
"perfectionist/sort-maps": "error",
|
|
790
|
+
"perfectionist/sort-named-exports": "error",
|
|
791
|
+
"perfectionist/sort-named-imports": "error",
|
|
792
|
+
"perfectionist/sort-object-types": "error",
|
|
793
|
+
"perfectionist/sort-objects": "error",
|
|
794
|
+
"perfectionist/sort-svelte-attributes": "error",
|
|
795
|
+
"perfectionist/sort-intersection-types": "error",
|
|
796
|
+
"perfectionist/sort-union-types": "error",
|
|
797
|
+
"perfectionist/sort-vue-attributes": "error",
|
|
614
798
|
|
|
799
|
+
"a11y/accessible-emoji": "off",
|
|
615
800
|
"a11y/alt-text": "error",
|
|
616
801
|
"a11y/anchor-ambiguous-text": "error",
|
|
617
802
|
"a11y/anchor-has-content": "error",
|
|
@@ -630,7 +815,9 @@ export default tseslint.config(
|
|
|
630
815
|
"a11y/img-redundant-alt": "error",
|
|
631
816
|
"a11y/interactive-supports-focus": "error",
|
|
632
817
|
"a11y/label-has-associated-control": "error",
|
|
818
|
+
"a11y/label-has-for": "off",
|
|
633
819
|
"a11y/lang": "error",
|
|
820
|
+
"a11y/media-has-caption": "off",
|
|
634
821
|
"a11y/mouse-events-have-key-events": "error",
|
|
635
822
|
"a11y/no-access-key": "error",
|
|
636
823
|
"a11y/no-aria-hidden-on-focusable": "error",
|
|
@@ -640,6 +827,7 @@ export default tseslint.config(
|
|
|
640
827
|
"a11y/no-noninteractive-element-interactions": "error",
|
|
641
828
|
"a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
642
829
|
"a11y/no-noninteractive-tabindex": "error",
|
|
830
|
+
"a11y/no-onchange": "off",
|
|
643
831
|
"a11y/no-redundant-roles": "error",
|
|
644
832
|
"a11y/no-static-element-interactions": "error",
|
|
645
833
|
"a11y/prefer-tag-over-role": "error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethang/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/eglove/eslint-config-ethang.git"
|
|
6
6
|
},
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"eslint-plugin-astro": "^1.2.2",
|
|
22
22
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
23
23
|
"eslint-plugin-n": "^17.9.0",
|
|
24
|
+
"eslint-plugin-perfectionist": "^2.11.0",
|
|
24
25
|
"eslint-plugin-prettier": "^5.1.3",
|
|
25
26
|
"eslint-plugin-react": "^7.34.2",
|
|
26
27
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
27
|
-
"eslint-plugin-simple-import-sort": "^12.1.0",
|
|
28
28
|
"eslint-plugin-sonarjs": "^1.0.3",
|
|
29
29
|
"eslint-plugin-unicorn": "^54.0.0",
|
|
30
30
|
"prettier": "^3.3.2",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"eslint-plugin-astro": "^1.2.2",
|
|
41
41
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
42
42
|
"eslint-plugin-n": "^17.9.0",
|
|
43
|
+
"eslint-plugin-perfectionist": "^2.11.0",
|
|
43
44
|
"eslint-plugin-prettier": "^5.1.3",
|
|
44
45
|
"eslint-plugin-react": "^7.34.2",
|
|
45
46
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
46
|
-
"eslint-plugin-simple-import-sort": "^12.1.0",
|
|
47
47
|
"eslint-plugin-sonarjs": "^1.0.3",
|
|
48
48
|
"eslint-plugin-unicorn": "^54.0.0",
|
|
49
49
|
"prettier": "^3.3.2",
|