@angular-eslint/eslint-plugin 19.8.1-alpha.0 → 19.8.1-alpha.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.
package/README.md CHANGED
@@ -43,12 +43,12 @@ Please see https://github.com/angular-eslint/angular-eslint for full usage instr
43
43
  <!-- prettier-ignore-start -->
44
44
  | Rule | Description | :white_check_mark: | :wrench: | :bulb: |
45
45
  | --- | --- | --- | --- | --- |
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. | | | |
47
47
  | [`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 | | | |
48
48
  | [`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. | | | |
49
49
  | [`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: | |
50
50
  | [`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. | | | |
52
52
  | [`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. | | | |
53
53
  | [`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. | | | |
54
54
  | [`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. | | | |
@@ -66,12 +66,12 @@ Please see https://github.com/angular-eslint/angular-eslint for full usage instr
66
66
  | [`no-queries-metadata-property`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-queries-metadata-property.md) | Disallows usage of the `queries` metadata property. See more at https://angular.dev/style-guide#style-05-12. | | | |
67
67
  | [`no-uncalled-signals`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-uncalled-signals.md) | Warns user about unintentionally doing logic on the signal, rather than the signal's value | | | :bulb: |
68
68
  | [`pipe-prefix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/pipe-prefix.md) | Enforce consistent prefix for pipes. | | | |
69
- | [`prefer-inject`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-inject.md) | Prefer using the inject() function over constructor parameter injection | | | |
69
+ | [`prefer-inject`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-inject.md) | Prefer using the inject() function over constructor parameter injection | :white_check_mark: | | |
70
70
  | [`prefer-on-push-component-change-detection`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-on-push-component-change-detection.md) | Ensures component's `changeDetection` is set to `ChangeDetectionStrategy.OnPush` | | | :bulb: |
71
71
  | [`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()` | | | |
72
72
  | [`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: |
73
73
  | [`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: |
75
75
  | [`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 | | | |
76
76
  | [`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. | | | |
77
77
  | [`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. | | | |
@@ -2,9 +2,7 @@
2
2
  "parser": "@typescript-eslint/parser",
3
3
  "plugins": ["@angular-eslint"],
4
4
  "rules": {
5
- "@angular-eslint/component-class-suffix": "error",
6
5
  "@angular-eslint/contextual-lifecycle": "error",
7
- "@angular-eslint/directive-class-suffix": "error",
8
6
  "@angular-eslint/no-empty-lifecycle-method": "error",
9
7
  "@angular-eslint/no-input-rename": "error",
10
8
  "@angular-eslint/no-inputs-metadata-property": "error",
@@ -12,6 +10,7 @@
12
10
  "@angular-eslint/no-output-on-prefix": "error",
13
11
  "@angular-eslint/no-output-rename": "error",
14
12
  "@angular-eslint/no-outputs-metadata-property": "error",
13
+ "@angular-eslint/prefer-inject": "error",
15
14
  "@angular-eslint/prefer-standalone": "error",
16
15
  "@angular-eslint/use-pipe-transform-interface": "error",
17
16
  "@angular-eslint/use-lifecycle-interface": "warn"
package/dist/index.d.ts CHANGED
@@ -53,9 +53,7 @@ declare const _default: {
53
53
  parser: string;
54
54
  plugins: string[];
55
55
  rules: {
56
- "@angular-eslint/component-class-suffix": string;
57
56
  "@angular-eslint/contextual-lifecycle": string;
58
- "@angular-eslint/directive-class-suffix": string;
59
57
  "@angular-eslint/no-empty-lifecycle-method": string;
60
58
  "@angular-eslint/no-input-rename": string;
61
59
  "@angular-eslint/no-inputs-metadata-property": string;
@@ -63,6 +61,7 @@ declare const _default: {
63
61
  "@angular-eslint/no-output-on-prefix": string;
64
62
  "@angular-eslint/no-output-rename": string;
65
63
  "@angular-eslint/no-outputs-metadata-property": string;
64
+ "@angular-eslint/prefer-inject": string;
66
65
  "@angular-eslint/prefer-standalone": string;
67
66
  "@angular-eslint/use-pipe-transform-interface": string;
68
67
  "@angular-eslint/use-lifecycle-interface": string;
@@ -104,7 +103,7 @@ declare const _default: {
104
103
  useTypeChecking: boolean;
105
104
  additionalSignalCreationFunctions: string[];
106
105
  }], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
107
- "prefer-standalone": import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferStandalone", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
106
+ "prefer-standalone": import("@typescript-eslint/utils/ts-eslint").RuleModule<import("./rules/prefer-standalone").MessageIds, [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
108
107
  "prefer-inject": import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferInject", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
109
108
  "prefer-output-emitter-ref": import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferOutputEmitterRef", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
110
109
  "prefer-output-readonly": import("@typescript-eslint/utils/ts-eslint").RuleModule<import("./rules/prefer-output-readonly").MessageIds, [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqIA,kBAmDE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqIA,kBAmDE"}
@@ -1 +1 @@
1
- {"version":3,"file":"component-class-suffix.d.ts","sourceRoot":"","sources":["../../src/rules/component-class-suffix.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAChD,eAAO,MAAM,SAAS,2BAA2B,CAAC;;AAGlD,wBAkDG"}
1
+ {"version":3,"file":"component-class-suffix.d.ts","sourceRoot":"","sources":["../../src/rules/component-class-suffix.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAChD,eAAO,MAAM,SAAS,2BAA2B,CAAC;;AAElD,wBAiDG"}
@@ -4,14 +4,12 @@ exports.RULE_NAME = void 0;
4
4
  const utils_1 = require("@angular-eslint/utils");
5
5
  const create_eslint_rule_1 = require("../utils/create-eslint-rule");
6
6
  exports.RULE_NAME = 'component-class-suffix';
7
- const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#style-02-03';
8
7
  exports.default = (0, create_eslint_rule_1.createESLintRule)({
9
8
  name: exports.RULE_NAME,
10
9
  meta: {
11
10
  type: 'suggestion',
12
11
  docs: {
13
- description: `Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at ${STYLE_GUIDE_LINK}`,
14
- recommended: 'recommended',
12
+ 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.`,
15
13
  },
16
14
  schema: [
17
15
  {
@@ -28,7 +26,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
28
26
  },
29
27
  ],
30
28
  messages: {
31
- componentClassSuffix: `Component class names should end with one of these suffixes: {{suffixes}} (${STYLE_GUIDE_LINK})`,
29
+ componentClassSuffix: `Component class names should end with one of these suffixes: {{suffixes}}`,
32
30
  },
33
31
  },
34
32
  defaultOptions: [
@@ -1 +1 @@
1
- {"version":3,"file":"directive-class-suffix.d.ts","sourceRoot":"","sources":["../../src/rules/directive-class-suffix.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,OAAO,GAAG,CAAC;IAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC,CAAC;AACjE,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAChD,eAAO,MAAM,SAAS,2BAA2B,CAAC;;AAKlD,wBA6DG"}
1
+ {"version":3,"file":"directive-class-suffix.d.ts","sourceRoot":"","sources":["../../src/rules/directive-class-suffix.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,OAAO,GAAG,CAAC;IAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC,CAAC;AACjE,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAChD,eAAO,MAAM,SAAS,2BAA2B,CAAC;;AAIlD,wBA4DG"}
@@ -4,7 +4,6 @@ exports.RULE_NAME = void 0;
4
4
  const utils_1 = require("@angular-eslint/utils");
5
5
  const create_eslint_rule_1 = require("../utils/create-eslint-rule");
6
6
  exports.RULE_NAME = 'directive-class-suffix';
7
- const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#style-02-03';
8
7
  const DEFAULT_SUFFIXES = ['Directive'];
9
8
  const VALIDATOR_SUFFIX = 'Validator';
10
9
  exports.default = (0, create_eslint_rule_1.createESLintRule)({
@@ -12,8 +11,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
12
11
  meta: {
13
12
  type: 'suggestion',
14
13
  docs: {
15
- description: `Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at ${STYLE_GUIDE_LINK}`,
16
- recommended: 'recommended',
14
+ 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.`,
17
15
  },
18
16
  schema: [
19
17
  {
@@ -30,7 +28,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
30
28
  },
31
29
  ],
32
30
  messages: {
33
- directiveClassSuffix: `Directive class names should end with one of these suffixes: {{suffixes}} (${STYLE_GUIDE_LINK})`,
31
+ directiveClassSuffix: `Directive class names should end with one of these suffixes: {{suffixes}}`,
34
32
  },
35
33
  },
36
34
  defaultOptions: [{ suffixes: DEFAULT_SUFFIXES }],
@@ -1 +1 @@
1
- {"version":3,"file":"prefer-inject.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-inject.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AAEzB,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AACxC,eAAO,MAAM,SAAS,kBAAkB,CAAC;;AAEzC,wBAiGG"}
1
+ {"version":3,"file":"prefer-inject.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-inject.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AAEzB,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AACxC,eAAO,MAAM,SAAS,kBAAkB,CAAC;;AAEzC,wBAkGG"}
@@ -11,6 +11,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
11
11
  type: 'suggestion',
12
12
  docs: {
13
13
  description: 'Prefer using the inject() function over constructor parameter injection',
14
+ recommended: 'recommended',
14
15
  },
15
16
  schema: [],
16
17
  messages: {
@@ -1,6 +1,6 @@
1
1
  export type Options = [];
2
- export type MessageIds = 'preferStandalone';
2
+ export type MessageIds = 'preferStandalone' | 'removeStandaloneFalse';
3
3
  export declare const RULE_NAME = "prefer-standalone";
4
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferStandalone", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
+ declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
5
5
  export default _default;
6
6
  //# sourceMappingURL=prefer-standalone.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prefer-standalone.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-standalone.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AAEzB,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC;AAC5C,eAAO,MAAM,SAAS,sBAAsB,CAAC;;AAE7C,wBA4DG"}
1
+ {"version":3,"file":"prefer-standalone.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-standalone.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AAEzB,MAAM,MAAM,UAAU,GAAG,kBAAkB,GAAG,uBAAuB,CAAC;AACtE,eAAO,MAAM,SAAS,sBAAsB,CAAC;;AAK7C,wBAkEG"}
@@ -4,18 +4,20 @@ exports.RULE_NAME = void 0;
4
4
  const utils_1 = require("@angular-eslint/utils");
5
5
  const create_eslint_rule_1 = require("../utils/create-eslint-rule");
6
6
  exports.RULE_NAME = 'prefer-standalone';
7
+ const RECOMMENDED_GUIDE_URL = 'https://angular.dev/reference/migrations/standalone';
7
8
  exports.default = (0, create_eslint_rule_1.createESLintRule)({
8
9
  name: exports.RULE_NAME,
9
10
  meta: {
10
11
  type: 'suggestion',
11
12
  docs: {
12
- description: `Ensures Components, Directives and Pipes do not opt out of standalone`,
13
+ description: `Ensures Components, Directives and Pipes do not opt out of standalone.`,
13
14
  recommended: 'recommended',
14
15
  },
15
- fixable: 'code',
16
+ hasSuggestions: true,
16
17
  schema: [],
17
18
  messages: {
18
- preferStandalone: `Components, Directives and Pipes should not opt out of standalone`,
19
+ preferStandalone: `Components, Directives and Pipes should not opt out of standalone. Following this guide is highly recommended: ${RECOMMENDED_GUIDE_URL}`,
20
+ removeStandaloneFalse: `Quickly remove 'standalone: false'. NOTE - Following this guide is highly recommended: ${RECOMMENDED_GUIDE_URL}`,
19
21
  },
20
22
  },
21
23
  defaultOptions: [],
@@ -34,17 +36,22 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
34
36
  node: standalone.parent,
35
37
  messageId: 'preferStandalone',
36
38
  data: { type },
37
- fix: (fixer) => {
38
- // Remove the standalone property altogether if it was set to false
39
- const tokenAfter = context.sourceCode.getTokenAfter(standalone.parent);
40
- // Remove the trailing comma, if present
41
- const removeStart = standalone.parent.range[0];
42
- let removeEnd = standalone.parent.range[1];
43
- if (tokenAfter && tokenAfter.value === ',') {
44
- removeEnd = tokenAfter.range[1];
45
- }
46
- return fixer.removeRange([removeStart, removeEnd]);
47
- },
39
+ suggest: [
40
+ {
41
+ messageId: 'removeStandaloneFalse',
42
+ fix: (fixer) => {
43
+ // Remove the standalone property altogether if it was set to false
44
+ const tokenAfter = context.sourceCode.getTokenAfter(standalone.parent);
45
+ // Remove the trailing comma, if present
46
+ const removeStart = standalone.parent.range[0];
47
+ let removeEnd = standalone.parent.range[1];
48
+ if (tokenAfter && tokenAfter.value === ',') {
49
+ removeEnd = tokenAfter.range[1];
50
+ }
51
+ return fixer.removeRange([removeStart, removeEnd]);
52
+ },
53
+ },
54
+ ],
48
55
  });
49
56
  };
50
57
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"sort-keys-in-type-decorator.d.ts","sourceRoot":"","sources":["../../src/rules/sort-keys-in-type-decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAG9D,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KACzB;CACF,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAoB1C,eAAO,MAAM,SAAS,gCAAgC,CAAC;;AAEvD,wBA+IG"}
1
+ {"version":3,"file":"sort-keys-in-type-decorator.d.ts","sourceRoot":"","sources":["../../src/rules/sort-keys-in-type-decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAG9D,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KACzB;CACF,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AA2D1C,eAAO,MAAM,SAAS,gCAAgC,CAAC;;AAEvD,wBA+IG"}
@@ -4,6 +4,7 @@ exports.RULE_NAME = void 0;
4
4
  const utils_1 = require("@angular-eslint/utils");
5
5
  const create_eslint_rule_1 = require("../utils/create-eslint-rule");
6
6
  const DEFAULT_ORDER = {
7
+ // https://angular.dev/api/core/Component
7
8
  Component: [
8
9
  'selector',
9
10
  'imports',
@@ -13,12 +14,50 @@ const DEFAULT_ORDER = {
13
14
  'styleUrl',
14
15
  'styleUrls',
15
16
  'styles',
16
- 'encapsulation',
17
+ 'providers',
17
18
  'changeDetection',
19
+ 'encapsulation',
20
+ 'viewProviders',
21
+ 'host',
22
+ 'hostDirectives',
23
+ 'inputs',
24
+ 'outputs',
25
+ 'animations',
26
+ 'schemas',
27
+ 'exportAs',
28
+ 'queries',
29
+ 'preserveWhitespaces',
30
+ 'jit',
31
+ // Deprecated properties according to https://angular.dev/api/core/Component
32
+ 'moduleId',
33
+ 'interpolation',
34
+ ],
35
+ // https://angular.dev/api/core/Directive
36
+ Directive: [
37
+ 'selector',
38
+ 'standalone',
39
+ 'providers',
40
+ 'host',
41
+ 'hostDirectives',
42
+ 'inputs',
43
+ 'outputs',
44
+ 'exportAs',
45
+ 'queries',
46
+ 'jit',
47
+ ],
48
+ // https://angular.dev/api/core/NgModule
49
+ NgModule: [
50
+ 'id', // rarely used but good to have first if set
51
+ 'imports',
52
+ 'declarations',
53
+ 'providers',
54
+ 'exports',
55
+ 'bootstrap',
56
+ 'schemas',
57
+ 'jit',
18
58
  ],
19
- Directive: ['selector', 'standalone'],
20
- NgModule: ['declarations', 'imports', 'exports', 'providers', 'bootstrap'],
21
- Pipe: ['name', 'standalone'],
59
+ // https://angular.dev/api/core/Pipe
60
+ Pipe: ['name', 'standalone', 'pure'],
22
61
  };
23
62
  exports.RULE_NAME = 'sort-keys-in-type-decorator';
24
63
  exports.default = (0, create_eslint_rule_1.createESLintRule)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/eslint-plugin",
3
- "version": "19.8.1-alpha.0",
3
+ "version": "19.8.1-alpha.1",
4
4
  "description": "ESLint plugin for Angular applications, following https://angular.dev/style-guide",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -18,11 +18,11 @@
18
18
  "LICENSE"
19
19
  ],
20
20
  "dependencies": {
21
- "@angular-eslint/bundled-angular-compiler": "19.8.1-alpha.0",
22
- "@angular-eslint/utils": "19.8.1-alpha.0"
21
+ "@angular-eslint/bundled-angular-compiler": "19.8.1-alpha.1",
22
+ "@angular-eslint/utils": "19.8.1-alpha.1"
23
23
  },
24
24
  "devDependencies": {
25
- "@angular-eslint/test-utils": "19.8.1-alpha.0"
25
+ "@angular-eslint/test-utils": "19.8.1-alpha.1"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@typescript-eslint/utils": "^7.11.0 || ^8.0.0",