@angular-eslint/eslint-plugin 20.5.2-alpha.7 → 20.5.2-alpha.8
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 +8 -8
- package/dist/rules/component-max-inline-declarations.d.ts.map +1 -1
- package/dist/rules/component-max-inline-declarations.js +2 -3
- package/dist/rules/component-selector.d.ts.map +1 -1
- package/dist/rules/component-selector.js +6 -9
- package/dist/rules/directive-selector.d.ts.map +1 -1
- package/dist/rules/directive-selector.js +5 -6
- package/dist/rules/no-input-rename.d.ts.map +1 -1
- package/dist/rules/no-input-rename.js +1 -1
- package/dist/rules/no-inputs-metadata-property.d.ts.map +1 -1
- package/dist/rules/no-inputs-metadata-property.js +2 -3
- package/dist/rules/no-output-rename.d.ts.map +1 -1
- package/dist/rules/no-output-rename.js +1 -1
- package/dist/rules/no-outputs-metadata-property.d.ts.map +1 -1
- package/dist/rules/no-outputs-metadata-property.js +2 -3
- package/dist/rules/no-queries-metadata-property.d.ts.map +1 -1
- package/dist/rules/no-queries-metadata-property.js +2 -3
- package/dist/rules/relative-url-prefix.d.ts.map +1 -1
- package/dist/rules/relative-url-prefix.js +2 -3
- package/dist/rules/use-lifecycle-interface.d.ts.map +1 -1
- package/dist/rules/use-lifecycle-interface.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -46,26 +46,26 @@ Please see https://github.com/angular-eslint/angular-eslint for full usage instr
|
|
|
46
46
|
| Rule | Description | :white_check_mark: | :wrench: | :bulb: |
|
|
47
47
|
| --- | --- | --- | --- | --- |
|
|
48
48
|
| [`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. | | | |
|
|
49
|
-
| [`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.
|
|
50
|
-
| [`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#
|
|
49
|
+
| [`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. | | | |
|
|
50
|
+
| [`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#choosing-component-selectors. | | | |
|
|
51
51
|
| [`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: | |
|
|
52
52
|
| [`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 their body | | | |
|
|
53
53
|
| [`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. | | | |
|
|
54
|
-
| [`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#
|
|
54
|
+
| [`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#choosing-directive-selectors. | | | |
|
|
55
55
|
| [`no-conflicting-lifecycle`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-conflicting-lifecycle.md) | Ensures that directives do not implement conflicting lifecycle interfaces. | | | |
|
|
56
56
|
| [`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. | | | |
|
|
57
57
|
| [`no-empty-lifecycle-method`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-empty-lifecycle-method.md) | Disallows declaring empty lifecycle methods | :white_check_mark: | | :bulb: |
|
|
58
58
|
| [`no-forward-ref`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-forward-ref.md) | Disallows usage of `forwardRef` references for DI | | | |
|
|
59
59
|
| [`no-input-prefix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-input-prefix.md) | Ensures that input bindings, including aliases, are not named or prefixed by the configured disallowed prefixes | | | |
|
|
60
60
|
| [`no-input-rename`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-input-rename.md) | Ensures that input bindings are not aliased | :white_check_mark: | :wrench: | :bulb: |
|
|
61
|
-
| [`no-inputs-metadata-property`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inputs-metadata-property.md) | Disallows usage of the `inputs` metadata property
|
|
61
|
+
| [`no-inputs-metadata-property`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inputs-metadata-property.md) | Disallows usage of the `inputs` metadata property | :white_check_mark: | | |
|
|
62
62
|
| [`no-lifecycle-call`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-lifecycle-call.md) | Disallows explicit calls to lifecycle methods | | | |
|
|
63
63
|
| [`no-output-native`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-native.md) | Ensures that output bindings, including aliases, are not named as standard DOM events | :white_check_mark: | | |
|
|
64
64
|
| [`no-output-on-prefix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-on-prefix.md) | Ensures that output bindings, including aliases, are not named "on", nor prefixed with it. See more at https://angular.dev/guide/components/outputs#choosing-event-names | :white_check_mark: | | |
|
|
65
65
|
| [`no-output-rename`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-rename.md) | Ensures that output bindings are not aliased | :white_check_mark: | :wrench: | :bulb: |
|
|
66
|
-
| [`no-outputs-metadata-property`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-outputs-metadata-property.md) | Disallows usage of the `outputs` metadata property
|
|
66
|
+
| [`no-outputs-metadata-property`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-outputs-metadata-property.md) | Disallows usage of the `outputs` metadata property | :white_check_mark: | | |
|
|
67
67
|
| [`no-pipe-impure`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-pipe-impure.md) | Disallows the declaration of impure pipes | | | :bulb: |
|
|
68
|
-
| [`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.
|
|
68
|
+
| [`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. | | | |
|
|
69
69
|
| [`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: |
|
|
70
70
|
| [`pipe-prefix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/pipe-prefix.md) | Enforce consistent prefix for pipes. | | | |
|
|
71
71
|
| [`prefer-host-metadata-property`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-host-metadata-property.md) | Use `host` metadata property instead of `@HostBinding` and `HostListener` | | | |
|
|
@@ -75,14 +75,14 @@ Please see https://github.com/angular-eslint/angular-eslint for full usage instr
|
|
|
75
75
|
| [`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: |
|
|
76
76
|
| [`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: | |
|
|
77
77
|
| [`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: |
|
|
78
|
-
| [`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.
|
|
78
|
+
| [`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. | | | |
|
|
79
79
|
| [`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. | | | |
|
|
80
80
|
| [`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. | | | |
|
|
81
81
|
| [`sort-keys-in-type-decorator`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-keys-in-type-decorator.md) | Ensures that keys in type decorators (Component, Directive, NgModule, Pipe) are sorted in a consistent order | | :wrench: | |
|
|
82
82
|
| [`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 | | | |
|
|
83
83
|
| [`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: |
|
|
84
84
|
| [`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: |
|
|
85
|
-
| [`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.dev/style-guide#
|
|
85
|
+
| [`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.dev/style-guide#use-lifecycle-hook-interfaces | | :wrench: | |
|
|
86
86
|
| [`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: | |
|
|
87
87
|
<!-- prettier-ignore-end -->
|
|
88
88
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-max-inline-declarations.d.ts","sourceRoot":"","sources":["../../src/rules/component-max-inline-declarations.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;KAC9B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,gCAAgC,CAAC;AAC1D,eAAO,MAAM,SAAS,sCAAsC,CAAC;;
|
|
1
|
+
{"version":3,"file":"component-max-inline-declarations.d.ts","sourceRoot":"","sources":["../../src/rules/component-max-inline-declarations.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;KAC9B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,gCAAgC,CAAC;AAC1D,eAAO,MAAM,SAAS,sCAAsC,CAAC;;AAkB7D,wBA4GG"}
|
|
@@ -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 = 'component-max-inline-declarations';
|
|
7
|
-
const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#style-05-04';
|
|
8
7
|
const NEW_LINE_REGEXP = /\r\n|\r|\n/;
|
|
9
8
|
const DEFAULT_TEMPLATE_LIMIT = 3;
|
|
10
9
|
const DEFAULT_STYLES_LIMIT = 3;
|
|
@@ -23,7 +22,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
23
22
|
meta: {
|
|
24
23
|
type: 'suggestion',
|
|
25
24
|
docs: {
|
|
26
|
-
description: `Enforces a maximum number of lines in inline template, styles and animations
|
|
25
|
+
description: `Enforces a maximum number of lines in inline template, styles and animations.`,
|
|
27
26
|
},
|
|
28
27
|
schema: [
|
|
29
28
|
{
|
|
@@ -37,7 +36,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
37
36
|
},
|
|
38
37
|
],
|
|
39
38
|
messages: {
|
|
40
|
-
componentMaxInlineDeclarations: `\`{{propertyType}}\` has too many lines ({{lineCount}}). Maximum allowed is {{max}}
|
|
39
|
+
componentMaxInlineDeclarations: `\`{{propertyType}}\` has too many lines ({{lineCount}}). Maximum allowed is {{max}}`,
|
|
41
40
|
},
|
|
42
41
|
},
|
|
43
42
|
defaultOptions: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-selector.d.ts","sourceRoot":"","sources":["../../src/rules/component-selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EACd,MAAM,uBAAuB,CAAC;AAK/B,MAAM,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC;AAC5C,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,cAAc,GACd,uBAAuB,GACvB,aAAa,GACb,mCAAmC,CAAC;AACxC,eAAO,MAAM,SAAS,uBAAuB,CAAC;;
|
|
1
|
+
{"version":3,"file":"component-selector.d.ts","sourceRoot":"","sources":["../../src/rules/component-selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EACd,MAAM,uBAAuB,CAAC;AAK/B,MAAM,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC;AAC5C,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,cAAc,GACd,uBAAuB,GACvB,aAAa,GACb,mCAAmC,CAAC;AACxC,eAAO,MAAM,SAAS,uBAAuB,CAAC;;AAS9C,wBAyHG"}
|
|
@@ -7,17 +7,14 @@ const create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
|
7
7
|
exports.RULE_NAME = 'component-selector';
|
|
8
8
|
const VIEW_ENCAPSULATION_SHADOW_DOM = 'ShadowDom';
|
|
9
9
|
const VIEW_ENCAPSULATION = 'ViewEncapsulation';
|
|
10
|
-
const
|
|
11
|
-
const STYLE_GUIDE_STYLE_LINK = 'https://angular.dev/style-guide#style-05-02';
|
|
12
|
-
const STYLE_GUIDE_TYPE_LINK = 'https://angular.dev/style-guide#style-05-03';
|
|
10
|
+
const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#choosing-component-selectors';
|
|
13
11
|
const SHADOW_DOM_ENCAPSULATED_STYLE_LINK = 'https://github.com/angular-eslint/angular-eslint/issues/534';
|
|
14
12
|
exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
15
13
|
name: exports.RULE_NAME,
|
|
16
14
|
meta: {
|
|
17
15
|
type: 'suggestion',
|
|
18
16
|
docs: {
|
|
19
|
-
description: `Component selectors should follow given naming rules. See more at ${
|
|
20
|
-
and ${STYLE_GUIDE_TYPE_LINK}.`,
|
|
17
|
+
description: `Component selectors should follow given naming rules. See more at ${STYLE_GUIDE_LINK}.`,
|
|
21
18
|
},
|
|
22
19
|
schema: [
|
|
23
20
|
{
|
|
@@ -53,10 +50,10 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
53
50
|
},
|
|
54
51
|
],
|
|
55
52
|
messages: {
|
|
56
|
-
prefixFailure: `The selector should start with one of these prefixes: {{prefix}} (${
|
|
57
|
-
styleFailure: `The selector should be {{style}} (${
|
|
58
|
-
styleAndPrefixFailure: `The selector should be {{style}} and start with one of these prefixes: {{prefix}} (${
|
|
59
|
-
typeFailure: `The selector should be used as an {{type}} (${
|
|
53
|
+
prefixFailure: `The selector should start with one of these prefixes: {{prefix}} (${STYLE_GUIDE_LINK})`,
|
|
54
|
+
styleFailure: `The selector should be {{style}} (${STYLE_GUIDE_LINK})`,
|
|
55
|
+
styleAndPrefixFailure: `The selector should be {{style}} and start with one of these prefixes: {{prefix}} (${STYLE_GUIDE_LINK} and ${STYLE_GUIDE_LINK})`,
|
|
56
|
+
typeFailure: `The selector should be used as an {{type}} (${STYLE_GUIDE_LINK})`,
|
|
60
57
|
shadowDomEncapsulatedStyleFailure: `The selector of a ShadowDom-encapsulated component should be \`${utils_1.ASTUtils.OPTION_STYLE_KEBAB_CASE}\` (${SHADOW_DOM_ENCAPSULATED_STYLE_LINK})`,
|
|
61
58
|
},
|
|
62
59
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directive-selector.d.ts","sourceRoot":"","sources":["../../src/rules/directive-selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EACd,MAAM,uBAAuB,CAAC;AAI/B,MAAM,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,eAAe,GAAG,cAAc,GAAG,aAAa,CAAC;AAC1E,eAAO,MAAM,SAAS,uBAAuB,CAAC;;
|
|
1
|
+
{"version":3,"file":"directive-selector.d.ts","sourceRoot":"","sources":["../../src/rules/directive-selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EACd,MAAM,uBAAuB,CAAC;AAI/B,MAAM,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,eAAe,GAAG,cAAc,GAAG,aAAa,CAAC;AAC1E,eAAO,MAAM,SAAS,uBAAuB,CAAC;;AAK9C,wBAgGG"}
|
|
@@ -4,14 +4,13 @@ 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-selector';
|
|
7
|
-
const
|
|
8
|
-
const STYLE_GUIDE_STYLE_TYPE_LINK = 'https://angular.dev/style-guide#style-02-06';
|
|
7
|
+
const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#choosing-directive-selectors';
|
|
9
8
|
exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
10
9
|
name: exports.RULE_NAME,
|
|
11
10
|
meta: {
|
|
12
11
|
type: 'suggestion',
|
|
13
12
|
docs: {
|
|
14
|
-
description: `Directive selectors should follow given naming rules. See more at ${
|
|
13
|
+
description: `Directive selectors should follow given naming rules. See more at ${STYLE_GUIDE_LINK}.`,
|
|
15
14
|
},
|
|
16
15
|
schema: [
|
|
17
16
|
{
|
|
@@ -47,9 +46,9 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
47
46
|
},
|
|
48
47
|
],
|
|
49
48
|
messages: {
|
|
50
|
-
prefixFailure: `The selector should start with one of these prefixes: {{prefix}} (${
|
|
51
|
-
styleFailure: `The selector should be {{style}} (${
|
|
52
|
-
typeFailure: `The selector should be used as an {{type}} (${
|
|
49
|
+
prefixFailure: `The selector should start with one of these prefixes: {{prefix}} (${STYLE_GUIDE_LINK})`,
|
|
50
|
+
styleFailure: `The selector should be {{style}} (${STYLE_GUIDE_LINK})`,
|
|
51
|
+
typeFailure: `The selector should be used as an {{type}} (${STYLE_GUIDE_LINK})`,
|
|
53
52
|
},
|
|
54
53
|
},
|
|
55
54
|
defaultOptions: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-input-rename.d.ts","sourceRoot":"","sources":["../../src/rules/no-input-rename.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,OAAO,GAAG,CAAC;IAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC,CAAC;AACtE,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,wBAAwB,GACxB,yCAAyC,CAAC;AAC9C,eAAO,MAAM,SAAS,oBAAoB,CAAC;;
|
|
1
|
+
{"version":3,"file":"no-input-rename.d.ts","sourceRoot":"","sources":["../../src/rules/no-input-rename.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,OAAO,GAAG,CAAC;IAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC,CAAC;AACtE,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,wBAAwB,GACxB,yCAAyC,CAAC;AAC9C,eAAO,MAAM,SAAS,oBAAoB,CAAC;;AAI3C,wBAgQG"}
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("@angular-eslint/utils");
|
|
|
5
5
|
const utils_2 = require("@typescript-eslint/utils");
|
|
6
6
|
const create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
7
7
|
exports.RULE_NAME = 'no-input-rename';
|
|
8
|
-
const STYLE_GUIDE_LINK = 'https://angular.dev/
|
|
8
|
+
const STYLE_GUIDE_LINK = 'https://angular.dev/guide/components/inputs#choosing-input-names';
|
|
9
9
|
exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
10
10
|
name: exports.RULE_NAME,
|
|
11
11
|
meta: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-inputs-metadata-property.d.ts","sourceRoot":"","sources":["../../src/rules/no-inputs-metadata-property.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,0BAA0B,CAAC;AACpD,eAAO,MAAM,SAAS,gCAAgC,CAAC;;
|
|
1
|
+
{"version":3,"file":"no-inputs-metadata-property.d.ts","sourceRoot":"","sources":["../../src/rules/no-inputs-metadata-property.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,0BAA0B,CAAC;AACpD,eAAO,MAAM,SAAS,gCAAgC,CAAC;;AAGvD,wBAoDG"}
|
|
@@ -6,18 +6,17 @@ const utils_2 = require("@typescript-eslint/utils");
|
|
|
6
6
|
const create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
7
7
|
exports.RULE_NAME = 'no-inputs-metadata-property';
|
|
8
8
|
const METADATA_PROPERTY_NAME = 'inputs';
|
|
9
|
-
const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#style-05-12';
|
|
10
9
|
exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
11
10
|
name: exports.RULE_NAME,
|
|
12
11
|
meta: {
|
|
13
12
|
type: 'suggestion',
|
|
14
13
|
docs: {
|
|
15
|
-
description: `Disallows usage of the \`${METADATA_PROPERTY_NAME}\` metadata property
|
|
14
|
+
description: `Disallows usage of the \`${METADATA_PROPERTY_NAME}\` metadata property`,
|
|
16
15
|
recommended: 'recommended',
|
|
17
16
|
},
|
|
18
17
|
schema: [],
|
|
19
18
|
messages: {
|
|
20
|
-
noInputsMetadataProperty: `Use \`@Input\` rather than the \`${METADATA_PROPERTY_NAME}\` metadata property
|
|
19
|
+
noInputsMetadataProperty: `Use \`@Input\` rather than the \`${METADATA_PROPERTY_NAME}\` metadata property`,
|
|
21
20
|
},
|
|
22
21
|
},
|
|
23
22
|
defaultOptions: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-output-rename.d.ts","sourceRoot":"","sources":["../../src/rules/no-output-rename.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAClB,gBAAgB,GAChB,wBAAwB,GACxB,yCAAyC,CAAC;AAC9C,eAAO,MAAM,SAAS,qBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"no-output-rename.d.ts","sourceRoot":"","sources":["../../src/rules/no-output-rename.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAClB,gBAAgB,GAChB,wBAAwB,GACxB,yCAAyC,CAAC;AAC9C,eAAO,MAAM,SAAS,qBAAqB,CAAC;;AAI5C,wBAgMG"}
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("@angular-eslint/utils");
|
|
|
5
5
|
const utils_2 = require("@typescript-eslint/utils");
|
|
6
6
|
const create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
7
7
|
exports.RULE_NAME = 'no-output-rename';
|
|
8
|
-
const STYLE_GUIDE_LINK = 'https://angular.dev/
|
|
8
|
+
const STYLE_GUIDE_LINK = 'https://angular.dev/guide/components/outputs#choosing-event-names';
|
|
9
9
|
exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
10
10
|
name: exports.RULE_NAME,
|
|
11
11
|
meta: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-outputs-metadata-property.d.ts","sourceRoot":"","sources":["../../src/rules/no-outputs-metadata-property.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC;AACrD,eAAO,MAAM,SAAS,iCAAiC,CAAC;;
|
|
1
|
+
{"version":3,"file":"no-outputs-metadata-property.d.ts","sourceRoot":"","sources":["../../src/rules/no-outputs-metadata-property.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC;AACrD,eAAO,MAAM,SAAS,iCAAiC,CAAC;;AAGxD,wBAoDG"}
|
|
@@ -6,18 +6,17 @@ const utils_2 = require("@typescript-eslint/utils");
|
|
|
6
6
|
const create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
7
7
|
exports.RULE_NAME = 'no-outputs-metadata-property';
|
|
8
8
|
const METADATA_PROPERTY_NAME = 'outputs';
|
|
9
|
-
const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#style-05-12';
|
|
10
9
|
exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
11
10
|
name: exports.RULE_NAME,
|
|
12
11
|
meta: {
|
|
13
12
|
type: 'suggestion',
|
|
14
13
|
docs: {
|
|
15
|
-
description: `Disallows usage of the \`${METADATA_PROPERTY_NAME}\` metadata property
|
|
14
|
+
description: `Disallows usage of the \`${METADATA_PROPERTY_NAME}\` metadata property`,
|
|
16
15
|
recommended: 'recommended',
|
|
17
16
|
},
|
|
18
17
|
schema: [],
|
|
19
18
|
messages: {
|
|
20
|
-
noOutputsMetadataProperty: `Use \`@Output\` rather than the \`${METADATA_PROPERTY_NAME}\` metadata property
|
|
19
|
+
noOutputsMetadataProperty: `Use \`@Output\` rather than the \`${METADATA_PROPERTY_NAME}\` metadata property`,
|
|
21
20
|
},
|
|
22
21
|
},
|
|
23
22
|
defaultOptions: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-queries-metadata-property.d.ts","sourceRoot":"","sources":["../../src/rules/no-queries-metadata-property.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC;AACrD,eAAO,MAAM,SAAS,iCAAiC,CAAC;;
|
|
1
|
+
{"version":3,"file":"no-queries-metadata-property.d.ts","sourceRoot":"","sources":["../../src/rules/no-queries-metadata-property.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC;AACrD,eAAO,MAAM,SAAS,iCAAiC,CAAC;;AAIxD,wBAiCG"}
|
|
@@ -5,17 +5,16 @@ const utils_1 = require("@angular-eslint/utils");
|
|
|
5
5
|
const create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
6
6
|
exports.RULE_NAME = 'no-queries-metadata-property';
|
|
7
7
|
const METADATA_PROPERTY_NAME = 'queries';
|
|
8
|
-
const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#style-05-12';
|
|
9
8
|
exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
10
9
|
name: exports.RULE_NAME,
|
|
11
10
|
meta: {
|
|
12
11
|
type: 'suggestion',
|
|
13
12
|
docs: {
|
|
14
|
-
description: `Disallows usage of the \`${METADATA_PROPERTY_NAME}\` metadata property
|
|
13
|
+
description: `Disallows usage of the \`${METADATA_PROPERTY_NAME}\` metadata property.`,
|
|
15
14
|
},
|
|
16
15
|
schema: [],
|
|
17
16
|
messages: {
|
|
18
|
-
noQueriesMetadataProperty: `Use @${utils_1.ASTUtils.AngularInnerClassDecorators.Output} rather than the \`${METADATA_PROPERTY_NAME}\` metadata property
|
|
17
|
+
noQueriesMetadataProperty: `Use @${utils_1.ASTUtils.AngularInnerClassDecorators.Output} rather than the \`${METADATA_PROPERTY_NAME}\` metadata property`,
|
|
19
18
|
},
|
|
20
19
|
},
|
|
21
20
|
defaultOptions: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relative-url-prefix.d.ts","sourceRoot":"","sources":["../../src/rules/relative-url-prefix.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAC7C,eAAO,MAAM,SAAS,wBAAwB,CAAC;;
|
|
1
|
+
{"version":3,"file":"relative-url-prefix.d.ts","sourceRoot":"","sources":["../../src/rules/relative-url-prefix.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAC7C,eAAO,MAAM,SAAS,wBAAwB,CAAC;;AAI/C,wBA0CG"}
|
|
@@ -4,18 +4,17 @@ 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 = 'relative-url-prefix';
|
|
7
|
-
const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#style-05-04';
|
|
8
7
|
const RELATIVE_URL_PREFIX_MATCHER = /^\.\.?\/.+/;
|
|
9
8
|
exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
10
9
|
name: exports.RULE_NAME,
|
|
11
10
|
meta: {
|
|
12
11
|
type: 'suggestion',
|
|
13
12
|
docs: {
|
|
14
|
-
description: `The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix
|
|
13
|
+
description: `The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix.`,
|
|
15
14
|
},
|
|
16
15
|
schema: [],
|
|
17
16
|
messages: {
|
|
18
|
-
relativeUrlPrefix: `The ./ and ../ prefix is standard syntax for relative URLs
|
|
17
|
+
relativeUrlPrefix: `The ./ and ../ prefix is standard syntax for relative URLs.`,
|
|
19
18
|
},
|
|
20
19
|
},
|
|
21
20
|
defaultOptions: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-lifecycle-interface.d.ts","sourceRoot":"","sources":["../../src/rules/use-lifecycle-interface.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,uBAAuB,CAAC;AACjD,eAAO,MAAM,SAAS,4BAA4B,CAAC;;
|
|
1
|
+
{"version":3,"file":"use-lifecycle-interface.d.ts","sourceRoot":"","sources":["../../src/rules/use-lifecycle-interface.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,uBAAuB,CAAC;AACjD,eAAO,MAAM,SAAS,4BAA4B,CAAC;;AAInD,wBAyEG"}
|
|
@@ -4,7 +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
|
exports.RULE_NAME = 'use-lifecycle-interface';
|
|
7
|
-
const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#
|
|
7
|
+
const STYLE_GUIDE_LINK = 'https://angular.dev/style-guide#use-lifecycle-hook-interfaces';
|
|
8
8
|
exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
9
9
|
name: exports.RULE_NAME,
|
|
10
10
|
meta: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/eslint-plugin",
|
|
3
|
-
"version": "20.5.2-alpha.
|
|
3
|
+
"version": "20.5.2-alpha.8",
|
|
4
4
|
"description": "ESLint plugin for Angular applications, following https://angular.dev/style-guide",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"ts-api-utils": "^2.1.0",
|
|
22
|
-
"@angular-eslint/bundled-angular-compiler": "20.5.2-alpha.
|
|
23
|
-
"@angular-eslint/utils": "20.5.2-alpha.
|
|
22
|
+
"@angular-eslint/bundled-angular-compiler": "20.5.2-alpha.8",
|
|
23
|
+
"@angular-eslint/utils": "20.5.2-alpha.8"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@angular-eslint/test-utils": "20.5.2-alpha.
|
|
26
|
+
"@angular-eslint/test-utils": "20.5.2-alpha.8"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@typescript-eslint/utils": "^7.11.0 || ^8.0.0",
|