@angular-eslint/eslint-plugin 20.5.2 → 20.5.3-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/dist/rules/component-class-suffix.d.ts +3 -0
- package/dist/rules/component-class-suffix.d.ts.map +1 -1
- package/dist/rules/component-class-suffix.js +4 -1
- package/dist/rules/component-max-inline-declarations.d.ts +3 -0
- package/dist/rules/component-max-inline-declarations.d.ts.map +1 -1
- package/dist/rules/component-max-inline-declarations.js +4 -1
- package/dist/rules/component-selector.d.ts +3 -0
- package/dist/rules/component-selector.d.ts.map +1 -1
- package/dist/rules/component-selector.js +4 -1
- package/dist/rules/consistent-component-styles.d.ts +3 -0
- package/dist/rules/consistent-component-styles.d.ts.map +1 -1
- package/dist/rules/consistent-component-styles.js +4 -1
- package/dist/rules/contextual-decorator.d.ts +3 -0
- package/dist/rules/contextual-decorator.d.ts.map +1 -1
- package/dist/rules/contextual-decorator.js +4 -1
- package/dist/rules/contextual-lifecycle.d.ts +3 -0
- package/dist/rules/contextual-lifecycle.d.ts.map +1 -1
- package/dist/rules/contextual-lifecycle.js +4 -1
- package/dist/rules/directive-class-suffix.d.ts +3 -0
- package/dist/rules/directive-class-suffix.d.ts.map +1 -1
- package/dist/rules/directive-class-suffix.js +4 -1
- package/dist/rules/directive-selector.d.ts +3 -0
- package/dist/rules/directive-selector.d.ts.map +1 -1
- package/dist/rules/directive-selector.js +4 -1
- package/dist/rules/no-async-lifecycle-method.d.ts +3 -0
- package/dist/rules/no-async-lifecycle-method.d.ts.map +1 -1
- package/dist/rules/no-async-lifecycle-method.js +4 -1
- package/dist/rules/no-attribute-decorator.d.ts +3 -0
- package/dist/rules/no-attribute-decorator.d.ts.map +1 -1
- package/dist/rules/no-attribute-decorator.js +4 -1
- package/dist/rules/no-conflicting-lifecycle.d.ts +3 -0
- package/dist/rules/no-conflicting-lifecycle.d.ts.map +1 -1
- package/dist/rules/no-conflicting-lifecycle.js +4 -1
- package/dist/rules/no-duplicates-in-metadata-arrays.d.ts +3 -0
- package/dist/rules/no-duplicates-in-metadata-arrays.d.ts.map +1 -1
- package/dist/rules/no-duplicates-in-metadata-arrays.js +4 -1
- package/dist/rules/no-empty-lifecycle-method.d.ts +3 -0
- package/dist/rules/no-empty-lifecycle-method.d.ts.map +1 -1
- package/dist/rules/no-empty-lifecycle-method.js +4 -1
- package/dist/rules/no-forward-ref.d.ts +3 -0
- package/dist/rules/no-forward-ref.d.ts.map +1 -1
- package/dist/rules/no-forward-ref.js +4 -1
- package/dist/rules/no-input-prefix.d.ts +3 -0
- package/dist/rules/no-input-prefix.d.ts.map +1 -1
- package/dist/rules/no-input-prefix.js +4 -1
- package/dist/rules/no-input-rename.d.ts +3 -0
- package/dist/rules/no-input-rename.d.ts.map +1 -1
- package/dist/rules/no-input-rename.js +4 -1
- package/dist/rules/no-inputs-metadata-property.d.ts +3 -0
- package/dist/rules/no-inputs-metadata-property.d.ts.map +1 -1
- package/dist/rules/no-inputs-metadata-property.js +4 -1
- package/dist/rules/no-lifecycle-call.d.ts +3 -0
- package/dist/rules/no-lifecycle-call.d.ts.map +1 -1
- package/dist/rules/no-lifecycle-call.js +4 -1
- package/dist/rules/no-output-native.d.ts +3 -0
- package/dist/rules/no-output-native.d.ts.map +1 -1
- package/dist/rules/no-output-native.js +4 -1
- package/dist/rules/no-output-on-prefix.d.ts +3 -0
- package/dist/rules/no-output-on-prefix.d.ts.map +1 -1
- package/dist/rules/no-output-on-prefix.js +4 -1
- package/dist/rules/no-output-rename.d.ts +3 -0
- package/dist/rules/no-output-rename.d.ts.map +1 -1
- package/dist/rules/no-output-rename.js +4 -1
- package/dist/rules/no-outputs-metadata-property.d.ts +3 -0
- package/dist/rules/no-outputs-metadata-property.d.ts.map +1 -1
- package/dist/rules/no-outputs-metadata-property.js +4 -1
- package/dist/rules/no-pipe-impure.d.ts +3 -0
- package/dist/rules/no-pipe-impure.d.ts.map +1 -1
- package/dist/rules/no-pipe-impure.js +4 -1
- package/dist/rules/no-queries-metadata-property.d.ts +3 -0
- package/dist/rules/no-queries-metadata-property.d.ts.map +1 -1
- package/dist/rules/no-queries-metadata-property.js +4 -1
- package/dist/rules/no-uncalled-signals.d.ts +3 -0
- package/dist/rules/no-uncalled-signals.d.ts.map +1 -1
- package/dist/rules/no-uncalled-signals.js +4 -1
- package/dist/rules/pipe-prefix.d.ts +3 -0
- package/dist/rules/pipe-prefix.d.ts.map +1 -1
- package/dist/rules/pipe-prefix.js +4 -1
- package/dist/rules/prefer-host-metadata-property.d.ts +3 -0
- package/dist/rules/prefer-host-metadata-property.d.ts.map +1 -1
- package/dist/rules/prefer-host-metadata-property.js +4 -1
- package/dist/rules/prefer-inject.d.ts +3 -0
- package/dist/rules/prefer-inject.d.ts.map +1 -1
- package/dist/rules/prefer-inject.js +4 -1
- package/dist/rules/prefer-on-push-component-change-detection.d.ts +3 -0
- package/dist/rules/prefer-on-push-component-change-detection.d.ts.map +1 -1
- package/dist/rules/prefer-on-push-component-change-detection.js +4 -1
- package/dist/rules/prefer-output-emitter-ref.d.ts +3 -0
- package/dist/rules/prefer-output-emitter-ref.d.ts.map +1 -1
- package/dist/rules/prefer-output-emitter-ref.js +4 -1
- package/dist/rules/prefer-output-readonly.d.ts +3 -0
- package/dist/rules/prefer-output-readonly.d.ts.map +1 -1
- package/dist/rules/prefer-output-readonly.js +4 -1
- package/dist/rules/prefer-signals.d.ts +3 -0
- package/dist/rules/prefer-signals.d.ts.map +1 -1
- package/dist/rules/prefer-signals.js +4 -1
- package/dist/rules/prefer-standalone.d.ts +3 -0
- package/dist/rules/prefer-standalone.d.ts.map +1 -1
- package/dist/rules/prefer-standalone.js +4 -1
- package/dist/rules/relative-url-prefix.d.ts +3 -0
- package/dist/rules/relative-url-prefix.d.ts.map +1 -1
- package/dist/rules/relative-url-prefix.js +4 -1
- package/dist/rules/require-lifecycle-on-prototype.d.ts +3 -0
- package/dist/rules/require-lifecycle-on-prototype.d.ts.map +1 -1
- package/dist/rules/require-lifecycle-on-prototype.js +4 -1
- package/dist/rules/require-localize-metadata.d.ts +3 -0
- package/dist/rules/require-localize-metadata.d.ts.map +1 -1
- package/dist/rules/require-localize-metadata.js +4 -1
- package/dist/rules/runtime-localize.d.ts +3 -0
- package/dist/rules/runtime-localize.d.ts.map +1 -1
- package/dist/rules/runtime-localize.js +4 -1
- package/dist/rules/sort-keys-in-type-decorator.d.ts +3 -0
- package/dist/rules/sort-keys-in-type-decorator.d.ts.map +1 -1
- package/dist/rules/sort-keys-in-type-decorator.js +4 -1
- package/dist/rules/sort-lifecycle-methods.d.ts +3 -0
- package/dist/rules/sort-lifecycle-methods.d.ts.map +1 -1
- package/dist/rules/sort-lifecycle-methods.js +4 -1
- package/dist/rules/use-component-selector.d.ts +3 -0
- package/dist/rules/use-component-selector.d.ts.map +1 -1
- package/dist/rules/use-component-selector.js +4 -1
- package/dist/rules/use-component-view-encapsulation.d.ts +3 -0
- package/dist/rules/use-component-view-encapsulation.d.ts.map +1 -1
- package/dist/rules/use-component-view-encapsulation.js +4 -1
- package/dist/rules/use-injectable-provided-in.d.ts +3 -0
- package/dist/rules/use-injectable-provided-in.d.ts.map +1 -1
- package/dist/rules/use-injectable-provided-in.js +4 -1
- package/dist/rules/use-lifecycle-interface.d.ts +3 -0
- package/dist/rules/use-lifecycle-interface.d.ts.map +1 -1
- package/dist/rules/use-lifecycle-interface.js +4 -1
- package/dist/rules/use-pipe-transform-interface.d.ts +3 -0
- package/dist/rules/use-pipe-transform-interface.d.ts.map +1 -1
- package/dist/rules/use-pipe-transform-interface.js +4 -1
- package/package.json +4 -4
|
@@ -7,4 +7,7 @@ export type MessageIds = 'componentClassSuffix';
|
|
|
7
7
|
export declare const RULE_NAME = "component-class-suffix";
|
|
8
8
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"componentClassSuffix", Options, import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
9
9
|
export default _default;
|
|
10
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
11
|
+
rationale: string;
|
|
12
|
+
};
|
|
10
13
|
//# sourceMappingURL=component-class-suffix.d.ts.map
|
|
@@ -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;;AAElD,wBAiDG"}
|
|
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;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = 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';
|
|
@@ -51,3 +51,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
51
51
|
};
|
|
52
52
|
},
|
|
53
53
|
});
|
|
54
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
55
|
+
rationale: "Historically, appending 'Component' to component class names was recommended to make component files easily identifiable. However, as of Angular v20, the Angular Team no longer recommends this convention, favoring simpler class names. This rule remains available for teams that have established this naming pattern and wish to maintain consistency in their existing codebase.",
|
|
56
|
+
};
|
|
@@ -9,4 +9,7 @@ export type MessageIds = 'componentMaxInlineDeclarations';
|
|
|
9
9
|
export declare const RULE_NAME = "component-max-inline-declarations";
|
|
10
10
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"componentMaxInlineDeclarations", Options, import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
11
11
|
export default _default;
|
|
12
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
13
|
+
rationale: string;
|
|
14
|
+
};
|
|
12
15
|
//# sourceMappingURL=component-max-inline-declarations.d.ts.map
|
|
@@ -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;;AAkB7D,wBA4GG"}
|
|
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;AAEH,eAAO,MAAM,mBAAmB;;CAE/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = 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';
|
|
@@ -102,3 +102,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
102
102
|
};
|
|
103
103
|
},
|
|
104
104
|
});
|
|
105
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
106
|
+
rationale: `When templates or styles exceed a few lines, keeping them inline makes components harder to read and maintain. Inline templates and styles cannot be syntax-highlighted as effectively as separate files, complicate code reviews, and make it difficult to quickly understand a component's structure. Moving larger templates and styles to separate files improves readability, enables better IDE support, and follows the separation of concerns principle.`,
|
|
107
|
+
};
|
|
@@ -4,4 +4,7 @@ export type MessageIds = 'prefixFailure' | 'styleFailure' | 'styleAndPrefixFailu
|
|
|
4
4
|
export declare const RULE_NAME = "component-selector";
|
|
5
5
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, SelectorUtils.Options, import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
6
6
|
export default _default;
|
|
7
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
8
|
+
rationale: string;
|
|
9
|
+
};
|
|
7
10
|
//# sourceMappingURL=component-selector.d.ts.map
|
|
@@ -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;;AAS9C,wBAyHG"}
|
|
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;AAiBH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = exports.RULE_NAME = void 0;
|
|
4
4
|
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");
|
|
@@ -119,3 +119,6 @@ function hasEncapsulationShadowDomProperty(node) {
|
|
|
119
119
|
utils_2.ASTUtils.isIdentifier(encapsulationValue.property) &&
|
|
120
120
|
encapsulationValue.property.name === VIEW_ENCAPSULATION_SHADOW_DOM);
|
|
121
121
|
}
|
|
122
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
123
|
+
rationale: "Consistent component selector naming conventions provide several benefits: they make components easily identifiable in templates and browser DevTools, prevent naming collisions with native HTML elements and third-party components, enable teams to quickly identify which library or feature area a component belongs to, and align with the Web Components specification for custom elements. For example, prefixing selectors with 'app-' (like 'app-user-profile') clearly distinguishes your application components from third-party libraries.",
|
|
124
|
+
};
|
|
@@ -4,4 +4,7 @@ export type MessageIds = 'useStylesArray' | 'useStylesString' | 'useStyleUrl' |
|
|
|
4
4
|
export declare const RULE_NAME = "consistent-component-styles";
|
|
5
5
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, Options, import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
6
6
|
export default _default;
|
|
7
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
8
|
+
rationale: string;
|
|
9
|
+
};
|
|
7
10
|
//# sourceMappingURL=consistent-component-styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consistent-component-styles.d.ts","sourceRoot":"","sources":["../../src/rules/consistent-component-styles.ts"],"names":[],"mappings":"AAIA,KAAK,IAAI,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC/B,MAAM,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACnC,MAAM,MAAM,UAAU,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,aAAa,GACb,cAAc,CAAC;AACnB,eAAO,MAAM,SAAS,gCAAgC,CAAC;;AAEvD,wBAwHG"}
|
|
1
|
+
{"version":3,"file":"consistent-component-styles.d.ts","sourceRoot":"","sources":["../../src/rules/consistent-component-styles.ts"],"names":[],"mappings":"AAIA,KAAK,IAAI,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC/B,MAAM,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACnC,MAAM,MAAM,UAAU,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,aAAa,GACb,cAAc,CAAC;AACnB,eAAO,MAAM,SAAS,gCAAgC,CAAC;;AAEvD,wBAwHG;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = 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 = 'consistent-component-styles';
|
|
@@ -94,3 +94,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
});
|
|
97
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
98
|
+
rationale: "Consistency in how styles are declared makes codebases easier to navigate and maintain. When some components use styleUrl while others use styleUrls, or when styles are sometimes arrays and sometimes strings, it becomes harder for developers to predict what they'll find when opening a component. This rule enforces a consistent pattern across your codebase. Angular 17+ introduced the singular styleUrl property alongside the existing styleUrls array for common cases where components have only one stylesheet. Choosing one approach and sticking with it reduces cognitive load and makes the codebase feel more cohesive.",
|
|
99
|
+
};
|
|
@@ -4,4 +4,7 @@ export type MessageIds = 'contextualDecorator';
|
|
|
4
4
|
export declare const RULE_NAME = "contextual-decorator";
|
|
5
5
|
declare const _default: TSESLint.RuleModule<"contextualDecorator", [], import("../utils/create-eslint-rule").RuleDocs, TSESLint.RuleListener>;
|
|
6
6
|
export default _default;
|
|
7
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
8
|
+
rationale: string;
|
|
9
|
+
};
|
|
7
10
|
//# sourceMappingURL=contextual-decorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextual-decorator.d.ts","sourceRoot":"","sources":["../../src/rules/contextual-decorator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAGnE,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAC/C,eAAO,MAAM,SAAS,yBAAyB,CAAC;;AAEhD,wBA2BG"}
|
|
1
|
+
{"version":3,"file":"contextual-decorator.d.ts","sourceRoot":"","sources":["../../src/rules/contextual-decorator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAGnE,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAC/C,eAAO,MAAM,SAAS,yBAAyB,CAAC;;AAEhD,wBA2BG;AA2DH,eAAO,MAAM,mBAAmB;;CAE/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = 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 = 'contextual-decorator';
|
|
@@ -56,3 +56,6 @@ function validateDecorator(context, decorator, classDecoratorName) {
|
|
|
56
56
|
data: { classDecoratorName },
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
60
|
+
rationale: `Angular decorators like @Input(), @Output(), @ViewChild(), and @HostBinding() are only meaningful in specific class types. For example, @Input() and @Output() only work in @Component or @Directive classes because they define the component/directive's API. Using these decorators in @Injectable() classes or @Pipe() classes will not work as expected, as Angular does not process these decorators in those contexts. This rule prevents bugs by ensuring decorators are only used where Angular will recognize and process them.`,
|
|
61
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'contextualLifecycle';
|
|
|
3
3
|
export declare const RULE_NAME = "contextual-lifecycle";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"contextualLifecycle", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
5
5
|
export default _default;
|
|
6
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
7
|
+
rationale: string;
|
|
8
|
+
};
|
|
6
9
|
//# sourceMappingURL=contextual-lifecycle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextual-lifecycle.d.ts","sourceRoot":"","sources":["../../src/rules/contextual-lifecycle.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAC/C,eAAO,MAAM,SAAS,yBAAyB,CAAC;;AAEhD,wBA8DG"}
|
|
1
|
+
{"version":3,"file":"contextual-lifecycle.d.ts","sourceRoot":"","sources":["../../src/rules/contextual-lifecycle.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAC/C,eAAO,MAAM,SAAS,yBAAyB,CAAC;;AAEhD,wBA8DG;AAEH,eAAO,MAAM,mBAAmB;;CAE/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = 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 = 'contextual-lifecycle';
|
|
@@ -56,3 +56,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
56
56
|
};
|
|
57
57
|
},
|
|
58
58
|
});
|
|
59
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
60
|
+
rationale: `Angular lifecycle hooks are only invoked for specific class types. For example, ngOnInit(), ngOnChanges(), and ngOnDestroy() are only called for components and directives, not for services (@Injectable), pipes (@Pipe), or modules (@NgModule). Defining these lifecycle methods in the wrong class type gives a false impression that they will be called, leading to bugs where initialization or cleanup logic never executes. This rule ensures lifecycle methods are only used where Angular will actually invoke them.`,
|
|
61
|
+
};
|
|
@@ -5,4 +5,7 @@ export type MessageIds = 'directiveClassSuffix';
|
|
|
5
5
|
export declare const RULE_NAME = "directive-class-suffix";
|
|
6
6
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"directiveClassSuffix", Options, import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
7
7
|
export default _default;
|
|
8
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
9
|
+
rationale: string;
|
|
10
|
+
};
|
|
8
11
|
//# sourceMappingURL=directive-class-suffix.d.ts.map
|
|
@@ -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;;AAIlD,wBA4DG"}
|
|
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;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = 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';
|
|
@@ -55,3 +55,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
55
55
|
};
|
|
56
56
|
},
|
|
57
57
|
});
|
|
58
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
59
|
+
rationale: "Historically, appending 'Directive' to directive class names was recommended to distinguish directives from other classes. However, as of Angular v20, the Angular Team no longer recommends this convention, favoring simpler class names. This rule remains available for teams that have established this naming pattern and wish to maintain consistency in their existing codebase.",
|
|
60
|
+
};
|
|
@@ -4,4 +4,7 @@ export type MessageIds = 'prefixFailure' | 'styleFailure' | 'typeFailure';
|
|
|
4
4
|
export declare const RULE_NAME = "directive-selector";
|
|
5
5
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, SelectorUtils.Options, import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
6
6
|
export default _default;
|
|
7
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
8
|
+
rationale: string;
|
|
9
|
+
};
|
|
7
10
|
//# sourceMappingURL=directive-selector.d.ts.map
|
|
@@ -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;;AAK9C,wBAgGG"}
|
|
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;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = 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';
|
|
@@ -86,3 +86,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
86
86
|
};
|
|
87
87
|
},
|
|
88
88
|
});
|
|
89
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
90
|
+
rationale: "Consistent directive selector naming conventions help identify which directives belong to your application versus third-party libraries, prevent naming collisions with native HTML attributes and other directives, and make code reviews and debugging easier. For example, using a camelCase attribute selector with a prefix like 'appHighlight' makes it immediately clear that this is a custom directive from your application.",
|
|
91
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noAsyncLifecycleMethod';
|
|
|
3
3
|
export declare const RULE_NAME = "no-async-lifecycle-method";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noAsyncLifecycleMethod", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
5
5
|
export default _default;
|
|
6
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
7
|
+
rationale: string;
|
|
8
|
+
};
|
|
6
9
|
//# sourceMappingURL=no-async-lifecycle-method.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-async-lifecycle-method.d.ts","sourceRoot":"","sources":["../../src/rules/no-async-lifecycle-method.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAClD,eAAO,MAAM,SAAS,8BAA8B,CAAC;;AAErD,wBAyCG"}
|
|
1
|
+
{"version":3,"file":"no-async-lifecycle-method.d.ts","sourceRoot":"","sources":["../../src/rules/no-async-lifecycle-method.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAClD,eAAO,MAAM,SAAS,8BAA8B,CAAC;;AAErD,wBAyCG;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = 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 = 'no-async-lifecycle-method';
|
|
@@ -40,3 +40,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
40
40
|
};
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
44
|
+
rationale: "Angular does not wait for async lifecycle methods to complete before continuing with the component lifecycle. If you make ngOnInit() async, Angular will call it and immediately move on without waiting for any await statements inside to resolve. This creates a misleading code pattern where it appears Angular will wait for asynchronous operations to complete, but it won't. For example, if ngOnInit() fetches data asynchronously, the component will continue rendering with potentially incomplete data. Instead of making lifecycle methods async, call async functions from within them and handle the promises appropriately, or use Angular patterns like resolvers, signals with async pipes, or reactive approaches with RxJS.",
|
|
45
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noAttributeDecorator';
|
|
|
3
3
|
export declare const RULE_NAME = "no-attribute-decorator";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noAttributeDecorator", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
5
5
|
export default _default;
|
|
6
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
7
|
+
rationale: string;
|
|
8
|
+
};
|
|
6
9
|
//# sourceMappingURL=no-attribute-decorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-attribute-decorator.d.ts","sourceRoot":"","sources":["../../src/rules/no-attribute-decorator.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAChD,eAAO,MAAM,SAAS,2BAA2B,CAAC;;AAElD,wBA0BG"}
|
|
1
|
+
{"version":3,"file":"no-attribute-decorator.d.ts","sourceRoot":"","sources":["../../src/rules/no-attribute-decorator.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAChD,eAAO,MAAM,SAAS,2BAA2B,CAAC;;AAElD,wBA0BG;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = exports.RULE_NAME = void 0;
|
|
4
4
|
const create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
5
5
|
exports.RULE_NAME = 'no-attribute-decorator';
|
|
6
6
|
exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
@@ -27,3 +27,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
27
27
|
};
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
31
|
+
rationale: 'The @Attribute decorator is frequently misunderstood and misused. Unlike @Input(), which creates a binding that updates when the input value changes, @Attribute reads the attribute value only once during component construction and never updates. This single-read behavior is rarely what developers intend when they want to receive data from a parent component. In almost all cases, @Input() is the correct choice because it provides reactive updates. The @Attribute decorator is only appropriate for very specific optimization scenarios where you know the value will never change and want to avoid the overhead of change detection for that property. To prevent bugs from this common mistake, this rule disallows @Attribute entirely and encourages using @Input() instead, or modern signal-based inputs via input().',
|
|
32
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noConflictingLifecycleInterface' | 'noConflictingLifec
|
|
|
3
3
|
export declare const RULE_NAME = "no-conflicting-lifecycle";
|
|
4
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
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
7
|
+
rationale: string;
|
|
8
|
+
};
|
|
6
9
|
//# sourceMappingURL=no-conflicting-lifecycle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-conflicting-lifecycle.d.ts","sourceRoot":"","sources":["../../src/rules/no-conflicting-lifecycle.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAClB,iCAAiC,GACjC,8BAA8B,CAAC;AACnC,eAAO,MAAM,SAAS,6BAA6B,CAAC;;AAWpD,wBA6EG"}
|
|
1
|
+
{"version":3,"file":"no-conflicting-lifecycle.d.ts","sourceRoot":"","sources":["../../src/rules/no-conflicting-lifecycle.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAClB,iCAAiC,GACjC,8BAA8B,CAAC;AACnC,eAAO,MAAM,SAAS,6BAA6B,CAAC;;AAWpD,wBA6EG;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = exports.RULE_NAME = void 0;
|
|
4
4
|
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");
|
|
@@ -68,3 +68,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
68
68
|
};
|
|
69
69
|
},
|
|
70
70
|
});
|
|
71
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
72
|
+
rationale: 'This rule was created with the intent to prevent potential issues when both DoCheck and OnChanges lifecycle hooks are implemented together, as they both deal with change detection and could create confusing or duplicated logic. However, the rule has proven to be overly broad in practice. It triggers whenever a component or directive implements both hooks, regardless of whether they actually conflict or track the same data. In reality, there are legitimate use cases where both hooks can coexist without issues—for instance, using OnChanges to respond to specific input changes while using DoCheck for custom change detection logic on different data. Because the rule cannot accurately determine whether the hooks are actually conflicting (i.e., checking the same variables), it produces false positives and has been removed from the recommended configuration. While the rule was well-intentioned, it should not be relied upon in practice.',
|
|
73
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noDuplicatesInMetadataArrays';
|
|
|
3
3
|
export declare const RULE_NAME = "no-duplicates-in-metadata-arrays";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noDuplicatesInMetadataArrays", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
5
5
|
export default _default;
|
|
6
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
7
|
+
rationale: string;
|
|
8
|
+
};
|
|
6
9
|
//# sourceMappingURL=no-duplicates-in-metadata-arrays.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-duplicates-in-metadata-arrays.d.ts","sourceRoot":"","sources":["../../src/rules/no-duplicates-in-metadata-arrays.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,8BAA8B,CAAC;AACxD,eAAO,MAAM,SAAS,qCAAqC,CAAC;;AAE5D,wBA4CG"}
|
|
1
|
+
{"version":3,"file":"no-duplicates-in-metadata-arrays.d.ts","sourceRoot":"","sources":["../../src/rules/no-duplicates-in-metadata-arrays.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,8BAA8B,CAAC;AACxD,eAAO,MAAM,SAAS,qCAAqC,CAAC;;AAE5D,wBA4CG;AAoBH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = 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 utils_2 = require("@typescript-eslint/utils");
|
|
@@ -62,3 +62,6 @@ function getDuplicateItems(elements) {
|
|
|
62
62
|
});
|
|
63
63
|
return duplicateItems;
|
|
64
64
|
}
|
|
65
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
66
|
+
rationale: 'Duplicate entries in Angular metadata arrays like providers, imports, declarations, or exports serve no purpose and indicate a mistake. When the same provider is listed twice in a providers array, Angular will create it twice, potentially leading to unexpected behavior with singleton services. Duplicate imports or declarations simply waste bundle size and make the metadata harder to read. These duplicates typically occur from copy-paste errors, merge conflicts, or refactoring mistakes. Catching these duplicates early prevents subtle bugs and keeps module metadata clean and understandable.',
|
|
67
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noEmptyLifecycleMethod' | 'suggestRemoveLifecycleMetho
|
|
|
3
3
|
export declare const RULE_NAME = "no-empty-lifecycle-method";
|
|
4
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
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
7
|
+
rationale: string;
|
|
8
|
+
};
|
|
6
9
|
//# sourceMappingURL=no-empty-lifecycle-method.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-empty-lifecycle-method.d.ts","sourceRoot":"","sources":["../../src/rules/no-empty-lifecycle-method.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAClB,wBAAwB,GACxB,8BAA8B,CAAC;AACnC,eAAO,MAAM,SAAS,8BAA8B,CAAC;;AAErD,wBAsFG"}
|
|
1
|
+
{"version":3,"file":"no-empty-lifecycle-method.d.ts","sourceRoot":"","sources":["../../src/rules/no-empty-lifecycle-method.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAClB,wBAAwB,GACxB,8BAA8B,CAAC;AACnC,eAAO,MAAM,SAAS,8BAA8B,CAAC;;AAErD,wBAsFG;AAYH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = 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 = 'no-empty-lifecycle-method';
|
|
@@ -70,3 +70,6 @@ function getTotalInterfaceOccurrences(text, interfaceName) {
|
|
|
70
70
|
.split(' ')
|
|
71
71
|
.filter((item) => stripSpecialCharacters(item) === interfaceName).length;
|
|
72
72
|
}
|
|
73
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
74
|
+
rationale: 'Empty lifecycle methods add noise to the codebase without providing any value. When a developer sees ngOnInit(), ngOnDestroy(), or other lifecycle hooks, they expect to find important initialization, cleanup, or other lifecycle-related logic. Finding an empty method wastes time during code review and maintenance. Empty lifecycle methods often remain after code has been refactored or removed, serving as dead code that clutters the component. They also require unnecessary imports of lifecycle interfaces (like OnInit, OnDestroy). Removing empty lifecycle methods makes components cleaner, easier to understand, and reduces the file size.',
|
|
75
|
+
};
|
|
@@ -4,4 +4,7 @@ export declare const RULE_NAME = "no-forward-ref";
|
|
|
4
4
|
export declare const FORWARD_REF = "forwardRef";
|
|
5
5
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noForwardRef", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
6
6
|
export default _default;
|
|
7
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
8
|
+
rationale: string;
|
|
9
|
+
};
|
|
7
10
|
//# sourceMappingURL=no-forward-ref.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-forward-ref.d.ts","sourceRoot":"","sources":["../../src/rules/no-forward-ref.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AACxC,eAAO,MAAM,SAAS,mBAAmB,CAAC;AAE1C,eAAO,MAAM,WAAW,eAAe,CAAC;;AAExC,wBAyBG"}
|
|
1
|
+
{"version":3,"file":"no-forward-ref.d.ts","sourceRoot":"","sources":["../../src/rules/no-forward-ref.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AACxC,eAAO,MAAM,SAAS,mBAAmB,CAAC;AAE1C,eAAO,MAAM,WAAW,eAAe,CAAC;;AAExC,wBAyBG;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FORWARD_REF = exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = exports.FORWARD_REF = exports.RULE_NAME = void 0;
|
|
4
4
|
const create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
5
5
|
exports.RULE_NAME = 'no-forward-ref';
|
|
6
6
|
exports.FORWARD_REF = 'forwardRef';
|
|
@@ -28,3 +28,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
28
28
|
};
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
32
|
+
rationale: "The forwardRef() function is a workaround for circular dependencies in Angular's dependency injection system, but it obscures the dependency graph and can make code harder to understand and maintain. When forwardRef() is used, it's often a sign of poor architecture, such as circular dependencies between components or services that could be resolved through better abstraction. Modern Angular and TypeScript have reduced the need for forwardRef() in most cases. Instead, consider restructuring your code to eliminate circular dependencies, using interfaces for dependency injection, or moving shared logic into a separate service.",
|
|
33
|
+
};
|
|
@@ -5,4 +5,7 @@ export type MessageIds = 'noInputPrefix';
|
|
|
5
5
|
export declare const RULE_NAME = "no-input-prefix";
|
|
6
6
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noInputPrefix", Options, import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
7
7
|
export default _default;
|
|
8
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
9
|
+
rationale: string;
|
|
10
|
+
};
|
|
8
11
|
//# sourceMappingURL=no-input-prefix.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-input-prefix.d.ts","sourceRoot":"","sources":["../../src/rules/no-input-prefix.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,eAAe,CAAC;AACzC,eAAO,MAAM,SAAS,oBAAoB,CAAC;;AAE3C,wBAwIG"}
|
|
1
|
+
{"version":3,"file":"no-input-prefix.d.ts","sourceRoot":"","sources":["../../src/rules/no-input-prefix.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,eAAe,CAAC;AACzC,eAAO,MAAM,SAAS,oBAAoB,CAAC;;AAE3C,wBAwIG;AAWH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = exports.RULE_NAME = void 0;
|
|
4
4
|
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");
|
|
@@ -113,3 +113,6 @@ function isDisallowedPrefix(prefix, propertyName, aliasName = '') {
|
|
|
113
113
|
const prefixPattern = new RegExp(`^${prefix}(([^a-z])|(?=$))`);
|
|
114
114
|
return prefixPattern.test(propertyName) || prefixPattern.test(aliasName);
|
|
115
115
|
}
|
|
116
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
117
|
+
rationale: "In HTML and Angular templates, attributes don't use prefixes like 'is' or 'has', so input properties shouldn't either. For example, prefer '@Input() disabled' over '@Input() isDisabled', so it's used in templates as '[disabled]=\"true\"' rather than '[isDisabled]=\"true\"'. This creates a more natural, HTML-like API for your components and follows Angular's style guide. The component class can still use prefixed names internally, but the input binding name (the public API) should follow HTML conventions.",
|
|
118
|
+
};
|
|
@@ -5,4 +5,7 @@ export type MessageIds = 'noInputRename' | 'suggestRemoveAliasName' | 'suggestRe
|
|
|
5
5
|
export declare const RULE_NAME = "no-input-rename";
|
|
6
6
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, Options, import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
7
7
|
export default _default;
|
|
8
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
9
|
+
rationale: string;
|
|
10
|
+
};
|
|
8
11
|
//# sourceMappingURL=no-input-rename.d.ts.map
|
|
@@ -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;;AAI3C,wBAgQG"}
|
|
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;AAqBH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = exports.RULE_NAME = void 0;
|
|
4
4
|
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");
|
|
@@ -208,3 +208,6 @@ function isAliasNameAllowed(selectors, propertyName, aliasName, selectorDirectiv
|
|
|
208
208
|
composedName(selector, propertyName) === aliasName);
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
212
|
+
rationale: "Renaming inputs creates a confusing situation where the property has one name inside the component class (private name) and a different name in templates (public name). For example, with the @Input() decorator: '@Input(\"userName\") name: string' means you access 'this.name' in the component but bind with '[userName]' in templates. Similarly, with the signal-based input() function: 'userName = input<string>({ alias: \"name\" })' means you access 'this.userName()' internally but bind with '[name]' in templates. This dual naming makes the code harder to understand, complicates refactoring, and can cause bugs when developers forget which name to use in which context. Keep the internal and external names the same unless you have a strong reason for the mismatch.",
|
|
213
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noInputsMetadataProperty';
|
|
|
3
3
|
export declare const RULE_NAME = "no-inputs-metadata-property";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noInputsMetadataProperty", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
5
5
|
export default _default;
|
|
6
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
7
|
+
rationale: string;
|
|
8
|
+
};
|
|
6
9
|
//# sourceMappingURL=no-inputs-metadata-property.d.ts.map
|
|
@@ -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;;AAGvD,wBAoDG"}
|
|
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;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = exports.RULE_NAME = void 0;
|
|
4
4
|
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");
|
|
@@ -48,3 +48,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
48
48
|
};
|
|
49
49
|
},
|
|
50
50
|
});
|
|
51
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
52
|
+
rationale: "Using the 'inputs' metadata property (@Component({ inputs: ['name'] })) is discouraged in favor of modern alternatives like the signal-based input() function (introduced in Angular v17.1) or the @Input() decorator. Modern approaches offer several benefits: (1) they make it immediately clear which properties are part of the component's API when reading the class, (2) configuration happens in one place right next to the property, (3) they work better with IDE features like Find References and Rename Refactoring, (4) input() provides signal-based reactivity with built-in features like required inputs, transforms, and aliases, and (5) @Input() decorator offers similar features for non-signal inputs. The metadata property approach is a legacy pattern that obscures the component's interface and requires looking in two places (decorator metadata and class body) to understand the component's API. For new code, prefer input() for signal-based reactivity or @Input() for traditional inputs.",
|
|
53
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noLifecycleCall';
|
|
|
3
3
|
export declare const RULE_NAME = "no-lifecycle-call";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noLifecycleCall", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
5
5
|
export default _default;
|
|
6
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
7
|
+
rationale: string;
|
|
8
|
+
};
|
|
6
9
|
//# sourceMappingURL=no-lifecycle-call.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-lifecycle-call.d.ts","sourceRoot":"","sources":["../../src/rules/no-lifecycle-call.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAC3C,eAAO,MAAM,SAAS,sBAAsB,CAAC;;AAE7C,wBAwCG"}
|
|
1
|
+
{"version":3,"file":"no-lifecycle-call.d.ts","sourceRoot":"","sources":["../../src/rules/no-lifecycle-call.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAC3C,eAAO,MAAM,SAAS,sBAAsB,CAAC;;AAE7C,wBAwCG;AAsBH,eAAO,MAAM,mBAAmB;;CAE/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = exports.RULE_NAME = void 0;
|
|
4
4
|
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");
|
|
@@ -44,3 +44,6 @@ function isSuperCallAllowed(node) {
|
|
|
44
44
|
const methodDefinition = utils_1.ASTUtils.getNearestNodeFrom(node, utils_1.ASTUtils.isMethodDefinition);
|
|
45
45
|
return Boolean(methodDefinition && hasSameName(node, methodDefinition));
|
|
46
46
|
}
|
|
47
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
48
|
+
rationale: `Lifecycle hooks like ngOnInit(), ngOnDestroy(), and ngOnChanges() are designed to be called automatically by Angular at the appropriate times in a component's lifecycle. Calling them manually (e.g., 'this.ngOnInit()') breaks Angular's lifecycle management, can cause hooks to run multiple times or in the wrong order, and makes the code's execution flow harder to understand. The only exception is calling super.ngOnInit() in a derived class to ensure the parent class's initialization runs. If you need to share initialization logic, extract it into a separate method that both ngOnInit() and your other code can call.`,
|
|
49
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noOutputNative';
|
|
|
3
3
|
export declare const RULE_NAME = "no-output-native";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noOutputNative", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
5
5
|
export default _default;
|
|
6
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
7
|
+
rationale: string;
|
|
8
|
+
};
|
|
6
9
|
//# sourceMappingURL=no-output-native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-output-native.d.ts","sourceRoot":"","sources":["../../src/rules/no-output-native.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAC1C,eAAO,MAAM,SAAS,qBAAqB,CAAC;;AAE5C,wBA8CG"}
|
|
1
|
+
{"version":3,"file":"no-output-native.d.ts","sourceRoot":"","sources":["../../src/rules/no-output-native.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAC1C,eAAO,MAAM,SAAS,qBAAqB,CAAC;;AAE5C,wBA8CG;AAEH,eAAO,MAAM,mBAAmB;;CAE/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RULE_NAME = void 0;
|
|
3
|
+
exports.RULE_DOCS_EXTENSION = 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 = 'no-output-native';
|
|
@@ -42,3 +42,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
42
42
|
};
|
|
43
43
|
},
|
|
44
44
|
});
|
|
45
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
46
|
+
rationale: `Naming an @Output() the same as a native DOM event (like 'click', 'change', or 'blur') creates ambiguous and confusing template bindings. For example, if a component has '@Output() click', the template '(click)="handler()"' could be binding to either the component's custom output OR the native DOM click event, depending on the context. This ambiguity leads to bugs and makes code harder to understand. Instead, use descriptive names that clearly indicate these are custom component events, such as 'userSelected' or 'itemDeleted' instead of generic names like 'click' or 'select'.`,
|
|
47
|
+
};
|