lint-suite 2.3.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 +82 -0
  2. package/README.md +24 -22
  3. package/eslint.js +67 -62
  4. package/package.json +23 -23
package/CHANGELOG.md CHANGED
@@ -1,3 +1,85 @@
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
+
56
+ # 3.0.0 (2026-10-13)
57
+
58
+ ### 🧱 Updated Dependencies
59
+
60
+ - Updated eslint-arrow-fits-line to 1.0.0
61
+ - Updated eslint-chain-fits-line to 1.0.0
62
+ - Updated eslint-chain-receiver-name to 1.0.0
63
+ - Updated eslint-explicit-accessibility to 1.0.0
64
+ - Updated eslint-max-condition-operands to 1.0.0
65
+ - Updated eslint-modular-boundaries to 1.0.0
66
+ - Updated eslint-no-call-in-condition to 1.0.0
67
+ - Updated eslint-no-grouped-condition to 1.0.0
68
+ - Updated eslint-no-inline-object-types to 1.0.0
69
+ - Updated eslint-no-inline-return-object to 1.0.0
70
+ - Updated eslint-no-nested-object-value to 1.0.0
71
+ - Updated eslint-no-spread-expression to 1.0.0
72
+ - Updated eslint-no-unused-exports to 1.0.0
73
+ - Updated eslint-one-line-guard to 1.0.0
74
+ - Updated eslint-readonly-type-properties to 1.0.0
75
+ - Updated eslint-ternary-branch-shape to 1.0.0
76
+ - Updated eslint-test-file-shape to 1.0.0
77
+ - Updated eslint-type-placement to 1.0.0
78
+ - Updated eslint-util-purity to 1.0.0
79
+ - Updated eslint-no-unused-angular-fields to 1.0.0
80
+ - Updated eslint-no-unstyled-classes to 1.0.0
81
+ - Updated stylelint-no-unused-classes to 2.0.0
82
+
1
83
  ## 2.3.0 (2026-10-11)
2
84
 
3
85
  ### 🚀 Features
package/README.md CHANGED
@@ -24,7 +24,7 @@ The suite includes custom rules for TypeScript code structure, unused exports, u
24
24
  - **Prettier**: Automatic disabling of formatting rules that conflict with Prettier (`eslint-config-prettier`)
25
25
  - **Prettier config**: Standalone formatting preset (subpath `lint-suite/prettier`) with the suite's house defaults and Angular/HTML overrides
26
26
  - **Stylelint**: Standalone SCSS/CSS preset (subpath `lint-suite/stylelint`) with standard + recess-order + BEM selector enforcement and `lint-suite/no-unused-classes`
27
- - **Architecture**: Folder layer boundaries with `eslint-plugin-boundaries`, and workspace project boundaries by tag with `@lint-suite/eslint-plugin-modular-boundaries`
27
+ - **Architecture**: Folder layer boundaries with `eslint-plugin-boundaries`, and workspace project boundaries by tag with `@lint-suite/eslint-modular-boundaries`
28
28
  - **Additional Support**: JSON (with comment support for tsconfig), Storybook CSF enforcement
29
29
 
30
30
  ## Installation
@@ -40,11 +40,11 @@ Installing one does not install this umbrella or its unrelated presets.
40
40
  For example:
41
41
 
42
42
  ```bash
43
- pnpm add -D @lint-suite/eslint-plugin-arrow-body-fits-line eslint typescript typescript-eslint
43
+ pnpm add -D @lint-suite/eslint-arrow-fits-line eslint typescript typescript-eslint
44
44
  ```
45
45
 
46
46
  ```js
47
- import arrow from '@lint-suite/eslint-plugin-arrow-body-fits-line';
47
+ import arrow from '@lint-suite/eslint-arrow-fits-line';
48
48
  import tseslint from 'typescript-eslint';
49
49
 
50
50
  export default [
@@ -52,15 +52,14 @@ export default [
52
52
  files: ['**/*.ts'],
53
53
  languageOptions: { parser: tseslint.parser },
54
54
  plugins: { arrow },
55
- rules: { 'arrow/arrow-body-fits-line': 'error' }
55
+ rules: { 'arrow/arrow-fits-line': 'error' }
56
56
  }
57
57
  ];
58
58
  ```
