lint-suite 3.0.0 → 3.0.2
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/CHANGELOG.md +82 -0
- package/README.md +12 -9
- package/eslint.js +41 -36
- package/package.json +23 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,85 @@
|
|
|
1
|
+
## 3.0.2 (2026-10-25)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated eslint-arrow-fits-line to 1.0.2
|
|
6
|
+
- Updated eslint-chain-fits-line to 1.0.2
|
|
7
|
+
- Updated eslint-chain-receiver-name to 1.0.2
|
|
8
|
+
- Updated eslint-explicit-accessibility to 1.0.2
|
|
9
|
+
- Updated eslint-max-condition-operands to 1.0.2
|
|
10
|
+
- Updated eslint-modular-boundaries to 1.0.2
|
|
11
|
+
- Updated eslint-no-call-in-condition to 1.0.2
|
|
12
|
+
- Updated eslint-no-grouped-condition to 1.0.2
|
|
13
|
+
- Updated eslint-no-inline-object-types to 1.0.2
|
|
14
|
+
- Updated eslint-no-inline-return-object to 1.0.2
|
|
15
|
+
- Updated eslint-no-nested-object-value to 1.0.2
|
|
16
|
+
- Updated eslint-no-spread-expression to 1.0.2
|
|
17
|
+
- Updated eslint-no-unused-exports to 1.0.2
|
|
18
|
+
- Updated eslint-one-line-guard to 1.0.2
|
|
19
|
+
- Updated eslint-readonly-type-properties to 1.0.2
|
|
20
|
+
- Updated eslint-ternary-branch-shape to 1.0.2
|
|
21
|
+
- Updated eslint-test-file-shape to 1.0.2
|
|
22
|
+
- Updated eslint-type-placement to 1.0.2
|
|
23
|
+
- Updated eslint-util-purity to 1.0.2
|
|
24
|
+
- Updated eslint-no-unused-angular-fields to 1.0.2
|
|
25
|
+
- Updated eslint-no-unstyled-classes to 1.0.2
|
|
26
|
+
- Updated stylelint-no-unused-classes to 2.0.2
|
|
27
|
+
|
|
28
|
+
## 3.0.1 (2026-10-24)
|
|
29
|
+
|
|
30
|
+
### 🚀 Features
|
|
31
|
+
|
|
32
|
+
- ⚠️ **lint-suite:** 💥 register only @smarttools/rxjs in the rxjs preset ([4f73a87](https://github.com/F0rty-Tw0/lint-suite/commit/4f73a87))
|
|
33
|
+
|
|
34
|
+
### 🩹 Fixes
|
|
35
|
+
|
|
36
|
+
- **lint-suite:** 🐛 lint nested .storybook/main configs in the storybook preset ([3605ce1](https://github.com/F0rty-Tw0/lint-suite/commit/3605ce1))
|
|
37
|
+
- **lint-suite:** 🐛 stop rewriting index imports to directory imports ([6484fa2](https://github.com/F0rty-Tw0/lint-suite/commit/6484fa2))
|
|
38
|
+
- **lint-suite:** 🐛 cover .storybook/main and all story extensions in the storybook preset ([a277d47](https://github.com/F0rty-Tw0/lint-suite/commit/a277d47))
|
|
39
|
+
- **lint-suite:** 🐛 parse JSONC config files in the json preset ([417280e](https://github.com/F0rty-Tw0/lint-suite/commit/417280e))
|
|
40
|
+
|
|
41
|
+
### ⚠️ Breaking Changes
|
|
42
|
+
|
|
43
|
+
- **lint-suite:** 💥 register only @smarttools/rxjs in the rxjs preset ([4f73a87](https://github.com/F0rty-Tw0/lint-suite/commit/4f73a87))
|
|
44
|
+
rxjs preset rule keys are renamed from `rxjs/<id>` to
|
|
45
|
+
`@smarttools/rxjs/<id>`: prefer-observer, finnish, no-ignored-subscription,
|
|
46
|
+
no-ignored-error, no-unsafe-switchmap, no-unsafe-catch, no-unsafe-first,
|
|
47
|
+
no-topromise, throw-error, no-async-subscribe, no-exposed-subjects,
|
|
48
|
+
no-cyclic-action, no-subscribe-handlers. The preset no longer sets
|
|
49
|
+
`rxjs/no-unsafe-takeuntil`; `@smarttools/rxjs/no-unsafe-takeuntil` follows the
|
|
50
|
+
plugin's recommended config.
|
|
51
|
+
Consumers that override any `rxjs/<id>` key must rename it, or ESLint reports
|
|
52
|
+
an unknown rule.
|
|
53
|
+
|
|
54
|
+
### 🧱 Updated Dependencies
|
|
55
|
+
|
|
56
|
+
- Updated eslint-arrow-fits-line to 1.0.1
|
|
57
|
+
- Updated eslint-chain-fits-line to 1.0.1
|
|
58
|
+
- Updated eslint-chain-receiver-name to 1.0.1
|
|
59
|
+
- Updated eslint-explicit-accessibility to 1.0.1
|
|
60
|
+
- Updated eslint-max-condition-operands to 1.0.1
|
|
61
|
+
- Updated eslint-modular-boundaries to 1.0.1
|
|
62
|
+
- Updated eslint-no-call-in-condition to 1.0.1
|
|
63
|
+
- Updated eslint-no-grouped-condition to 1.0.1
|
|
64
|
+
- Updated eslint-no-inline-object-types to 1.0.1
|
|
65
|
+
- Updated eslint-no-inline-return-object to 1.0.1
|
|
66
|
+
- Updated eslint-no-nested-object-value to 1.0.1
|
|
67
|
+
- Updated eslint-no-spread-expression to 1.0.1
|
|
68
|
+
- Updated eslint-no-unused-exports to 1.0.1
|
|
69
|
+
- Updated eslint-one-line-guard to 1.0.1
|
|
70
|
+
- Updated eslint-readonly-type-properties to 1.0.1
|
|
71
|
+
- Updated eslint-ternary-branch-shape to 1.0.1
|
|
72
|
+
- Updated eslint-test-file-shape to 1.0.1
|
|
73
|
+
- Updated eslint-type-placement to 1.0.1
|
|
74
|
+
- Updated eslint-util-purity to 1.0.1
|
|
75
|
+
- Updated eslint-no-unused-angular-fields to 1.0.1
|
|
76
|
+
- Updated eslint-no-unstyled-classes to 1.0.1
|
|
77
|
+
- Updated stylelint-no-unused-classes to 2.0.1
|
|
78
|
+
|
|
79
|
+
### ❤️ Thank You
|
|
80
|
+
|
|
81
|
+
- Artiom Tofan
|
|
82
|
+
|
|
1
83
|
# 3.0.0 (2026-10-13)
|
|
2
84
|
|
|
3
85
|
### 🧱 Updated Dependencies
|
package/README.md
CHANGED
|
@@ -480,8 +480,10 @@ modifier. `#private` members are ignored: TypeScript forbids a modifier there.
|
|
|
480
480
|
|
|
481
481
|
The `typescript` preset enables `local/readonly-type-properties`, which
|
|
482
482
|
reports primitive-typed properties in `type` aliases, interfaces, and
|
|
483
|
-
inline object types that are not marked `readonly`, and
|
|
484
|
-
|
|
483
|
+
inline object types that are not marked `readonly`, and suggests adding
|
|
484
|
+
the modifier. It is a suggestion, not an `eslint --fix` autofix, because
|
|
485
|
+
the rule cannot see assignments in other files and a forced `readonly`
|
|
486
|
+
would break them (TS2540). A property is primitive-typed when its annotation is
|
|
485
487
|
`string`, `number`, `boolean`, `bigint`, `symbol`, `null`, `undefined`, a
|
|
486
488
|
literal or template-literal type, or a union/intersection of those.
|
|
487
489
|
|
|
@@ -489,16 +491,17 @@ literal or template-literal type, or a union/intersection of those.
|
|
|
489
491
|
// Before
|
|
490
492
|
type User = { name: string; roles: string[]; profile: Profile };
|
|
491
493
|
|
|
492
|
-
// After
|
|
494
|
+
// After applying the suggestion
|
|
493
495
|
type User = { readonly name: string; roles: string[]; profile: Profile };
|
|
494
496
|
```
|
|
495
497
|
|
|
496
498
|
- Arrays, object types, type references (including string-union aliases
|
|
497
499
|
like `Status`), functions, and tuples are left untouched because the
|
|
498
500
|
rule is syntactic and does not resolve types.
|
|
499
|
-
- The same rule reports
|
|
501
|
+
- The same rule reports `readonly T[]` and `ReadonlyArray<T>` and suggests
|
|
500
502
|
`T[]`: the property reference is readonly, the array contents stay
|
|
501
|
-
mutable.
|
|
503
|
+
mutable. Also a suggestion, because passing a readonly value to the
|
|
504
|
+
rewritten type fails with TS4104.
|
|
502
505
|
- Index signatures, mapped types, and method signatures are out of scope.
|
|
503
506
|
- Use `// eslint-disable-next-line local/readonly-type-properties` when a
|
|
504
507
|
property genuinely needs to stay mutable.
|
|
@@ -778,10 +781,10 @@ The Prettier preset is published with `prettier` as a peer dependency. The Style
|
|
|
778
781
|
|
|
779
782
|
### @smarttools/eslint-plugin-rxjs
|
|
780
783
|
|
|
781
|
-
- `@rxjs/finnish`: Enforces Finnish notation for observables
|
|
782
|
-
- `@rxjs/no-exposed-subjects`: Enforces subject encapsulation
|
|
783
|
-
- `@rxjs/no-cyclic-action`: Prevents infinite loops in NgRx effects
|
|
784
|
-
- `@rxjs/no-unsafe-takeuntil`: Ensures proper usage of takeUntil operator
|
|
784
|
+
- `@smarttools/rxjs/finnish`: Enforces Finnish notation for observables
|
|
785
|
+
- `@smarttools/rxjs/no-exposed-subjects`: Enforces subject encapsulation
|
|
786
|
+
- `@smarttools/rxjs/no-cyclic-action`: Prevents infinite loops in NgRx effects
|
|
787
|
+
- `@smarttools/rxjs/no-unsafe-takeuntil`: Ensures proper usage of takeUntil operator
|
|
785
788
|
- ...
|
|
786
789
|
|
|
787
790
|
### eslint-plugin-storybook
|
package/eslint.js
CHANGED
|
@@ -578,6 +578,19 @@ var json = defineConfig9([
|
|
|
578
578
|
files: ["**/*.json"],
|
|
579
579
|
language: "json/json",
|
|
580
580
|
extends: [jsonPlugin.configs.recommended]
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
files: [
|
|
584
|
+
"**/tsconfig*.json",
|
|
585
|
+
"**/jsconfig*.json",
|
|
586
|
+
"**/.vscode/*.json",
|
|
587
|
+
"**/.devcontainer.json",
|
|
588
|
+
"**/.devcontainer/**/devcontainer.json",
|
|
589
|
+
"**/angular.json",
|
|
590
|
+
"**/.oxlintrc.json"
|
|
591
|
+
],
|
|
592
|
+
language: "json/jsonc",
|
|
593
|
+
languageOptions: { allowTrailingCommas: true }
|
|
581
594
|
}
|
|
582
595
|
]);
|
|
583
596
|
|
|
@@ -641,21 +654,6 @@ var rxjs = defineConfig12([
|
|
|
641
654
|
},
|
|
642
655
|
extends: [rxjsEslint.configs.recommended]
|
|
643
656
|
},
|
|
644
|
-
{
|
|
645
|
-
files: [
|
|
646
|
-
"**/*.js",
|
|
647
|
-
"**/*.jsx",
|
|
648
|
-
"**/*.cjs",
|
|
649
|
-
"**/*.mjs",
|
|
650
|
-
"**/*.ts",
|
|
651
|
-
"**/*.tsx",
|
|
652
|
-
"**/*.cts",
|
|
653
|
-
"**/*.mts"
|
|
654
|
-
],
|
|
655
|
-
plugins: {
|
|
656
|
-
rxjs: rxjsEslint
|
|
657
|
-
}
|
|
658
|
-
},
|
|
659
657
|
{
|
|
660
658
|
files: [
|
|
661
659
|
"**/*.js",
|
|
@@ -668,30 +666,29 @@ var rxjs = defineConfig12([
|
|
|
668
666
|
"**/*.mts"
|
|
669
667
|
],
|
|
670
668
|
rules: {
|
|
671
|
-
"rxjs/prefer-observer": "error",
|
|
672
|
-
"rxjs/finnish": "warn",
|
|
673
|
-
"rxjs/no-ignored-subscription": "warn",
|
|
674
|
-
"rxjs/no-ignored-error": "warn",
|
|
675
|
-
"rxjs/no-unsafe-switchmap": "error",
|
|
676
|
-
"rxjs/no-unsafe-
|
|
677
|
-
"rxjs/no-unsafe-
|
|
678
|
-
"rxjs/no-
|
|
679
|
-
"rxjs/
|
|
680
|
-
"rxjs/
|
|
681
|
-
"rxjs/no-
|
|
682
|
-
"rxjs/no-exposed-subjects": "error",
|
|
669
|
+
"@smarttools/rxjs/prefer-observer": "error",
|
|
670
|
+
"@smarttools/rxjs/finnish": "warn",
|
|
671
|
+
"@smarttools/rxjs/no-ignored-subscription": "warn",
|
|
672
|
+
"@smarttools/rxjs/no-ignored-error": "warn",
|
|
673
|
+
"@smarttools/rxjs/no-unsafe-switchmap": "error",
|
|
674
|
+
"@smarttools/rxjs/no-unsafe-catch": "error",
|
|
675
|
+
"@smarttools/rxjs/no-unsafe-first": "error",
|
|
676
|
+
"@smarttools/rxjs/no-topromise": "error",
|
|
677
|
+
"@smarttools/rxjs/throw-error": "error",
|
|
678
|
+
"@smarttools/rxjs/no-async-subscribe": "off",
|
|
679
|
+
"@smarttools/rxjs/no-exposed-subjects": "error",
|
|
683
680
|
// Enforce subject encapsulation
|
|
684
|
-
"rxjs/no-cyclic-action": "error",
|
|
681
|
+
"@smarttools/rxjs/no-cyclic-action": "error",
|
|
685
682
|
// Prevent infinite loops in NgRx effects
|
|
686
|
-
"rxjs/no-subscribe-handlers": "warn"
|
|
683
|
+
"@smarttools/rxjs/no-subscribe-handlers": "warn"
|
|
687
684
|
// Prefer observer objects (complements prefer-observer)
|
|
688
685
|
}
|
|
689
686
|
},
|
|
690
687
|
{
|
|
691
688
|
files: ["**/*.spec.ts", "**/*.test.ts", "**/*.spec.js", "**/*.test.js"],
|
|
692
689
|
rules: {
|
|
693
|
-
"rxjs/no-ignored-subscription": "off",
|
|
694
|
-
"rxjs/no-subscribe-handlers": "off"
|
|
690
|
+
"@smarttools/rxjs/no-ignored-subscription": "off",
|
|
691
|
+
"@smarttools/rxjs/no-subscribe-handlers": "off"
|
|
695
692
|
}
|
|
696
693
|
}
|
|
697
694
|
]);
|
|
@@ -700,16 +697,24 @@ var rxjs = defineConfig12([
|
|
|
700
697
|
import { defineConfig as defineConfig13 } from "eslint/config";
|
|
701
698
|
import storybookEslint from "eslint-plugin-storybook";
|
|
702
699
|
var storybook = defineConfig13([
|
|
700
|
+
storybookEslint.configs["flat/recommended"],
|
|
703
701
|
{
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
702
|
+
files: [
|
|
703
|
+
"**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)",
|
|
704
|
+
"**/*.story.@(ts|tsx|js|jsx|mjs|cjs)"
|
|
705
|
+
],
|
|
707
706
|
rules: {
|
|
708
707
|
"storybook/csf-component": "warn",
|
|
709
708
|
// Ensure component property is set
|
|
710
709
|
"storybook/no-stories-of": "error"
|
|
711
710
|
// Prevent deprecated storiesOf API
|
|
712
711
|
}
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
files: ["**/.storybook/main.@(js|cjs|mjs|ts|mts|cts)"],
|
|
715
|
+
rules: {
|
|
716
|
+
"storybook/no-uninstalled-addons": "error"
|
|
717
|
+
}
|
|
713
718
|
}
|
|
714
719
|
]);
|
|
715
720
|
|
|
@@ -811,7 +816,7 @@ var typescriptImports = defineConfig15([
|
|
|
811
816
|
"import-x/no-unresolved": "error",
|
|
812
817
|
"import-x/no-duplicates": "error",
|
|
813
818
|
"import-x/prefer-default-export": "off",
|
|
814
|
-
"import-x/no-useless-path-segments":
|
|
819
|
+
"import-x/no-useless-path-segments": "error",
|
|
815
820
|
"import-x/newline-after-import": "error",
|
|
816
821
|
"import-x/first": "error",
|
|
817
822
|
"import-x/no-mutable-exports": "error",
|
|
@@ -989,7 +994,7 @@ var typescriptSafety = defineConfig18([
|
|
|
989
994
|
// Bad: braced three-line if (x) { return; } Good: if (x) return;
|
|
990
995
|
"local/one-line-guard": ["error", { maxLineLength: MAX_LINE_LENGTH }],
|
|
991
996
|
// Type properties are readonly; arrays stay T[], never readonly T[].
|
|
992
|
-
//
|
|
997
|
+
// Suggestions only: an autofix could break assignments in other files.
|
|
993
998
|
// Bad: { id: string; items: readonly T[] }
|
|
994
999
|
// Good: { readonly id: string; readonly items: T[] }
|
|
995
1000
|
"local/readonly-type-properties": "error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lint-suite",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Reusable ESLint, Stylelint, and Prettier configurations",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,28 +25,28 @@
|
|
|
25
25
|
"author": "Artiom Tofan artiomtofancv@gmail.com",
|
|
26
26
|
"type": "module",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@lint-suite/eslint-arrow-fits-line": "1.0.
|
|
29
|
-
"@lint-suite/eslint-chain-fits-line": "1.0.
|
|
30
|
-
"@lint-suite/eslint-chain-receiver-name": "1.0.
|
|
31
|
-
"@lint-suite/eslint-explicit-accessibility": "1.0.
|
|
32
|
-
"@lint-suite/eslint-max-condition-operands": "1.0.
|
|
33
|
-
"@lint-suite/eslint-modular-boundaries": "1.0.
|
|
34
|
-
"@lint-suite/eslint-no-call-in-condition": "1.0.
|
|
35
|
-
"@lint-suite/eslint-no-grouped-condition": "1.0.
|
|
36
|
-
"@lint-suite/eslint-no-inline-object-types": "1.0.
|
|
37
|
-
"@lint-suite/eslint-no-inline-return-object": "1.0.
|
|
38
|
-
"@lint-suite/eslint-no-nested-object-value": "1.0.
|
|
39
|
-
"@lint-suite/eslint-no-spread-expression": "1.0.
|
|
40
|
-
"@lint-suite/eslint-no-unused-exports": "1.0.
|
|
41
|
-
"@lint-suite/eslint-one-line-guard": "1.0.
|
|
42
|
-
"@lint-suite/eslint-readonly-type-properties": "1.0.
|
|
43
|
-
"@lint-suite/eslint-ternary-branch-shape": "1.0.
|
|
44
|
-
"@lint-suite/eslint-test-file-shape": "1.0.
|
|
45
|
-
"@lint-suite/eslint-type-placement": "1.0.
|
|
46
|
-
"@lint-suite/eslint-util-purity": "1.0.
|
|
47
|
-
"@lint-suite/eslint-no-unused-angular-fields": "1.0.
|
|
48
|
-
"@lint-suite/eslint-no-unstyled-classes": "1.0.
|
|
49
|
-
"@lint-suite/stylelint-no-unused-classes": "2.0.
|
|
28
|
+
"@lint-suite/eslint-arrow-fits-line": "1.0.2",
|
|
29
|
+
"@lint-suite/eslint-chain-fits-line": "1.0.2",
|
|
30
|
+
"@lint-suite/eslint-chain-receiver-name": "1.0.2",
|
|
31
|
+
"@lint-suite/eslint-explicit-accessibility": "1.0.2",
|
|
32
|
+
"@lint-suite/eslint-max-condition-operands": "1.0.2",
|
|
33
|
+
"@lint-suite/eslint-modular-boundaries": "1.0.2",
|
|
34
|
+
"@lint-suite/eslint-no-call-in-condition": "1.0.2",
|
|
35
|
+
"@lint-suite/eslint-no-grouped-condition": "1.0.2",
|
|
36
|
+
"@lint-suite/eslint-no-inline-object-types": "1.0.2",
|
|
37
|
+
"@lint-suite/eslint-no-inline-return-object": "1.0.2",
|
|
38
|
+
"@lint-suite/eslint-no-nested-object-value": "1.0.2",
|
|
39
|
+
"@lint-suite/eslint-no-spread-expression": "1.0.2",
|
|
40
|
+
"@lint-suite/eslint-no-unused-exports": "1.0.2",
|
|
41
|
+
"@lint-suite/eslint-one-line-guard": "1.0.2",
|
|
42
|
+
"@lint-suite/eslint-readonly-type-properties": "1.0.2",
|
|
43
|
+
"@lint-suite/eslint-ternary-branch-shape": "1.0.2",
|
|
44
|
+
"@lint-suite/eslint-test-file-shape": "1.0.2",
|
|
45
|
+
"@lint-suite/eslint-type-placement": "1.0.2",
|
|
46
|
+
"@lint-suite/eslint-util-purity": "1.0.2",
|
|
47
|
+
"@lint-suite/eslint-no-unused-angular-fields": "1.0.2",
|
|
48
|
+
"@lint-suite/eslint-no-unstyled-classes": "1.0.2",
|
|
49
|
+
"@lint-suite/stylelint-no-unused-classes": "2.0.2",
|
|
50
50
|
"@eslint/js": "^10.0.1",
|
|
51
51
|
"@eslint/json": "^2.1.1",
|
|
52
52
|
"@smarttools/eslint-plugin-rxjs": "1.0.22",
|