eslint-config-heck 11.3.1 → 11.4.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/.claude/commands/update-unicorn.md +68 -0
- package/biomeJsTs.json +1 -0
- package/nodeWithBiome.js +10 -4
- package/package.json +11 -11
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Update eslint-plugin-unicorn
|
|
2
|
+
|
|
3
|
+
You are helping migrate `eslint-plugin-unicorn` to a new major version in this project.
|
|
4
|
+
|
|
5
|
+
## What this task involves
|
|
6
|
+
|
|
7
|
+
1. Determine the currently configured unicorn version range and the newly installed version:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cat node_modules/eslint-plugin-unicorn/package.json | grep '"version"'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
2. Fetch the GitHub release notes for every new major version since the last one:
|
|
14
|
+
`https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/vXX.0.0`
|
|
15
|
+
|
|
16
|
+
For each release, extract:
|
|
17
|
+
- **New rules** (name + one-sentence description of what it does)
|
|
18
|
+
- **Breaking changes**: renamed rules, removed rules, rules moved out of `recommended`
|
|
19
|
+
|
|
20
|
+
3. Handle breaking changes first (before adding new rules):
|
|
21
|
+
- **Renamed rule**: Remove the old name from `nodeWithBiome.js`, add the new name at the correct alphabetical position with the same severity.
|
|
22
|
+
- **Removed rule**: Remove its entry from `nodeWithBiome.js`.
|
|
23
|
+
- **Moved out of recommended**: Keep it in the config if already present; no action needed.
|
|
24
|
+
|
|
25
|
+
4. For all new rules, check for Biome equivalents:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
grep -i "<keyword>" node_modules/@biomejs/biome/configuration_schema.json | grep -v "Configuration\|Options\|RuleWith\|definitions" | head -20
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Use descriptive keywords from the rule name and purpose. Check multiple keywords if uncertain.
|
|
32
|
+
|
|
33
|
+
5. Assign severities using these rules (in priority order):
|
|
34
|
+
- If **Biome covers the same case** → `"off"` (add a `// Biome: <ruleName>` comment)
|
|
35
|
+
- If an **ESLint core rule covers the same case** → `"error"` (unicorn version is preferred over ESLint core)
|
|
36
|
+
- If the rule is **niche/very domain-specific** (canvas-only, stage 3 proposal not widely available, non-JavaScript rule, etc.) → `"off"` with a brief comment
|
|
37
|
+
- Otherwise → `"error"`
|
|
38
|
+
|
|
39
|
+
6. Present the rules to the user in themed batches (grouped by prefix: `no-*`, `prefer-*`, etc.) with the proposed severity and rationale for any `"off"` assignments. Wait for confirmation before inserting.
|
|
40
|
+
|
|
41
|
+
7. Insert confirmed rules into `nodeWithBiome.js` in **strict alphabetical order** within the unicorn rules block. The unicorn rules are sorted alphabetically by rule name. To find the right insertion point:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
grep -n "unicorn/prefer-<neighbor>" nodeWithBiome.js
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Key facts about this project
|
|
48
|
+
|
|
49
|
+
- Config file: `nodeWithBiome.js` (ESLint flat config format)
|
|
50
|
+
- Biome schema for equivalents check: `node_modules/@biomejs/biome/configuration_schema.json`
|
|
51
|
+
- Unicorn rules block is sorted alphabetically within each logical group
|
|
52
|
+
- The project uses Biome as a parallel linter; rules covered by Biome must be set to `"off"` to avoid duplication
|
|
53
|
+
|
|
54
|
+
## Past Biome equivalents (already handled — do not re-disable)
|
|
55
|
+
|
|
56
|
+
| Unicorn rule | Biome rule |
|
|
57
|
+
|---|---|
|
|
58
|
+
| `no-incorrect-template-string-interpolation` | `noTemplateCurlyInString` |
|
|
59
|
+
| `no-useless-boolean-cast` | `noExtraBooleanCast` |
|
|
60
|
+
| `no-useless-concat` | `noUselessStringConcat` |
|
|
61
|
+
| `no-useless-continue` | `noUselessContinue` |
|
|
62
|
+
| `no-useless-else` | `noUselessElse` |
|
|
63
|
+
| `no-useless-template-literals` | `noUnusedTemplateLiteral` |
|
|
64
|
+
| `operator-assignment` | `useShorthandAssign` |
|
|
65
|
+
| `prefer-array-flat-map` | `useFlatMap` |
|
|
66
|
+
| `prefer-array-slice` | `noSubstr` |
|
|
67
|
+
| `prefer-else-if` | `useCollapsedElseIf` |
|
|
68
|
+
| `prefer-global-number-constants` | `useNumberNamespace` |
|
package/biomeJsTs.json
CHANGED
package/nodeWithBiome.js
CHANGED
|
@@ -212,7 +212,6 @@ export default [
|
|
|
212
212
|
"no-regex-spaces": "off",
|
|
213
213
|
"no-restricted-exports": "off",
|
|
214
214
|
"no-restricted-globals": "off",
|
|
215
|
-
"no-restricted-imports": "off",
|
|
216
215
|
"no-restricted-properties": "off",
|
|
217
216
|
"no-restricted-syntax": "off",
|
|
218
217
|
"no-return-assign": "off",
|
|
@@ -544,11 +543,13 @@ export default [
|
|
|
544
543
|
"unicorn/no-manually-wrapped-comments": "error",
|
|
545
544
|
"unicorn/no-mismatched-map-key": "error",
|
|
546
545
|
"unicorn/no-misrefactored-assignment": "error",
|
|
546
|
+
"unicorn/no-missing-local-resource": "off",
|
|
547
|
+
"unicorn/no-multiple-promise-resolver-calls": "error",
|
|
547
548
|
"unicorn/no-named-default": "error",
|
|
548
549
|
"unicorn/no-negated-array-predicate": "error",
|
|
549
550
|
"unicorn/no-negated-comparison": "error",
|
|
550
551
|
"unicorn/no-negated-condition": "off",
|
|
551
|
-
"unicorn/no-negation-in-equality-check": "
|
|
552
|
+
"unicorn/no-negation-in-equality-check": "off",
|
|
552
553
|
"unicorn/no-nested-ternary": "off",
|
|
553
554
|
"unicorn/no-new-array": "error",
|
|
554
555
|
"unicorn/no-new-buffer": "error",
|
|
@@ -562,6 +563,7 @@ export default [
|
|
|
562
563
|
"unicorn/no-redundant-comparison": "error",
|
|
563
564
|
"unicorn/no-return-array-push": "off",
|
|
564
565
|
"unicorn/no-selector-as-dom-name": "error",
|
|
566
|
+
"unicorn/no-shorthand-property-overrides": "off",
|
|
565
567
|
"unicorn/no-single-promise-in-promise-methods": "error",
|
|
566
568
|
"unicorn/no-static-only-class": "off",
|
|
567
569
|
"unicorn/no-subtraction-comparison": "error",
|
|
@@ -570,6 +572,7 @@ export default [
|
|
|
570
572
|
"unicorn/no-this-outside-of-class": "error",
|
|
571
573
|
"unicorn/no-top-level-assignment-in-function": "error",
|
|
572
574
|
"unicorn/no-top-level-side-effects": "error",
|
|
575
|
+
"unicorn/no-transition-all": "off",
|
|
573
576
|
"unicorn/no-unnecessary-array-flat-depth": "error",
|
|
574
577
|
"unicorn/no-unnecessary-array-splice-count": "error",
|
|
575
578
|
"unicorn/no-unnecessary-await": "error",
|
|
@@ -579,6 +582,7 @@ export default [
|
|
|
579
582
|
"unicorn/no-unnecessary-nested-ternary": "off",
|
|
580
583
|
"unicorn/no-unnecessary-slice-end": "error",
|
|
581
584
|
"unicorn/no-unnecessary-splice": "error",
|
|
585
|
+
"unicorn/no-unnecessary-string-trim": "off",
|
|
582
586
|
"unicorn/no-unreadable-array-destructuring": "error",
|
|
583
587
|
"unicorn/no-unreadable-for-of-expression": "error",
|
|
584
588
|
"unicorn/no-unreadable-iife": "error",
|
|
@@ -606,6 +610,7 @@ export default [
|
|
|
606
610
|
"unicorn/no-useless-logical-operand": "error",
|
|
607
611
|
"unicorn/no-useless-override": "error",
|
|
608
612
|
"unicorn/no-useless-promise-resolve-reject": "error",
|
|
613
|
+
"unicorn/no-useless-re-export": "error",
|
|
609
614
|
"unicorn/no-useless-recursion": "error",
|
|
610
615
|
"unicorn/no-useless-spread": "error",
|
|
611
616
|
"unicorn/no-useless-switch-case": "off",
|
|
@@ -657,6 +662,7 @@ export default [
|
|
|
657
662
|
"unicorn/prefer-else-if": "off",
|
|
658
663
|
"unicorn/prefer-error-is-error": "error",
|
|
659
664
|
"unicorn/prefer-event-target": "off",
|
|
665
|
+
"unicorn/prefer-explicit-viewport-units": "off",
|
|
660
666
|
"unicorn/prefer-export-from": "off",
|
|
661
667
|
"unicorn/prefer-flat-math-min-max": "error",
|
|
662
668
|
"unicorn/prefer-get-or-insert-computed": "error",
|
|
@@ -739,6 +745,7 @@ export default [
|
|
|
739
745
|
"unicorn/prefer-temporal": "off",
|
|
740
746
|
// TODO: off until there is a solution to this: https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1079
|
|
741
747
|
"unicorn/prefer-ternary": "off",
|
|
748
|
+
"unicorn/prefer-then-catch": "error",
|
|
742
749
|
"unicorn/prefer-toggle-attribute": "error",
|
|
743
750
|
"unicorn/prefer-top-level-await": "off",
|
|
744
751
|
"unicorn/prefer-type-error": "error",
|
|
@@ -754,6 +761,7 @@ export default [
|
|
|
754
761
|
"unicorn/require-array-join-separator": "error",
|
|
755
762
|
"unicorn/require-array-sort-compare": "off",
|
|
756
763
|
"unicorn/require-css-escape": "error",
|
|
764
|
+
"unicorn/require-frontmatter-fields": "off",
|
|
757
765
|
"unicorn/require-module-attributes": "error",
|
|
758
766
|
"unicorn/require-module-specifiers": "off",
|
|
759
767
|
"unicorn/require-number-to-fixed-digits-argument": "off",
|
|
@@ -917,8 +925,6 @@ export default [
|
|
|
917
925
|
"@typescript-eslint/no-redeclare": "off",
|
|
918
926
|
"@typescript-eslint/no-redundant-type-constituents": "error",
|
|
919
927
|
"@typescript-eslint/no-require-imports": "off",
|
|
920
|
-
"no-restricted-imports": "off",
|
|
921
|
-
"@typescript-eslint/no-restricted-imports": "off",
|
|
922
928
|
"@typescript-eslint/no-restricted-types": "off",
|
|
923
929
|
"no-shadow": "off",
|
|
924
930
|
"@typescript-eslint/no-shadow": "off",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-heck",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.0",
|
|
4
4
|
"description": "Contains an ESLint configuration for ES2015+, TypeScript, and React.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
"author": "atheck",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@biomejs/biome": "2.5.
|
|
31
|
+
"@biomejs/biome": "2.5.5",
|
|
32
32
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
34
|
-
"@typescript-eslint/parser": "8.
|
|
35
|
-
"@eslint-react/eslint-plugin": "5.
|
|
36
|
-
"eslint": "10.
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "8.65.0",
|
|
34
|
+
"@typescript-eslint/parser": "8.65.0",
|
|
35
|
+
"@eslint-react/eslint-plugin": "5.18.0",
|
|
36
|
+
"eslint": "10.7.0",
|
|
37
37
|
"eslint-import-resolver-typescript": "4.4.5",
|
|
38
38
|
"eslint-plugin-import-x": "4.17.1",
|
|
39
|
-
"eslint-plugin-jest": "29.15.
|
|
39
|
+
"eslint-plugin-jest": "29.15.5",
|
|
40
40
|
"eslint-plugin-testing-library": "7.16.2",
|
|
41
|
-
"eslint-plugin-unicorn": "
|
|
42
|
-
"typescript": "
|
|
41
|
+
"eslint-plugin-unicorn": "72.0.0",
|
|
42
|
+
"typescript": "6.0.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@testing-library/dom": "10.4.1",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"@types/react": "19.2.17",
|
|
49
49
|
"globals": "17.7.0",
|
|
50
50
|
"jest": "30.4.2",
|
|
51
|
-
"react": "19.2.
|
|
52
|
-
"semantic-release": "25.0.
|
|
51
|
+
"react": "19.2.8",
|
|
52
|
+
"semantic-release": "25.0.8"
|
|
53
53
|
},
|
|
54
54
|
"repository": {
|
|
55
55
|
"type": "git",
|