@ethang/eslint-config 19.4.4 → 19.4.6

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.
@@ -24,7 +24,16 @@ export const getTypeImportStrings = (type) => {
24
24
  export const getListJson = (list) => {
25
25
  return list
26
26
  .map((list) => {
27
- return JSON.stringify(list.list).slice(1, -1);
27
+ const sortedKeys = Object.keys(list.list).sort((a, b) =>
28
+ a.localeCompare(b),
29
+ );
30
+ const sortedObject = {};
31
+
32
+ for (const key of sortedKeys) {
33
+ sortedObject[key] = list.list[key];
34
+ }
35
+
36
+ return JSON.stringify(sortedObject).slice(1, -1);
28
37
  })
29
38
  .join(",");
30
39
  };
@@ -109,7 +109,7 @@ export const ruleList = [
109
109
  importString: 'import sonar from "eslint-plugin-sonarjs";',
110
110
  order: 8,
111
111
  pluginName: "sonar",
112
- pluginValue: "sonar",
112
+ pluginValue: "fixupPluginRules(sonar)", // TODO remove with v9 compat
113
113
  },
114
114
  {
115
115
  list: ethangRules,
@@ -226,7 +226,7 @@ export const ruleList = [
226
226
  type: "react",
227
227
  importString: 'import reactHooks from "eslint-plugin-react-hooks";',
228
228
  pluginName: "react-hooks",
229
- pluginValue: "fixupPluginRules(reactHooks)",
229
+ pluginValue: "fixupPluginRules(reactHooks)", // TODO remove with v9 compat
230
230
  },
231
231
  {
232
232
  list: solidRules,
@@ -9,6 +9,7 @@ export const coreFile = [
9
9
  includeReactVersion: true,
10
10
  includeLanguageOptions: true,
11
11
  includeIgnores: true,
12
+ extraImports: ['import { fixupPluginRules } from "@eslint/compat";'], // TODO remove with v9 compat
12
13
  },
13
14
  },
14
15
  {
@@ -45,7 +46,7 @@ const reactFile = [
45
46
  includeLanguageOptions: true,
46
47
  extraImports: [
47
48
  'import tseslint from "typescript-eslint";',
48
- 'import { fixupPluginRules } from "@eslint/compat";',
49
+ 'import { fixupPluginRules } from "@eslint/compat";', // TODO remove with v9 compat
49
50
  ],
50
51
  },
51
52
  },
package/config.astro.js CHANGED
@@ -10,22 +10,6 @@ export default tseslint.config({
10
10
  astro: astro,
11
11
  },
12
12
  rules: {
13
- "astro/missing-client-only-directive-value": "error",
14
- "astro/no-conflict-set-directives": "error",
15
- "astro/no-deprecated-astro-canonicalurl": "error",
16
- "astro/no-deprecated-astro-fetchcontent": "error",
17
- "astro/no-deprecated-astro-resolve": "error",
18
- "astro/no-deprecated-getentrybyslug": "error",
19
- "astro/no-exports-from-components": "error",
20
- "astro/no-set-html-directive": 'off"',
21
- "astro/no-set-text-directive": "error",
22
- "astro/no-unused-css-selector": "error",
23
- "astro/no-unused-define-vars-in-style": "error",
24
- "astro/prefer-class-list-directive": "error",
25
- "astro/prefer-object-class-list": "error",
26
- "astro/prefer-split-class-list": "error",
27
- "astro/semi": "error",
28
- "astro/valid-compile": "error",
29
13
  "astro/jsx-a11y/alt-text": "error",
30
14
  "astro/jsx-a11y/anchor-ambiguous-text": "error",
31
15
  "astro/jsx-a11y/anchor-has-content": "error",
@@ -62,5 +46,21 @@ export default tseslint.config({
62
46
  "astro/jsx-a11y/role-supports-aria-props": "error",
63
47
  "astro/jsx-a11y/scope": "error",
64
48
  "astro/jsx-a11y/tabindex-no-positive": "error",
49
+ "astro/missing-client-only-directive-value": "error",
50
+ "astro/no-conflict-set-directives": "error",
51
+ "astro/no-deprecated-astro-canonicalurl": "error",
52
+ "astro/no-deprecated-astro-fetchcontent": "error",
53
+ "astro/no-deprecated-astro-resolve": "error",
54
+ "astro/no-deprecated-getentrybyslug": "error",
55
+ "astro/no-exports-from-components": "error",
56
+ "astro/no-set-html-directive": 'off"',
57
+ "astro/no-set-text-directive": "error",
58
+ "astro/no-unused-css-selector": "error",
59
+ "astro/no-unused-define-vars-in-style": "error",
60
+ "astro/prefer-class-list-directive": "error",
61
+ "astro/prefer-object-class-list": "error",
62
+ "astro/prefer-split-class-list": "error",
63
+ "astro/semi": "error",
64
+ "astro/valid-compile": "error",
65
65
  },
66
66
  });
package/config.react.js CHANGED
@@ -18,7 +18,35 @@ export default tseslint.config({
18
18
  rules: {
19
19
  "react/avoid-shorthand-boolean": "off",
20
20
  "react/avoid-shorthand-fragment": "off",
21
+ "react/debug/class-component": "off",
22
+ "react/debug/function-component": "off",
23
+ "react/debug/hook": "off",
24
+ "react/debug/is-from-react": "off",
25
+ "react/debug/react-hooks": "off",
26
+ "react/dom/no-children-in-void-dom-elements": "error",
27
+ "react/dom/no-dangerously-set-innerhtml": "error",
28
+ "react/dom/no-dangerously-set-innerhtml-with-children": "error",
29
+ "react/dom/no-find-dom-node": "error",
30
+ "react/dom/no-missing-button-type": "error",
31
+ "react/dom/no-missing-iframe-sandbox": "error",
32
+ "react/dom/no-namespace": "error",
33
+ "react/dom/no-render-return-value": "error",
34
+ "react/dom/no-script-url": "error",
35
+ "react/dom/no-unsafe-iframe-sandbox": "error",
36
+ "react/dom/no-unsafe-target-blank": "error",
21
37
  "react/ensure-forward-ref-using-ref": "error",
38
+ "react/hooks-extra/ensure-custom-hooks-using-other-hooks": "error",
39
+ "react/hooks-extra/ensure-use-memo-has-non-empty-deps": "error",
40
+ "react/hooks-extra/no-direct-set-state-in-use-effect": "error",
41
+ "react/hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
42
+ "react/hooks-extra/no-redundant-custom-hook": "error",
43
+ "react/hooks-extra/no-unnecessary-use-callback": "error",
44
+ "react/hooks-extra/no-unnecessary-use-memo": "error",
45
+ "react/hooks-extra/prefer-use-state-lazy-initialization": "error",
46
+ "react/naming-convention/component-name": "error",
47
+ "react/naming-convention/filename": ["error", { rule: "kebab-case" }],
48
+ "react/naming-convention/filename-extension": "error",
49
+ "react/naming-convention/use-state": "error",
22
50
  "react/no-access-state-in-setstate": "error",
23
51
  "react/no-array-index-key": "error",
24
52
  "react/no-children-count": "error",
@@ -62,39 +90,11 @@ export default tseslint.config({
62
90
  "react/prefer-read-only-props": "error",
63
91
  "react/prefer-shorthand-boolean": "error",
64
92
  "react/prefer-shorthand-fragment": "error",
65
- "react/dom/no-children-in-void-dom-elements": "error",
66
- "react/dom/no-dangerously-set-innerhtml": "error",
67
- "react/dom/no-dangerously-set-innerhtml-with-children": "error",
68
- "react/dom/no-find-dom-node": "error",
69
- "react/dom/no-missing-button-type": "error",
70
- "react/dom/no-missing-iframe-sandbox": "error",
71
- "react/dom/no-namespace": "error",
72
- "react/dom/no-render-return-value": "error",
73
- "react/dom/no-script-url": "error",
74
- "react/dom/no-unsafe-iframe-sandbox": "error",
75
- "react/dom/no-unsafe-target-blank": "error",
76
93
  "react/web-api/no-leaked-event-listener": "error",
77
94
  "react/web-api/no-leaked-interval": "error",
78
95
  "react/web-api/no-leaked-resize-observer": "error",
79
96
  "react/web-api/no-leaked-timeout": "error",
80
- "react/hooks-extra/no-direct-set-state-in-use-effect": "error",
81
- "react/hooks-extra/no-redundant-custom-hook": "error",
82
- "react/hooks-extra/no-unnecessary-use-callback": "error",
83
- "react/hooks-extra/no-unnecessary-use-memo": "error",
84
- "react/hooks-extra/prefer-use-state-lazy-initialization": "error",
85
- "react/hooks-extra/ensure-custom-hooks-using-other-hooks": "error",
86
- "react/hooks-extra/ensure-use-memo-has-non-empty-deps": "error",
87
- "react/hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
88
- "react/naming-convention/component-name": "error",
89
- "react/naming-convention/filename": ["error", { rule: "kebab-case" }],
90
- "react/naming-convention/filename-extension": "error",
91
- "react/naming-convention/use-state": "error",
92
- "react/debug/class-component": "off",
93
- "react/debug/function-component": "off",
94
- "react/debug/hook": "off",
95
- "react/debug/is-from-react": "off",
96
- "react/debug/react-hooks": "off",
97
- "react-hooks/rules-of-hooks": "error",
98
97
  "react-hooks/exhaustive-deps": "error",
98
+ "react-hooks/rules-of-hooks": "error",
99
99
  },
100
100
  });
package/config.solid.js CHANGED
@@ -14,9 +14,10 @@ export default tseslint.config({
14
14
  "solid/event-handlers": "error",
15
15
  "solid/imports": "error",
16
16
  "solid/jsx-no-duplicate-props": "error",
17
- "solid/jsx-no-undef": "error",
18
17
  "solid/jsx-no-script-url": "error",
18
+ "solid/jsx-no-undef": "error",
19
19
  "solid/jsx-uses-vars": "error",
20
+ "solid/no-array-handlers": "error",
20
21
  "solid/no-destructure": "error",
21
22
  "solid/no-innerhtml": "error",
22
23
  "solid/no-proxy-apis": "off",
@@ -29,6 +30,5 @@ export default tseslint.config({
29
30
  "solid/reactivity": "error",
30
31
  "solid/self-closing-comp": "error",
31
32
  "solid/style-prop": "error",
32
- "solid/no-array-handlers": "error",
33
33
  },
34
34
  });
package/eslint.config.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { fixupPluginRules } from "@eslint/compat";
1
2
  import { ignores, languageOptions } from "./constants.js";
2
3
  import a11y from "eslint-plugin-jsx-a11y/lib/index.js";
3
4
  import barrel from "eslint-plugin-barrel-files";
@@ -32,7 +33,7 @@ export default tseslint.config(
32
33
  "@typescript-eslint": tseslint.plugin,
33
34
  unicorn: unicorn,
34
35
  lodash: lodashConfig,
35
- sonar: sonar,
36
+ sonar: fixupPluginRules(sonar),
36
37
  ethang: ethang,
37
38
  "@tanstack/query": tanstack,
38
39
  tailwind: tailwind,
@@ -252,11 +253,13 @@ export default tseslint.config(
252
253
  "n/file-extension-in-import": "off",
253
254
  "n/global-require": "off",
254
255
  "n/handle-callback-err": "error",
256
+ "n/hashbang": "off",
255
257
  "n/no-callback-literal": "off",
256
258
  "n/no-deprecated-api": "error",
257
259
  "n/no-exports-assign": "error",
258
260
  "n/no-extraneous-import": "error",
259
261
  "n/no-extraneous-require": "error",
262
+ "n/no-hide-core-modules": "off",
260
263
  "n/no-missing-import": "off",
261
264
  "n/no-missing-require": "error",
262
265
  "n/no-mixed-requires": "off",
@@ -278,14 +281,12 @@ export default tseslint.config(
278
281
  "n/prefer-global/process": "error",
279
282
  "n/prefer-global/text-decoder": "error",
280
283
  "n/prefer-global/text-encoder": "error",
281
- "n/prefer-global/url-search-params": "error",
282
284
  "n/prefer-global/url": "error",
285
+ "n/prefer-global/url-search-params": "error",
283
286
  "n/prefer-node-protocol": "error",
284
287
  "n/prefer-promises/dns": "off",
285
288
  "n/prefer-promises/fs": "off",
286
289
  "n/process-exit-as-throw": "off",
287
- "n/hashbang": "off",
288
- "n/no-hide-core-modules": "off",
289
290
  "n/shebang": "off",
290
291
  "@typescript-eslint/adjacent-overload-signatures": "off",
291
292
  "@typescript-eslint/array-type": "error",
@@ -441,12 +442,14 @@ export default tseslint.config(
441
442
  "unicorn/expiring-todo-comments": "error",
442
443
  "unicorn/explicit-length-check": "off",
443
444
  "unicorn/filename-case": "error",
445
+ "unicorn/import-index": "off",
444
446
  "unicorn/import-style": "error",
445
447
  "unicorn/new-for-builtins": "error",
446
448
  "unicorn/no-abusive-eslint-disable": "error",
447
449
  "unicorn/no-anonymous-default-export": "error",
448
450
  "unicorn/no-array-callback-reference": "error",
449
451
  "unicorn/no-array-for-each": "error",
452
+ "unicorn/no-array-instanceof": "off",
450
453
  "unicorn/no-array-method-this-argument": "error",
451
454
  "unicorn/no-array-push-push": "error",
452
455
  "unicorn/no-array-reduce": "error",
@@ -455,6 +458,7 @@ export default tseslint.config(
455
458
  "unicorn/no-console-spaces": "error",
456
459
  "unicorn/no-document-cookie": "error",
457
460
  "unicorn/no-empty-file": "error",
461
+ "unicorn/no-fn-reference-in-iterator": "off",
458
462
  "unicorn/no-for-loop": "error",
459
463
  "unicorn/no-hex-escape": "error",
460
464
  "unicorn/no-instanceof-array": "error",
@@ -472,6 +476,7 @@ export default tseslint.config(
472
476
  "unicorn/no-null": "off",
473
477
  "unicorn/no-object-as-default-parameter": "error",
474
478
  "unicorn/no-process-exit": "error",
479
+ "unicorn/no-reduce": "off",
475
480
  "unicorn/no-single-promise-in-promise-methods": "error",
476
481
  "unicorn/no-static-only-class": "error",
477
482
  "unicorn/no-thenable": "error",
@@ -481,6 +486,7 @@ export default tseslint.config(
481
486
  "unicorn/no-unnecessary-polyfills": "error",
482
487
  "unicorn/no-unreadable-array-destructuring": "error",
483
488
  "unicorn/no-unreadable-iife": "error",
489
+ "unicorn/no-unsafe-regex": "off",
484
490
  "unicorn/no-unused-properties": "error",
485
491
  "unicorn/no-useless-fallback-in-spread": "error",
486
492
  "unicorn/no-useless-length-check": "error",
@@ -493,21 +499,25 @@ export default tseslint.config(
493
499
  "unicorn/numeric-separators-style": "error",
494
500
  "unicorn/prefer-add-event-listener": "error",
495
501
  "unicorn/prefer-array-find": "error",
496
- "unicorn/prefer-array-flat-map": "error",
497
502
  "unicorn/prefer-array-flat": "error",
503
+ "unicorn/prefer-array-flat-map": "error",
498
504
  "unicorn/prefer-array-index-of": "error",
499
505
  "unicorn/prefer-array-some": "error",
500
506
  "unicorn/prefer-at": "error",
501
507
  "unicorn/prefer-blob-reading-methods": "error",
502
508
  "unicorn/prefer-code-point": "error",
509
+ "unicorn/prefer-dataset": "off",
503
510
  "unicorn/prefer-date-now": "error",
504
511
  "unicorn/prefer-default-parameters": "error",
505
512
  "unicorn/prefer-dom-node-append": "error",
506
513
  "unicorn/prefer-dom-node-dataset": "error",
507
514
  "unicorn/prefer-dom-node-remove": "error",
508
515
  "unicorn/prefer-dom-node-text-content": "error",
516
+ "unicorn/prefer-event-key": "off",
509
517
  "unicorn/prefer-event-target": "error",
518
+ "unicorn/prefer-exponentiation-operator": "off",
510
519
  "unicorn/prefer-export-from": "error",
520
+ "unicorn/prefer-flat-map": "off",
511
521
  "unicorn/prefer-includes": "error",
512
522
  "unicorn/prefer-json-parse-buffer": "error",
513
523
  "unicorn/prefer-keyboard-event-key": "error",
@@ -518,17 +528,22 @@ export default tseslint.config(
518
528
  "unicorn/prefer-module": "error",
519
529
  "unicorn/prefer-native-coercion-functions": "error",
520
530
  "unicorn/prefer-negative-index": "error",
531
+ "unicorn/prefer-node-append": "off",
521
532
  "unicorn/prefer-node-protocol": "error",
533
+ "unicorn/prefer-node-remove": "off",
522
534
  "unicorn/prefer-number-properties": "error",
523
535
  "unicorn/prefer-object-from-entries": "error",
536
+ "unicorn/prefer-object-has-own": "off",
524
537
  "unicorn/prefer-optional-catch-binding": "error",
525
538
  "unicorn/prefer-prototype-methods": "error",
526
539
  "unicorn/prefer-query-selector": "error",
527
540
  "unicorn/prefer-reflect-apply": "error",
528
541
  "unicorn/prefer-regexp-test": "error",
542
+ "unicorn/prefer-replace-all": "off",
529
543
  "unicorn/prefer-set-has": "error",
530
544
  "unicorn/prefer-set-size": "error",
531
545
  "unicorn/prefer-spread": "error",
546
+ "unicorn/prefer-starts-ends-with": "off",
532
547
  "unicorn/prefer-string-raw": "error",
533
548
  "unicorn/prefer-string-replace-all": "error",
534
549
  "unicorn/prefer-string-slice": "error",
@@ -537,9 +552,12 @@ export default tseslint.config(
537
552
  "unicorn/prefer-structured-clone": "error",
538
553
  "unicorn/prefer-switch": "error",
539
554
  "unicorn/prefer-ternary": "error",
555
+ "unicorn/prefer-text-content": "off",
540
556
  "unicorn/prefer-top-level-await": "error",
557
+ "unicorn/prefer-trim-start-end": "off",
541
558
  "unicorn/prefer-type-error": "error",
542
559
  "unicorn/prevent-abbreviations": "error",
560
+ "unicorn/regex-shorthand": "off",
543
561
  "unicorn/relative-url-style": "error",
544
562
  "unicorn/require-array-join-separator": "error",
545
563
  "unicorn/require-number-to-fixed-digits-argument": "error",
@@ -549,23 +567,6 @@ export default tseslint.config(
549
567
  "unicorn/template-indent": "off",
550
568
  "unicorn/text-encoding-identifier-case": "error",
551
569
  "unicorn/throw-new-error": "error",
552
- "unicorn/import-index": "off",
553
- "unicorn/no-array-instanceof": "off",
554
- "unicorn/no-fn-reference-in-iterator": "off",
555
- "unicorn/no-reduce": "off",
556
- "unicorn/no-unsafe-regex": "off",
557
- "unicorn/prefer-dataset": "off",
558
- "unicorn/prefer-event-key": "off",
559
- "unicorn/prefer-exponentiation-operator": "off",
560
- "unicorn/prefer-flat-map": "off",
561
- "unicorn/prefer-node-append": "off",
562
- "unicorn/prefer-node-remove": "off",
563
- "unicorn/prefer-object-has-own": "off",
564
- "unicorn/prefer-replace-all": "off",
565
- "unicorn/prefer-starts-ends-with": "off",
566
- "unicorn/prefer-text-content": "off",
567
- "unicorn/prefer-trim-start-end": "off",
568
- "unicorn/regex-shorthand": "off",
569
570
  "lodash/callback-binding": "error",
570
571
  "lodash/chain-style": ["error", "as-needed"],
571
572
  "lodash/chaining": "error",
@@ -850,6 +851,7 @@ export default tseslint.config(
850
851
  "sonar/object-shorthand": "error",
851
852
  "sonar/operation-returning-nan": "error",
852
853
  "sonar/os-command": "error",
854
+ "sonar/pluginRules-of-hooks": "error",
853
855
  "sonar/post-message": "error",
854
856
  "sonar/prefer-default-last": "error",
855
857
  "sonar/prefer-enum-initializers": "error",
@@ -876,7 +878,6 @@ export default tseslint.config(
876
878
  "sonar/redundant-type-aliases": "error",
877
879
  "sonar/regex-complexity": "error",
878
880
  "sonar/regular-expr": "off",
879
- "sonar/pluginRules-of-hooks": "error",
880
881
  "sonar/semi": "off",
881
882
  "sonar/session-regeneration": "error",
882
883
  "sonar/shorthand-property-grouping": "off",
@@ -936,9 +937,9 @@ export default tseslint.config(
936
937
  "sonar/xpath": "off",
937
938
  "ethang/handle-native-error": "error",
938
939
  "@tanstack/query/exhaustive-deps": "error",
939
- "@tanstack/query/stable-query-client": "error",
940
940
  "@tanstack/query/no-rest-destructuring": "error",
941
941
  "@tanstack/query/no-unstable-deps": "error",
942
+ "@tanstack/query/stable-query-client": "error",
942
943
  "tailwind/classnames-order": "error",
943
944
  "tailwind/enforces-negative-arbitrary-values": "error",
944
945
  "tailwind/enforces-shorthand": "error",
@@ -1065,38 +1066,14 @@ export default tseslint.config(
1065
1066
  "stylistic/wrap-iife": "error",
1066
1067
  "stylistic/wrap-regex": "error",
1067
1068
  "stylistic/yield-star-spacing": "error",
1068
- "perfectionist/sort-variable-declarations": [
1069
- "error",
1070
- { order: "asc", type: "alphabetical" },
1071
- ],
1072
- "perfectionist/sort-intersection-types": "error",
1073
- "perfectionist/sort-svelte-attributes": [
1074
- "error",
1075
- { groups: ["svelte-shorthand", "shorthand", "multiline"] },
1076
- ],
1069
+ "perfectionist/sort-array-includes": "error",
1077
1070
  "perfectionist/sort-astro-attributes": [
1078
1071
  "error",
1079
1072
  { groups: ["astro-shorthand", "shorthand", "multiline"] },
1080
1073
  ],
1081
- "perfectionist/sort-vue-attributes": [
1082
- "error",
1083
- { groups: ["shorthand", "multiline"] },
1084
- ],
1085
- "perfectionist/sort-array-includes": "error",
1086
- "perfectionist/sort-named-imports": "error",
1087
- "perfectionist/sort-named-exports": "error",
1088
- "perfectionist/sort-object-types": "error",
1089
- "perfectionist/sort-union-types": "error",
1090
- "perfectionist/sort-switch-case": [
1091
- "error",
1092
- { order: "asc", type: "alphabetical" },
1093
- ],
1094
- "perfectionist/sort-interfaces": "error",
1095
- "perfectionist/sort-jsx-props": [
1096
- "error",
1097
- { groups: ["shorthand", "multiline"] },
1098
- ],
1099
1074
  "perfectionist/sort-classes": "error",
1075
+ "perfectionist/sort-enums": "error",
1076
+ "perfectionist/sort-exports": "error",
1100
1077
  "perfectionist/sort-imports": [
1101
1078
  "error",
1102
1079
  {
@@ -1113,11 +1090,35 @@ export default tseslint.config(
1113
1090
  newlinesBetween: "always",
1114
1091
  },
1115
1092
  ],
1116
- "perfectionist/sort-exports": "error",
1093
+ "perfectionist/sort-interfaces": "error",
1094
+ "perfectionist/sort-intersection-types": "error",
1095
+ "perfectionist/sort-jsx-props": [
1096
+ "error",
1097
+ { groups: ["shorthand", "multiline"] },
1098
+ ],
1099
+ "perfectionist/sort-maps": "error",
1100
+ "perfectionist/sort-named-exports": "error",
1101
+ "perfectionist/sort-named-imports": "error",
1102
+ "perfectionist/sort-object-types": "error",
1117
1103
  "perfectionist/sort-objects": "error",
1118
- "perfectionist/sort-enums": "error",
1119
1104
  "perfectionist/sort-sets": "error",
1120
- "perfectionist/sort-maps": "error",
1105
+ "perfectionist/sort-svelte-attributes": [
1106
+ "error",
1107
+ { groups: ["svelte-shorthand", "shorthand", "multiline"] },
1108
+ ],
1109
+ "perfectionist/sort-switch-case": [
1110
+ "error",
1111
+ { order: "asc", type: "alphabetical" },
1112
+ ],
1113
+ "perfectionist/sort-union-types": "error",
1114
+ "perfectionist/sort-variable-declarations": [
1115
+ "error",
1116
+ { order: "asc", type: "alphabetical" },
1117
+ ],
1118
+ "perfectionist/sort-vue-attributes": [
1119
+ "error",
1120
+ { groups: ["shorthand", "multiline"] },
1121
+ ],
1121
1122
  "a11y/accessible-emoji": "off",
1122
1123
  "a11y/alt-text": "error",
1123
1124
  "a11y/anchor-ambiguous-text": "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethang/eslint-config",
3
- "version": "19.4.4",
3
+ "version": "19.4.6",
4
4
  "repository": {
5
5
  "url": "git+https://github.com/eglove/eslint-config-ethang.git"
6
6
  },
@@ -13,15 +13,15 @@
13
13
  "lint": "prettier . -w"
14
14
  },
15
15
  "dependencies": {
16
- "@eslint-react/eslint-plugin": "^1.13.1",
16
+ "@eslint-react/eslint-plugin": "^1.14.0",
17
17
  "@eslint/compat": "^1.1.1",
18
18
  "@eslint/js": "^9.10.0",
19
19
  "@eslint/json": "^0.4.0",
20
20
  "@eslint/markdown": "^6.1.0",
21
- "@ethang/eslint-plugin": "^0.0.8",
22
- "@stylistic/eslint-plugin": "^2.7.2",
21
+ "@ethang/eslint-plugin": "^0.0.9",
22
+ "@stylistic/eslint-plugin": "^2.8.0",
23
23
  "@tanstack/eslint-plugin-query": "^5.53.0",
24
- "@typescript-eslint/parser": "^8.4.0",
24
+ "@typescript-eslint/parser": "^8.5.0",
25
25
  "eslint": "^9.10.0",
26
26
  "eslint-plugin-astro": "^1.2.3",
27
27
  "eslint-plugin-barrel-files": "^2.1.0",
@@ -36,8 +36,8 @@
36
36
  "eslint-plugin-sonarjs": "2.0.2",
37
37
  "eslint-plugin-tailwindcss": "^3.17.4",
38
38
  "eslint-plugin-unicorn": "^55.0.0",
39
- "typescript": "^5.5.4",
40
- "typescript-eslint": "^8.4.0"
39
+ "typescript": "^5.6.2",
40
+ "typescript-eslint": "^8.5.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@ethang/markdown-generator": "^1.1.1",
@@ -47,15 +47,15 @@
47
47
  "prettier": "^3.3.3"
48
48
  },
49
49
  "peerDependencies": {
50
- "@eslint-react/eslint-plugin": "^1.13.1",
50
+ "@eslint-react/eslint-plugin": "^1.14.0",
51
51
  "@eslint/compat": "^1.1.1",
52
52
  "@eslint/js": "^9.10.0",
53
53
  "@eslint/json": "^0.4.0",
54
54
  "@eslint/markdown": "^6.1.0",
55
- "@ethang/eslint-plugin": "^0.0.8",
56
- "@stylistic/eslint-plugin": "^2.7.2",
55
+ "@ethang/eslint-plugin": "^0.0.9",
56
+ "@stylistic/eslint-plugin": "^2.8.0",
57
57
  "@tanstack/eslint-plugin-query": "^5.53.0",
58
- "@typescript-eslint/parser": "^8.4.0",
58
+ "@typescript-eslint/parser": "^8.5.0",
59
59
  "eslint": "^9.10.0",
60
60
  "eslint-plugin-astro": "^1.2.3",
61
61
  "eslint-plugin-barrel-files": "^2.1.0",
@@ -70,8 +70,8 @@
70
70
  "eslint-plugin-sonarjs": "2.0.2",
71
71
  "eslint-plugin-tailwindcss": "^3.17.4",
72
72
  "eslint-plugin-unicorn": "^55.0.0",
73
- "typescript": "^5.5.4",
74
- "typescript-eslint": "^8.4.0"
73
+ "typescript": "^5.6.2",
74
+ "typescript-eslint": "^8.5.0"
75
75
  },
76
76
  "engines": {
77
77
  "node": ">=20"
package/setup/sonar.js CHANGED
@@ -30,16 +30,16 @@ const customRules = [
30
30
  { name: "no-extra-semi", rule: "off" },
31
31
  { name: "no-implicit-dependencies", rule: "off" },
32
32
  { name: "no-inconsistent-returns", rule: "off" },
33
- { name: "no-redundant-parentheses", rule: "off" }, // Not working correctly, TS can handle this
34
- { name: "no-reference-error", rule: "off" }, // Not working correctly, TS can handle this
35
- { name: "no-tab", rule: "off" }, // Not working correctly, TS can handle this
33
+ { name: "no-redundant-parentheses", rule: "off" },
34
+ { name: "no-reference-error", rule: "off" }, // TODO bug: reports globals
35
+ { name: "no-tab", rule: "off" },
36
36
  { name: "no-undefined-assignment", rule: "off" },
37
37
  { name: "process-argv", rule: "off" },
38
38
  { name: "regular-expr", rule: "off" },
39
39
  { name: "semi", rule: "off" },
40
40
  { name: "shorthand-property-grouping", rule: "off" }, // Conflicts with perfectionist sorting
41
41
  { name: "sockets", rule: "off" },
42
- { name: "sonar-no-fallthrough", rule: "off" }, // TODO v9 compatibility?
42
+ { name: "sonar-no-fallthrough", rule: "off" }, // TODO readd with v9 compat?
43
43
  { name: "sonar-no-magic-numbers", rule: "off" },
44
44
  { name: "standard-input", rule: "off" },
45
45
  { name: "switch-without-default", rule: "off" }, // @typescript-eslint/switch-exhaustiveness-check works better