lint-suite 3.0.0 → 3.0.1

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.
Files changed (4) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +12 -9
  3. package/eslint.js +41 -36
  4. package/package.json +23 -23
package/CHANGELOG.md CHANGED
@@ -1,3 +1,58 @@
1
+ ## 3.0.1 (2026-10-24)
2
+
3
+ ### 🚀 Features
4
+
5
+ - ⚠️ **lint-suite:** 💥 register only @smarttools/rxjs in the rxjs preset ([4f73a87](https://github.com/F0rty-Tw0/lint-suite/commit/4f73a87))
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - **lint-suite:** 🐛 lint nested .storybook/main configs in the storybook preset ([3605ce1](https://github.com/F0rty-Tw0/lint-suite/commit/3605ce1))
10
+ - **lint-suite:** 🐛 stop rewriting index imports to directory imports ([6484fa2](https://github.com/F0rty-Tw0/lint-suite/commit/6484fa2))
11
+ - **lint-suite:** 🐛 cover .storybook/main and all story extensions in the storybook preset ([a277d47](https://github.com/F0rty-Tw0/lint-suite/commit/a277d47))
12
+ - **lint-suite:** 🐛 parse JSONC config files in the json preset ([417280e](https://github.com/F0rty-Tw0/lint-suite/commit/417280e))
13
+
14
+ ### ⚠️ Breaking Changes
15
+
16
+ - **lint-suite:** 💥 register only @smarttools/rxjs in the rxjs preset ([4f73a87](https://github.com/F0rty-Tw0/lint-suite/commit/4f73a87))
17
+ rxjs preset rule keys are renamed from `rxjs/<id>` to
18
+ `@smarttools/rxjs/<id>`: prefer-observer, finnish, no-ignored-subscription,
19
+ no-ignored-error, no-unsafe-switchmap, no-unsafe-catch, no-unsafe-first,
20
+ no-topromise, throw-error, no-async-subscribe, no-exposed-subjects,
21
+ no-cyclic-action, no-subscribe-handlers. The preset no longer sets
22
+ `rxjs/no-unsafe-takeuntil`; `@smarttools/rxjs/no-unsafe-takeuntil` follows the
23
+ plugin's recommended config.
24
+ Consumers that override any `rxjs/<id>` key must rename it, or ESLint reports
25
+ an unknown rule.
26
+
27
+ ### 🧱 Updated Dependencies
28
+
29
+ - Updated eslint-arrow-fits-line to 1.0.1
30
+ - Updated eslint-chain-fits-line to 1.0.1
31
+ - Updated eslint-chain-receiver-name to 1.0.1
32
+ - Updated eslint-explicit-accessibility to 1.0.1
33
+ - Updated eslint-max-condition-operands to 1.0.1
34
+ - Updated eslint-modular-boundaries to 1.0.1
35
+ - Updated eslint-no-call-in-condition to 1.0.1
36
+ - Updated eslint-no-grouped-condition to 1.0.1
37
+ - Updated eslint-no-inline-object-types to 1.0.1
38
+ - Updated eslint-no-inline-return-object to 1.0.1
39
+ - Updated eslint-no-nested-object-value to 1.0.1
40
+ - Updated eslint-no-spread-expression to 1.0.1
41
+ - Updated eslint-no-unused-exports to 1.0.1
42
+ - Updated eslint-one-line-guard to 1.0.1
43
+ - Updated eslint-readonly-type-properties to 1.0.1
44
+ - Updated eslint-ternary-branch-shape to 1.0.1
45
+ - Updated eslint-test-file-shape to 1.0.1
46
+ - Updated eslint-type-placement to 1.0.1
47
+ - Updated eslint-util-purity to 1.0.1
48
+ - Updated eslint-no-unused-angular-fields to 1.0.1
49
+ - Updated eslint-no-unstyled-classes to 1.0.1
50
+ - Updated stylelint-no-unused-classes to 2.0.1
51
+
52
+ ### ❤️ Thank You
53
+
54
+ - Artiom Tofan
55
+
1
56
  # 3.0.0 (2026-10-13)
2
57
 
3
58
  ### 🧱 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 auto-fixes them
484
- with `eslint --fix`. A property is primitive-typed when its annotation is
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 --fix
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 and fixes `readonly T[]` and `ReadonlyArray<T>` to
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-takeuntil": "error",
677
- "rxjs/no-unsafe-catch": "error",
678
- "rxjs/no-unsafe-first": "error",
679
- "rxjs/no-topromise": "error",
680
- "rxjs/throw-error": "error",
681
- "rxjs/no-async-subscribe": "off",
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
- ignores: ["!.storybook"],
705
- files: ["**/*.stories.ts"],
706
- extends: [storybookEslint.configs["flat/recommended"]],
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": ["error", { noUselessIndex: true }],
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
- // Fixes.
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.0",
3
+ "version": "3.0.1",
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.0",
29
- "@lint-suite/eslint-chain-fits-line": "1.0.0",
30
- "@lint-suite/eslint-chain-receiver-name": "1.0.0",
31
- "@lint-suite/eslint-explicit-accessibility": "1.0.0",
32
- "@lint-suite/eslint-max-condition-operands": "1.0.0",
33
- "@lint-suite/eslint-modular-boundaries": "1.0.0",
34
- "@lint-suite/eslint-no-call-in-condition": "1.0.0",
35
- "@lint-suite/eslint-no-grouped-condition": "1.0.0",
36
- "@lint-suite/eslint-no-inline-object-types": "1.0.0",
37
- "@lint-suite/eslint-no-inline-return-object": "1.0.0",
38
- "@lint-suite/eslint-no-nested-object-value": "1.0.0",
39
- "@lint-suite/eslint-no-spread-expression": "1.0.0",
40
- "@lint-suite/eslint-no-unused-exports": "1.0.0",
41
- "@lint-suite/eslint-one-line-guard": "1.0.0",
42
- "@lint-suite/eslint-readonly-type-properties": "1.0.0",
43
- "@lint-suite/eslint-ternary-branch-shape": "1.0.0",
44
- "@lint-suite/eslint-test-file-shape": "1.0.0",
45
- "@lint-suite/eslint-type-placement": "1.0.0",
46
- "@lint-suite/eslint-util-purity": "1.0.0",
47
- "@lint-suite/eslint-no-unused-angular-fields": "1.0.0",
48
- "@lint-suite/eslint-no-unstyled-classes": "1.0.0",
49
- "@lint-suite/stylelint-no-unused-classes": "2.0.0",
28
+ "@lint-suite/eslint-arrow-fits-line": "1.0.1",
29
+ "@lint-suite/eslint-chain-fits-line": "1.0.1",
30
+ "@lint-suite/eslint-chain-receiver-name": "1.0.1",
31
+ "@lint-suite/eslint-explicit-accessibility": "1.0.1",
32
+ "@lint-suite/eslint-max-condition-operands": "1.0.1",
33
+ "@lint-suite/eslint-modular-boundaries": "1.0.1",
34
+ "@lint-suite/eslint-no-call-in-condition": "1.0.1",
35
+ "@lint-suite/eslint-no-grouped-condition": "1.0.1",
36
+ "@lint-suite/eslint-no-inline-object-types": "1.0.1",
37
+ "@lint-suite/eslint-no-inline-return-object": "1.0.1",
38
+ "@lint-suite/eslint-no-nested-object-value": "1.0.1",
39
+ "@lint-suite/eslint-no-spread-expression": "1.0.1",
40
+ "@lint-suite/eslint-no-unused-exports": "1.0.1",
41
+ "@lint-suite/eslint-one-line-guard": "1.0.1",
42
+ "@lint-suite/eslint-readonly-type-properties": "1.0.1",
43
+ "@lint-suite/eslint-ternary-branch-shape": "1.0.1",
44
+ "@lint-suite/eslint-test-file-shape": "1.0.1",
45
+ "@lint-suite/eslint-type-placement": "1.0.1",
46
+ "@lint-suite/eslint-util-purity": "1.0.1",
47
+ "@lint-suite/eslint-no-unused-angular-fields": "1.0.1",
48
+ "@lint-suite/eslint-no-unstyled-classes": "1.0.1",
49
+ "@lint-suite/stylelint-no-unused-classes": "2.0.1",
50
50
  "@eslint/js": "^10.0.1",
51
51
  "@eslint/json": "^2.1.1",
52
52
  "@smarttools/eslint-plugin-rxjs": "1.0.22",