@ethang/eslint-config 16.1.7 → 16.2.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 +2 -1
- package/eslint.config.js +10 -5
- package/package.json +12 -10
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* Includes [jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
|
|
10
10
|
* Includes [eslint-plugin-astro](https://www.npmjs.com/package/eslint-plugin-astro)
|
|
11
11
|
* Includes [eslint-plugin-sonarjs](https://github.com/SonarSource/eslint-plugin-sonarjs)
|
|
12
|
+
* Include [@tanstack/eslint-plugin-query](https://tanstack.com/query/latest/docs/eslint/eslint-plugin-query)
|
|
12
13
|
* Import sorting with [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort)
|
|
13
14
|
* Includes Prettier built in (do NOT use this with a separate Prettier config.)
|
|
14
15
|
* And more...
|
|
@@ -32,7 +33,7 @@ export default tseslint.config(...config, {
|
|
|
32
33
|
languageOptions: {
|
|
33
34
|
parserOptions: {
|
|
34
35
|
project: true,
|
|
35
|
-
tsconfigRootDir:
|
|
36
|
+
tsconfigRootDir: import.meta.dirname,
|
|
36
37
|
},
|
|
37
38
|
},
|
|
38
39
|
rules: {
|
package/eslint.config.js
CHANGED
|
@@ -10,6 +10,7 @@ import importSort from "eslint-plugin-simple-import-sort";
|
|
|
10
10
|
import unicorn from "eslint-plugin-unicorn";
|
|
11
11
|
import tseslint from "typescript-eslint";
|
|
12
12
|
import sonar from "eslint-plugin-sonarjs";
|
|
13
|
+
import { rules as tanstackRules } from "@tanstack/eslint-plugin-query";
|
|
13
14
|
|
|
14
15
|
const languageOptions = {
|
|
15
16
|
parser,
|
|
@@ -149,6 +150,9 @@ export default tseslint.config(
|
|
|
149
150
|
sonar,
|
|
150
151
|
"simple-import-sort": importSort,
|
|
151
152
|
unicorn,
|
|
153
|
+
tanstackQuery: {
|
|
154
|
+
rules: tanstackRules,
|
|
155
|
+
},
|
|
152
156
|
},
|
|
153
157
|
rules: {
|
|
154
158
|
"accessor-pairs": "error",
|
|
@@ -300,8 +304,8 @@ export default tseslint.config(
|
|
|
300
304
|
"valid-typeof": "error",
|
|
301
305
|
"vars-on-top": "error",
|
|
302
306
|
yoda: ["error", "always"],
|
|
303
|
-
// eslint overloads
|
|
304
307
|
|
|
308
|
+
// eslint overloads
|
|
305
309
|
complexity: "off", // Handled by Sonar
|
|
306
310
|
"default-param-last": "off", // Handled by tseslint
|
|
307
311
|
"dot-notation": "off", // Handled by tseslint
|
|
@@ -338,8 +342,6 @@ export default tseslint.config(
|
|
|
338
342
|
"n/no-unsupported-features/node-builtins": "error",
|
|
339
343
|
"n/prefer-node-protocol": "error",
|
|
340
344
|
|
|
341
|
-
// typescript-eslint
|
|
342
|
-
|
|
343
345
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
344
346
|
"@typescript-eslint/array-type": "error",
|
|
345
347
|
"@typescript-eslint/await-thenable": "error",
|
|
@@ -422,7 +424,7 @@ export default tseslint.config(
|
|
|
422
424
|
],
|
|
423
425
|
"@typescript-eslint/no-useless-constructor": "error",
|
|
424
426
|
"@typescript-eslint/no-useless-empty-export": "error",
|
|
425
|
-
"@typescript-eslint/no-
|
|
427
|
+
"@typescript-eslint/no-unnecessary-template-expression": "error",
|
|
426
428
|
"@typescript-eslint/no-var-requires": "error",
|
|
427
429
|
"@typescript-eslint/non-nullable-type-assertion-style": "error",
|
|
428
430
|
"@typescript-eslint/only-throw-error": "error",
|
|
@@ -443,7 +445,6 @@ export default tseslint.config(
|
|
|
443
445
|
"@typescript-eslint/prefer-regexp-exec": "error",
|
|
444
446
|
"@typescript-eslint/prefer-return-this-type": "error",
|
|
445
447
|
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
446
|
-
"@typescript-eslint/prefer-ts-expect-error": "error",
|
|
447
448
|
"@typescript-eslint/promise-function-async": "error",
|
|
448
449
|
"@typescript-eslint/require-array-sort-compare": "error",
|
|
449
450
|
"@typescript-eslint/require-await": "error",
|
|
@@ -604,6 +605,10 @@ export default tseslint.config(
|
|
|
604
605
|
"sonar/prefer-single-boolean-return": "error",
|
|
605
606
|
"sonar/prefer-while": "error",
|
|
606
607
|
|
|
608
|
+
"tanstackQuery/exhaustive-deps": "error",
|
|
609
|
+
"tanstackQuery/stable-query-client": "error",
|
|
610
|
+
"tanstackQuery/no-rest-destructuring": "error",
|
|
611
|
+
|
|
607
612
|
"simple-import-sort/exports": "error",
|
|
608
613
|
"simple-import-sort/imports": "error",
|
|
609
614
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethang/eslint-config",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.2.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/eglove/eslint-config-ethang.git"
|
|
6
6
|
},
|
|
@@ -14,42 +14,44 @@
|
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@eslint/js": "^9.4.0",
|
|
17
|
-
"@
|
|
17
|
+
"@tanstack/eslint-plugin-query": "^5.35.6",
|
|
18
|
+
"@typescript-eslint/parser": "^7.12.0",
|
|
18
19
|
"eslint": "^9.4.0",
|
|
19
20
|
"eslint-config-prettier": "^9.1.0",
|
|
20
21
|
"eslint-plugin-astro": "^1.2.0",
|
|
21
22
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
22
|
-
"eslint-plugin-n": "^17.
|
|
23
|
+
"eslint-plugin-n": "^17.8.1",
|
|
23
24
|
"eslint-plugin-prettier": "^5.1.3",
|
|
24
25
|
"eslint-plugin-react": "^7.34.2",
|
|
25
26
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
26
27
|
"eslint-plugin-simple-import-sort": "^12.1.0",
|
|
27
28
|
"eslint-plugin-sonarjs": "^1.0.3",
|
|
28
29
|
"eslint-plugin-unicorn": "^53.0.0",
|
|
29
|
-
"prettier": "^3.3.
|
|
30
|
+
"prettier": "^3.3.1",
|
|
30
31
|
"typescript": "^5.4.5",
|
|
31
|
-
"typescript-eslint": "^7.
|
|
32
|
+
"typescript-eslint": "^7.12.0"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
35
|
"@eslint/js": "^9.4.0",
|
|
35
|
-
"@
|
|
36
|
+
"@tanstack/eslint-plugin-query": "^5.35.6",
|
|
37
|
+
"@typescript-eslint/parser": "^7.12.0",
|
|
36
38
|
"eslint": "^9.4.0",
|
|
37
39
|
"eslint-config-prettier": "^9.1.0",
|
|
38
40
|
"eslint-plugin-astro": "^1.2.0",
|
|
39
41
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
40
|
-
"eslint-plugin-n": "^17.
|
|
42
|
+
"eslint-plugin-n": "^17.8.1",
|
|
41
43
|
"eslint-plugin-prettier": "^5.1.3",
|
|
42
44
|
"eslint-plugin-react": "^7.34.2",
|
|
43
45
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
44
46
|
"eslint-plugin-simple-import-sort": "^12.1.0",
|
|
45
47
|
"eslint-plugin-sonarjs": "^1.0.3",
|
|
46
48
|
"eslint-plugin-unicorn": "^53.0.0",
|
|
47
|
-
"prettier": "^3.3.
|
|
49
|
+
"prettier": "^3.3.1",
|
|
48
50
|
"typescript": "^5.4.5",
|
|
49
|
-
"typescript-eslint": "^7.
|
|
51
|
+
"typescript-eslint": "^7.12.0"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
52
|
-
"@ethang/project-builder": "^1.1.
|
|
54
|
+
"@ethang/project-builder": "^1.1.39",
|
|
53
55
|
"@tsconfig/node-lts": "^20.1.3",
|
|
54
56
|
"@tsconfig/strictest": "^2.0.5"
|
|
55
57
|
}
|