Skip to content

Commit c1022ee

Browse files
committed
feat(eslint-plugin)!: remove (component|directive)-class-suffix from recommended
1 parent 4583034 commit c1022ee

File tree

9 files changed

+13
-20
lines changed

9 files changed

+13
-20
lines changed

e2e/.verdaccio/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ packages:
1919
proxy: npmjs
2020

2121
# log settings
22-
logs:
22+
log:
2323
type: stdout
2424
format: pretty
2525
level: warn

packages/angular-eslint/src/configs/ts-recommended.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ export default (
1616
{
1717
name: 'angular-eslint/ts-recommended',
1818
rules: {
19-
'@angular-eslint/component-class-suffix': 'error',
2019
'@angular-eslint/contextual-lifecycle': 'error',
21-
'@angular-eslint/directive-class-suffix': 'error',
2220
'@angular-eslint/no-empty-lifecycle-method': 'error',
2321
'@angular-eslint/no-input-rename': 'error',
2422
'@angular-eslint/no-inputs-metadata-property': 'error',

packages/eslint-plugin/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ Please see https://github.com/angular-eslint/angular-eslint for full usage instr
4343
<!-- prettier-ignore-start -->
4444
| Rule | Description | :white_check_mark: | :wrench: | :bulb: |
4545
| --- | --- | --- | --- | --- |
46-
| [`component-class-suffix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-class-suffix.md) | Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03 | :white_check_mark: | | |
46+
| [`component-class-suffix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-class-suffix.md) | Classes decorated with @Component must have suffix "Component" (or custom) in their name. Note: As of v20, this is no longer recommended by the Angular Team. | | | |
4747
| [`component-max-inline-declarations`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-max-inline-declarations.md) | Enforces a maximum number of lines in inline template, styles and animations. See more at https://angular.dev/style-guide#style-05-04 | | | |
4848
| [`component-selector`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-selector.md) | Component selectors should follow given naming rules. See more at https://angular.dev/style-guide#style-02-07, https://angular.dev/style-guide#style-05-02 and https://angular.dev/style-guide#style-05-03. | | | |
4949
| [`consistent-component-styles`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-component-styles.md) | Ensures consistent usage of `styles`/`styleUrls`/`styleUrl` within Component metadata | | :wrench: | |
5050
| [`contextual-decorator`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-decorator.md) | Ensures that classes use contextual decorators in its body | | | |
51-
| [`directive-class-suffix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-class-suffix.md) | Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03 | :white_check_mark: | | |
51+
| [`directive-class-suffix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-class-suffix.md) | Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. Note: As of v20, this is no longer recommended by the Angular Team. | | | |
5252
| [`directive-selector`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-selector.md) | Directive selectors should follow given naming rules. See more at https://angular.dev/style-guide#style-02-06 and https://angular.dev/style-guide#style-02-08. | | | |
5353
| [`no-conflicting-lifecycle`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-conflicting-lifecycle.md) | Ensures that directives not implement conflicting lifecycle interfaces. | | | |
5454
| [`no-duplicates-in-metadata-arrays`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-duplicates-in-metadata-arrays.md) | Ensures that metadata arrays do not contain duplicate entries. | | | |
@@ -71,7 +71,7 @@ Please see https://github.com/angular-eslint/angular-eslint for full usage instr
7171
| [`prefer-output-emitter-ref`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-output-emitter-ref.md) | Use `OutputEmitterRef` instead of `@Output()` | | | |
7272
| [`prefer-output-readonly`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-output-readonly.md) | Prefer to declare `@Output`, `OutputEmitterRef` and `OutputRef` as `readonly` since they are not supposed to be reassigned | | | :bulb: |
7373
| [`prefer-signals`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-signals.md) | Use readonly signals instead of `@Input()`, `@ViewChild()` and other legacy decorators | | :wrench: | |
74-
| [`prefer-standalone`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone.md) | Ensures Components, Directives and Pipes do not opt out of standalone | :white_check_mark: | :wrench: | |
74+
| [`prefer-standalone`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone.md) | Ensures Components, Directives and Pipes do not opt out of standalone. | :white_check_mark: | | :bulb: |
7575
| [`relative-url-prefix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/relative-url-prefix.md) | The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix. See more at https://angular.dev/style-guide#style-05-04 | | | |
7676
| [`require-localize-metadata`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/require-localize-metadata.md) | Ensures that $localize tagged messages contain helpful metadata to aid with translations. | | | |
7777
| [`runtime-localize`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/runtime-localize.md) | Ensures that $localize tagged messages can use runtime-loaded translations. | | | |

packages/eslint-plugin/docs/rules/component-class-suffix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# `@angular-eslint/component-class-suffix`
1717

18-
Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03
18+
Classes decorated with @Component must have suffix "Component" (or custom) in their name. Note: As of v20, this is no longer recommended by the Angular Team.
1919

2020
- Type: suggestion
2121

packages/eslint-plugin/docs/rules/directive-class-suffix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# `@angular-eslint/directive-class-suffix`
1717

18-
Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03
18+
Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. Note: As of v20, this is no longer recommended by the Angular Team.
1919

2020
- Type: suggestion
2121

packages/eslint-plugin/docs/rules/prefer-standalone.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515

1616
# `@angular-eslint/prefer-standalone`
1717

18-
Ensures Components, Directives and Pipes do not opt out of standalone
18+
Ensures Components, Directives and Pipes do not opt out of standalone.
1919

2020
- Type: suggestion
21-
- 🔧 Supports autofix (`--fix`)
21+
22+
- 💡 Provides suggestions on how to fix issues (https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions)
2223

2324
<br>
2425

packages/eslint-plugin/src/configs/recommended.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"parser": "@typescript-eslint/parser",
33
"plugins": ["@angular-eslint"],
44
"rules": {
5-
"@angular-eslint/component-class-suffix": "error",
65
"@angular-eslint/contextual-lifecycle": "error",
7-
"@angular-eslint/directive-class-suffix": "error",
86
"@angular-eslint/no-empty-lifecycle-method": "error",
97
"@angular-eslint/no-input-rename": "error",
108
"@angular-eslint/no-inputs-metadata-property": "error",

packages/eslint-plugin/src/rules/component-class-suffix.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@ export type Options = [
1313
];
1414
export type MessageIds = 'componentClassSuffix';
1515
export const RULE_NAME = 'component-class-suffix';
16-
const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#style-02-03';
1716

1817
export default createESLintRule<Options, MessageIds>({
1918
name: RULE_NAME,
2019
meta: {
2120
type: 'suggestion',
2221
docs: {
23-
description: `Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at ${STYLE_GUIDE_LINK}`,
24-
recommended: 'recommended',
22+
description: `Classes decorated with @Component must have suffix "Component" (or custom) in their name. Note: As of v20, this is no longer recommended by the Angular Team.`,
2523
},
2624
schema: [
2725
{
@@ -38,7 +36,7 @@ export default createESLintRule<Options, MessageIds>({
3836
},
3937
],
4038
messages: {
41-
componentClassSuffix: `Component class names should end with one of these suffixes: {{suffixes}} (${STYLE_GUIDE_LINK})`,
39+
componentClassSuffix: `Component class names should end with one of these suffixes: {{suffixes}}`,
4240
},
4341
},
4442
defaultOptions: [

packages/eslint-plugin/src/rules/directive-class-suffix.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { createESLintRule } from '../utils/create-eslint-rule';
99
export type Options = [{ readonly suffixes: readonly string[] }];
1010
export type MessageIds = 'directiveClassSuffix';
1111
export const RULE_NAME = 'directive-class-suffix';
12-
const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#style-02-03';
1312
const DEFAULT_SUFFIXES = ['Directive'] as const;
1413
const VALIDATOR_SUFFIX = 'Validator';
1514

@@ -18,8 +17,7 @@ export default createESLintRule<Options, MessageIds>({
1817
meta: {
1918
type: 'suggestion',
2019
docs: {
21-
description: `Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at ${STYLE_GUIDE_LINK}`,
22-
recommended: 'recommended',
20+
description: `Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. Note: As of v20, this is no longer recommended by the Angular Team.`,
2321
},
2422
schema: [
2523
{
@@ -36,7 +34,7 @@ export default createESLintRule<Options, MessageIds>({
3634
},
3735
],
3836
messages: {
39-
directiveClassSuffix: `Directive class names should end with one of these suffixes: {{suffixes}} (${STYLE_GUIDE_LINK})`,
37+
directiveClassSuffix: `Directive class names should end with one of these suffixes: {{suffixes}}`,
4038
},
4139
},
4240
defaultOptions: [{ suffixes: DEFAULT_SUFFIXES }],

0 commit comments

Comments
 (0)