@angular-eslint/eslint-plugin 17.4.2-alpha.4 → 17.4.2-alpha.6
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
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
| [`use-component-selector`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-component-selector.md) | Component selector must be declared | | | |
|
|
72
72
|
| [`use-component-view-encapsulation`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-component-view-encapsulation.md) | Disallows using `ViewEncapsulation.None` | | | :bulb: |
|
|
73
73
|
| [`use-injectable-provided-in`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-injectable-provided-in.md) | Using the `providedIn` property makes `Injectables` tree-shakable | | | :bulb: |
|
|
74
|
-
| [`use-lifecycle-interface`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-lifecycle-interface.md) | Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods. See more at https://angular.io/styleguide#style-09-01 | |
|
|
74
|
+
| [`use-lifecycle-interface`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-lifecycle-interface.md) | Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods. See more at https://angular.io/styleguide#style-09-01 | | :wrench: | |
|
|
75
75
|
| [`use-pipe-transform-interface`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-pipe-transform-interface.md) | Ensures that `Pipes` implement `PipeTransform` interface | :white_check_mark: | :wrench: | |
|
|
76
76
|
<!-- prettier-ignore-end -->
|
|
77
77
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-lifecycle-interface.d.ts","sourceRoot":"","sources":["../../src/rules/use-lifecycle-interface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-lifecycle-interface.d.ts","sourceRoot":"","sources":["../../src/rules/use-lifecycle-interface.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,UAAU,GAAG,uBAAuB,CAAC;AACjD,eAAO,MAAM,SAAS,4BAA4B,CAAC;;AAGnD,wBA0DG"}
|
|
@@ -16,6 +16,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
16
16
|
messages: {
|
|
17
17
|
useLifecycleInterface: `Lifecycle interface '{{interfaceName}}' should be implemented for method '{{methodName}}'. (${STYLE_GUIDE_LINK})`,
|
|
18
18
|
},
|
|
19
|
+
fixable: 'code',
|
|
19
20
|
},
|
|
20
21
|
defaultOptions: [],
|
|
21
22
|
create(context) {
|
|
@@ -37,6 +38,12 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
37
38
|
node: key,
|
|
38
39
|
messageId: 'useLifecycleInterface',
|
|
39
40
|
data: { interfaceName, methodName },
|
|
41
|
+
fix: (fixer) => {
|
|
42
|
+
const { implementsNodeReplace, implementsTextReplace } = utils_1.RuleFixes.getImplementsSchemaFixer(parent, interfaceName);
|
|
43
|
+
return [
|
|
44
|
+
fixer.insertTextAfter(implementsNodeReplace, implementsTextReplace),
|
|
45
|
+
].filter(utils_1.isNotNullOrUndefined);
|
|
46
|
+
},
|
|
40
47
|
});
|
|
41
48
|
},
|
|
42
49
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/eslint-plugin",
|
|
3
|
-
"version": "17.4.2-alpha.
|
|
3
|
+
"version": "17.4.2-alpha.6",
|
|
4
4
|
"description": "ESLint plugin for Angular applications, following angular.io/styleguide",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"LICENSE"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@angular-eslint/bundled-angular-compiler": "17.4.2-alpha.
|
|
22
|
-
"@angular-eslint/utils": "17.4.2-alpha.
|
|
21
|
+
"@angular-eslint/bundled-angular-compiler": "17.4.2-alpha.6",
|
|
22
|
+
"@angular-eslint/utils": "17.4.2-alpha.6",
|
|
23
23
|
"@typescript-eslint/utils": "7.10.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|