59
59
 
60
60
  The [package catalog](https://github.com/F0rty-Tw0/lint-suite#standalone-custom-rules)
61
- lists every package and its rule key. The Angular instance-field package is
62
- `@lint-suite/eslint-plugin-no-unused-angular-instance-fields`; its rule key
63
- remains `no-unused-instance-fields`. The Stylelint package is
61
+ lists every package and its rule key. Each ESLint rule key matches its
62
+ package name without the `@lint-suite/eslint-` prefix. The Stylelint package is
64
63
  `@lint-suite/stylelint-no-unused-classes`, with rule ID
65
64
  `lint-suite/no-unused-classes`.
66
65
 
@@ -147,7 +146,7 @@ export default [
147
146
  | **`recommended`** | **Baseline only: `base` + `javascript` + `typescript` + `json` + `boundaries` + `prettier` — compose the rest on top** |
148
147
 
149
148
  **Angular project analysis:** The `angular` preset enables `projectService:
150
- true` and project analysis for `lint-suite-angular/no-unused-instance-fields`.
149
+ true` and project analysis for `lint-suite-angular/no-unused-angular-fields`.
151
150
  It counts exact reads in the configured TypeScript/Angular Program, including
152
151
  external parent templates/TypeScript, subclasses, and Angular interface
153
152
  implementations; code outside that Program is unknowable. Project mode also
@@ -195,7 +194,7 @@ export default [
195
194
  ### Workspace project boundaries
196
195
 
197
196
  The `boundaries` config enables `modular-boundaries/modular-boundaries` from
198
- [`@lint-suite/eslint-plugin-modular-boundaries`](https://github.com/F0rty-Tw0/lint-suite/tree/master/packages/eslint-plugin/modular-boundaries#readme).
197
+ [`@lint-suite/eslint-modular-boundaries`](https://github.com/F0rty-Tw0/lint-suite/tree/master/packages/eslint/modular-boundaries#readme).
199
198
  It reads pnpm, npm, Nx, Turborepo and moon workspace files and checks imports
200
199
  between workspace projects. Outside a workspace it does nothing.
201
200
 
@@ -246,7 +245,7 @@ other, unchanged files until they are linted again.
246
245
 
247
246
  ### Unused Angular instance fields
248
247
 
249
- The `angular` config enables `lint-suite-angular/no-unused-instance-fields`.
248
+ The `angular` config enables `lint-suite-angular/no-unused-angular-fields`.
250
249
  Project analysis is the default and recognizes reads from other TypeScript
251
250
  files and Angular templates. It requires parser services with type information:
252
251
 
@@ -260,7 +259,7 @@ files and Angular templates. It requires parser services with type information:
260
259
  }
261
260
  },
262
261
  rules: {
263
- 'lint-suite-angular/no-unused-instance-fields': [
262
+ 'lint-suite-angular/no-unused-angular-fields': [
264
263
  'error',
265
264
  {
266
265
  analysis: 'project',
@@ -481,8 +480,10 @@ modifier. `#private` members are ignored: TypeScript forbids a modifier there.
481
480
 
482
481
  The `typescript` preset enables `local/readonly-type-properties`, which
483
482
  reports primitive-typed properties in `type` aliases, interfaces, and
484
- inline object types that are not marked `readonly`, and auto-fixes them
485
- 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
486
487
  `string`, `number`, `boolean`, `bigint`, `symbol`, `null`, `undefined`, a
487
488
  literal or template-literal type, or a union/intersection of those.
488
489
 
@@ -490,16 +491,17 @@ literal or template-literal type, or a union/intersection of those.
490
491
  // Before
491
492
  type User = { name: string; roles: string[]; profile: Profile };
492
493
 
493
- // After --fix
494
+ // After applying the suggestion
494
495
  type User = { readonly name: string; roles: string[]; profile: Profile };
495
496
  ```
496
497
 
497
498
  - Arrays, object types, type references (including string-union aliases
498
499
  like `Status`), functions, and tuples are left untouched because the
499
500
  rule is syntactic and does not resolve types.
500
- - The same rule reports and fixes `readonly T[]` and `ReadonlyArray<T>` to
501
+ - The same rule reports `readonly T[]` and `ReadonlyArray<T>` and suggests
501
502
  `T[]`: the property reference is readonly, the array contents stay
502
- mutable.
503
+ mutable. Also a suggestion, because passing a readonly value to the
504
+ rewritten type fails with TS4104.
503
505
  - Index signatures, mapped types, and method signatures are out of scope.
504
506
  - Use `// eslint-disable-next-line local/readonly-type-properties` when a
505
507
  property genuinely needs to stay mutable.
@@ -573,9 +575,9 @@ offers an IDE suggestion with a placeholder name instead of an auto-fix.
573
575
  | `local/max-condition-operands` | An `if` condition with more than `max` (default 3) operands joined by `&&` / `\|\|`. | none |
574
576
  | `local/no-grouped-condition` | A parenthesised group with a different operator inside an `if` condition or a boolean `const` (`a && (b \|\| c)`). | Suggestion: hoist the group |
575
577
  | `local/ternary-branch-shape` | A ternary branch that is not a name, literal, template literal, or plain member access. | none |
576
- | `local/chain-receiver-is-name` | A member chain starting on an inline expression: `(a ?? b).x`, `{...}.x`, `[...].x`, `(await p).x`. | Suggestion: name the receiver |
578
+ | `local/chain-receiver-name` | A member chain starting on an inline expression: `(a ?? b).x`, `{...}.x`, `[...].x`, `(await p).x`. | Suggestion: name the receiver |
577
579
  | `local/chain-fits-line` | A chain of two or more calls whose `.method(` parts sit on different lines. A multi-line callback argument does not count. | none |
578
- | `local/arrow-body-fits-line` | An expression-bodied arrow whose body wraps onto more lines. | Fix: block body with `return` |
580
+ | `local/arrow-fits-line` | An expression-bodied arrow whose body wraps onto more lines. | Fix: block body with `return` |
579
581
  | `local/no-nested-object-value` | A property value that is a non-empty object literal, an array holding object literals, a ternary, or a call chain. Decorator arguments (`@Component({...})`) and files matching `configFiles` (default `**/*.config.*`, `**/eslint.config.*`, `**/*.schema.ts`) are exempt. | Suggestion: hoist to a `const` |
580
582
  | `local/no-spread-expression` | `...(expr)` where the argument is not a name or member access. | Suggestion: hoist to a `const` |
581
583
  | `local/no-inline-return-object` | `return {...}` and `=> ({...})`. | Suggestion: `const result = {...}; return result;` |
@@ -779,10 +781,10 @@ The Prettier preset is published with `prettier` as a peer dependency. The Style
779
781
 
780
782
  ### @smarttools/eslint-plugin-rxjs
781
783
 
782
- - `@rxjs/finnish`: Enforces Finnish notation for observables
783
- - `@rxjs/no-exposed-subjects`: Enforces subject encapsulation
784
- - `@rxjs/no-cyclic-action`: Prevents infinite loops in NgRx effects
785
- - `@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
786
788
  - ...
787
789
 
788
790
  ### eslint-plugin-storybook
package/eslint.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // packages/lint-suite/src/lib/angular-template.ts
2
- import lintSuiteAngularTemplatePlugin from "@lint-suite/eslint-plugin-no-unstyled-classes";
2
+ import lintSuiteAngularTemplatePlugin from "@lint-suite/eslint-no-unstyled-classes";
3
3
  import { configs } from "angular-eslint";
4
4
  import { defineConfig } from "eslint/config";
5
5
  var angularTemplate = defineConfig([
@@ -88,7 +88,7 @@ var angularTemplate = defineConfig([
88
88
  ]);
89
89
 
90
90
  // packages/lint-suite/src/lib/angular.ts
91
- import noUnusedAngularInstanceFieldPlugin from "@lint-suite/eslint-plugin-no-unused-angular-instance-fields";
91
+ import noUnusedAngularInstanceFieldPlugin from "@lint-suite/eslint-no-unused-angular-fields";
92
92
  import { configs as configs2, processInlineTemplates } from "angular-eslint";
93
93
  import { defineConfig as defineConfig2 } from "eslint/config";
94
94
  import globals from "globals";
@@ -118,7 +118,7 @@ var angular = defineConfig2([
118
118
  // are dead.
119
119
  // Bad: private unused = 1; read nowhere
120
120
  // Good: delete it, or read it in the template
121
- "lint-suite-angular/no-unused-instance-fields": [
121
+ "lint-suite-angular/no-unused-angular-fields": [
122
122
  "error",
123
123
  { analysis: "project" }
124
124
  ],
@@ -403,7 +403,7 @@ var base = defineConfig6([
403
403
  ]);
404
404
 
405
405
  // packages/lint-suite/src/lib/boundaries.ts
406
- import modularBoundariesPlugin from "@lint-suite/eslint-plugin-modular-boundaries";
406
+ import modularBoundariesPlugin from "@lint-suite/eslint-modular-boundaries";
407
407
  import { defineConfig as defineConfig7 } from "eslint/config";
408
408
  import boundariesPlugin from "eslint-plugin-boundaries";
409
409
  var boundaries = defineConfig7([
@@ -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",
@@ -900,29 +905,29 @@ var typescriptRecommended = defineConfig17([
900
905
  import { defineConfig as defineConfig18 } from "eslint/config";
901
906
 
902
907
  // packages/lint-suite/src/lib/typescript-local-plugin.ts
903
- import { arrowBodyFitsLineRule } from "@lint-suite/eslint-plugin-arrow-body-fits-line";
904
- import { chainFitsLineRule } from "@lint-suite/eslint-plugin-chain-fits-line";
905
- import { chainReceiverIsNameRule } from "@lint-suite/eslint-plugin-chain-receiver-is-name";
906
- import { explicitAccessibilityRule } from "@lint-suite/eslint-plugin-explicit-accessibility";
907
- import { maxConditionOperandsRule } from "@lint-suite/eslint-plugin-max-condition-operands";
908
- import { noCallInConditionRule } from "@lint-suite/eslint-plugin-no-call-in-condition";
909
- import { noGroupedConditionRule } from "@lint-suite/eslint-plugin-no-grouped-condition";
910
- import { noInlineObjectTypesRule } from "@lint-suite/eslint-plugin-no-inline-object-types";
911
- import { noInlineReturnObjectRule } from "@lint-suite/eslint-plugin-no-inline-return-object";
912
- import { noNestedObjectValueRule } from "@lint-suite/eslint-plugin-no-nested-object-value";
913
- import { noSpreadExpressionRule } from "@lint-suite/eslint-plugin-no-spread-expression";
914
- import { noUnusedExportsRule } from "@lint-suite/eslint-plugin-no-unused-exports";
915
- import { oneLineGuardRule } from "@lint-suite/eslint-plugin-one-line-guard";
916
- import { readonlyTypePropertiesRule } from "@lint-suite/eslint-plugin-readonly-type-properties";
917
- import { ternaryBranchShapeRule } from "@lint-suite/eslint-plugin-ternary-branch-shape";
918
- import { testFileShapeRule } from "@lint-suite/eslint-plugin-test-file-shape";
919
- import { typePlacementRule } from "@lint-suite/eslint-plugin-type-placement";
920
- import { utilPurityRule } from "@lint-suite/eslint-plugin-util-purity";
908
+ import { arrowFitsLineRule } from "@lint-suite/eslint-arrow-fits-line";
909
+ import { chainFitsLineRule } from "@lint-suite/eslint-chain-fits-line";
910
+ import { chainReceiverNameRule } from "@lint-suite/eslint-chain-receiver-name";
911
+ import { explicitAccessibilityRule } from "@lint-suite/eslint-explicit-accessibility";
912
+ import { maxConditionOperandsRule } from "@lint-suite/eslint-max-condition-operands";
913
+ import { noCallInConditionRule } from "@lint-suite/eslint-no-call-in-condition";
914
+ import { noGroupedConditionRule } from "@lint-suite/eslint-no-grouped-condition";
915
+ import { noInlineObjectTypesRule } from "@lint-suite/eslint-no-inline-object-types";
916
+ import { noInlineReturnObjectRule } from "@lint-suite/eslint-no-inline-return-object";
917
+ import { noNestedObjectValueRule } from "@lint-suite/eslint-no-nested-object-value";
918
+ import { noSpreadExpressionRule } from "@lint-suite/eslint-no-spread-expression";
919
+ import { noUnusedExportsRule } from "@lint-suite/eslint-no-unused-exports";
920
+ import { oneLineGuardRule } from "@lint-suite/eslint-one-line-guard";
921
+ import { readonlyTypePropertiesRule } from "@lint-suite/eslint-readonly-type-properties";
922
+ import { ternaryBranchShapeRule } from "@lint-suite/eslint-ternary-branch-shape";
923
+ import { testFileShapeRule } from "@lint-suite/eslint-test-file-shape";
924
+ import { typePlacementRule } from "@lint-suite/eslint-type-placement";
925
+ import { utilPurityRule } from "@lint-suite/eslint-util-purity";
921
926
  var meta = { name: "local" };
922
927
  var rules = {
923
- "arrow-body-fits-line": arrowBodyFitsLineRule,
928
+ "arrow-fits-line": arrowFitsLineRule,
924
929
  "chain-fits-line": chainFitsLineRule,
925
- "chain-receiver-is-name": chainReceiverIsNameRule,
930
+ "chain-receiver-name": chainReceiverNameRule,
926
931
  "explicit-accessibility": explicitAccessibilityRule,
927
932
  "max-condition-operands": maxConditionOperandsRule,
928
933
  "no-call-in-condition": noCallInConditionRule,
@@ -950,13 +955,13 @@ var typescriptSafety = defineConfig18([
950
955
  rules: {
951
956
  // Expression arrow whose body wraps gets a block body. Fixes.
952
957
  // Bad: (x) => a && b on two lines Good: (x) => { return a && b; }
953
- "local/arrow-body-fits-line": "error",
958
+ "local/arrow-fits-line": "error",
954
959
  // Two or more calls in one chain stay on one line.
955
960
  // Bad: a .b() .c() over three lines Good: const b = a.b(); b.c();
956
961
  "local/chain-fits-line": "error",
957
962
  // A member chain starts on a name, never on an inline expression.
958
963
  // Bad: (a ?? b).c Good: const ab = a ?? b; ab.c
959
- "local/chain-receiver-is-name": "error",
964
+ "local/chain-receiver-name": "error",
960
965
  // Every class member states public, private, or protected. Fixes.
961
966
  // Bad: field = 1; Good: private field = 1;
962
967
  "local/explicit-accessibility": "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": "2.3.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-plugin-arrow-body-fits-line": "1.1.0",
29
- "@lint-suite/eslint-plugin-chain-fits-line": "1.1.0",
30
- "@lint-suite/eslint-plugin-chain-receiver-is-name": "1.1.0",
31
- "@lint-suite/eslint-plugin-explicit-accessibility": "1.1.0",
32
- "@lint-suite/eslint-plugin-max-condition-operands": "1.1.0",
33
- "@lint-suite/eslint-plugin-modular-boundaries": "1.0.0",
34
- "@lint-suite/eslint-plugin-no-call-in-condition": "1.1.0",
35
- "@lint-suite/eslint-plugin-no-grouped-condition": "1.1.0",
36
- "@lint-suite/eslint-plugin-no-inline-object-types": "1.1.0",
37
- "@lint-suite/eslint-plugin-no-inline-return-object": "1.1.0",
38
- "@lint-suite/eslint-plugin-no-nested-object-value": "1.1.0",
39
- "@lint-suite/eslint-plugin-no-spread-expression": "1.1.0",
40
- "@lint-suite/eslint-plugin-no-unused-exports": "1.1.0",
41
- "@lint-suite/eslint-plugin-one-line-guard": "1.1.0",
42
- "@lint-suite/eslint-plugin-readonly-type-properties": "1.1.0",
43
- "@lint-suite/eslint-plugin-ternary-branch-shape": "1.1.0",
44
- "@lint-suite/eslint-plugin-test-file-shape": "1.1.0",
45
- "@lint-suite/eslint-plugin-type-placement": "1.1.0",
46
- "@lint-suite/eslint-plugin-util-purity": "1.1.0",
47
- "@lint-suite/eslint-plugin-no-unused-angular-instance-fields": "1.2.0",
48
- "@lint-suite/eslint-plugin-no-unstyled-classes": "1.1.0",
49
- "@lint-suite/stylelint-no-unused-classes": "1.1.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",