@angular-eslint/eslint-plugin 19.0.3-alpha.7 → 19.0.3-alpha.9
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
|
@@ -66,7 +66,7 @@ Please see https://github.com/angular-eslint/angular-eslint for full usage instr
|
|
|
66
66
|
| [`pipe-prefix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/pipe-prefix.md) | Enforce consistent prefix for pipes. | | | |
|
|
67
67
|
| [`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: |
|
|
68
68
|
| [`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: |
|
|
69
|
-
| [`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 | |
|
|
69
|
+
| [`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: | |
|
|
70
70
|
| [`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: | |
|
|
71
71
|
| [`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 | | | |
|
|
72
72
|
| [`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. | | | |
|
|
@@ -8,7 +8,7 @@ type Options = [
|
|
|
8
8
|
additionalSignalCreationFunctions: string[];
|
|
9
9
|
}
|
|
10
10
|
];
|
|
11
|
-
export type MessageIds = 'preferInputSignals' | 'preferQuerySignals' | 'preferReadonlySignalProperties'
|
|
11
|
+
export type MessageIds = 'preferInputSignals' | 'preferQuerySignals' | 'preferReadonlySignalProperties';
|
|
12
12
|
export declare const RULE_NAME = "prefer-signals";
|
|
13
13
|
declare const _default: ESLintUtils.RuleModule<MessageIds, Options, import("../utils/create-eslint-rule").RuleDocs, ESLintUtils.RuleListener>;
|
|
14
14
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefer-signals.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-signals.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvE,KAAK,OAAO,GAAG;IACb;QACE,8BAA8B,EAAE,OAAO,CAAC;QACxC,kBAAkB,EAAE,OAAO,CAAC;QAC5B,kBAAkB,EAAE,OAAO,CAAC;QAC5B,eAAe,EAAE,OAAO,CAAC;QACzB,iCAAiC,EAAE,MAAM,EAAE,CAAC;KAC7C;CACF,CAAC;AA4BF,MAAM,MAAM,UAAU,GAClB,oBAAoB,GACpB,oBAAoB,GACpB,gCAAgC,
|
|
1
|
+
{"version":3,"file":"prefer-signals.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-signals.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvE,KAAK,OAAO,GAAG;IACb;QACE,8BAA8B,EAAE,OAAO,CAAC;QACxC,kBAAkB,EAAE,OAAO,CAAC;QAC5B,kBAAkB,EAAE,OAAO,CAAC;QAC5B,eAAe,EAAE,OAAO,CAAC;QACzB,iCAAiC,EAAE,MAAM,EAAE,CAAC;KAC7C;CACF,CAAC;AA4BF,MAAM,MAAM,UAAU,GAClB,oBAAoB,GACpB,oBAAoB,GACpB,gCAAgC,CAAC;AACrC,eAAO,MAAM,SAAS,mBAAmB,CAAC;;AAE1C,wBAsKG"}
|
|
@@ -36,7 +36,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
36
36
|
docs: {
|
|
37
37
|
description: 'Use readonly signals instead of `@Input()`, `@ViewChild()` and other legacy decorators',
|
|
38
38
|
},
|
|
39
|
-
|
|
39
|
+
fixable: 'code',
|
|
40
40
|
schema: [
|
|
41
41
|
{
|
|
42
42
|
type: 'object',
|
|
@@ -70,7 +70,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
70
70
|
preferInputSignals: 'Use `InputSignal`s (e.g. via `input()`) for Component input properties rather than the legacy `@Input()` decorator',
|
|
71
71
|
preferQuerySignals: 'Use the `{{function}}` function instead of the `{{decorator}}` decorator',
|
|
72
72
|
preferReadonlySignalProperties: 'Properties declared using signals should be marked as `readonly` since they should not be reassigned',
|
|
73
|
-
suggestAddReadonlyModifier: 'Add `readonly` modifier',
|
|
74
73
|
},
|
|
75
74
|
},
|
|
76
75
|
defaultOptions: [{ ...DEFAULT_OPTIONS }],
|
|
@@ -127,12 +126,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
127
126
|
context.report({
|
|
128
127
|
node: node.key,
|
|
129
128
|
messageId: 'preferReadonlySignalProperties',
|
|
130
|
-
|
|
131
|
-
{
|
|
132
|
-
messageId: 'suggestAddReadonlyModifier',
|
|
133
|
-
fix: (fixer) => fixer.insertTextBefore(node.key, 'readonly '),
|
|
134
|
-
},
|
|
135
|
-
],
|
|
129
|
+
fix: (fixer) => fixer.insertTextBefore(node.key, 'readonly '),
|
|
136
130
|
});
|
|
137
131
|
}
|
|
138
132
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/eslint-plugin",
|
|
3
|
-
"version": "19.0.3-alpha.
|
|
3
|
+
"version": "19.0.3-alpha.9",
|
|
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/
|
|
22
|
-
"@angular-eslint/
|
|
21
|
+
"@angular-eslint/utils": "19.0.3-alpha.9",
|
|
22
|
+
"@angular-eslint/bundled-angular-compiler": "19.0.3-alpha.9"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@angular-eslint/test-utils": "19.0.3-alpha.
|
|
25
|
+
"@angular-eslint/test-utils": "19.0.3-alpha.9"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@typescript-eslint/utils": "^7.11.0 || ^8.0.0",
|