@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
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noOutputOnPrefix';
|
|
|
3
3
|
export declare const RULE_NAME = "no-output-on-prefix";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noOutputOnPrefix", [], 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-on-prefix.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-output-on-prefix.d.ts","sourceRoot":"","sources":["../../src/rules/no-output-on-prefix.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC;AAC5C,eAAO,MAAM,SAAS,wBAAwB,CAAC;;AAI/C,wBA4CG"}
|
|
1
|
+
{"version":3,"file":"no-output-on-prefix.d.ts","sourceRoot":"","sources":["../../src/rules/no-output-on-prefix.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC;AAC5C,eAAO,MAAM,SAAS,wBAAwB,CAAC;;AAI/C,wBA4CG;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-output-on-prefix';
|
|
@@ -43,3 +43,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
43
43
|
};
|
|
44
44
|
},
|
|
45
45
|
});
|
|
46
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
47
|
+
rationale: "Angular's template syntax allows both '(eventName)' and 'on-eventName' for event bindings. If you prefix an output with 'on', this creates awkward template syntax like '(onUserClick)' or the even more redundant 'on-onUserClick'. This violates the principle of least surprise and makes templates harder to read. Instead, name outputs as simple actions or events (like 'userClick'), which Angular templates will bind as '(userClick)' or 'on-userClick'.",
|
|
48
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noOutputRename' | 'suggestRemoveAliasName' | 'suggestR
|
|
|
3
3
|
export declare const RULE_NAME = "no-output-rename";
|
|
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-output-rename.d.ts.map
|
|
@@ -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;;AAI5C,wBAgMG"}
|
|
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;AAmBH,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");
|
|
@@ -167,3 +167,6 @@ function isAliasNameAllowed(selectors, propertyName, aliasName) {
|
|
|
167
167
|
composedName(selector, propertyName) === aliasName);
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
171
|
+
rationale: "Renaming outputs creates a confusing situation where the output has one name inside the component class (private name) and a different name in templates (public name). For example, with the @Output() decorator: '@Output(\"userDeleted\") delete = new EventEmitter()' means you call 'this.delete.emit()' in the component but bind with '(userDeleted)' in templates. Similarly, with the output() function: 'userDeleted = output({ alias: \"delete\" })' means you call 'this.userDeleted.emit()' internally but bind with '(delete)' 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.",
|
|
172
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noOutputsMetadataProperty';
|
|
|
3
3
|
export declare const RULE_NAME = "no-outputs-metadata-property";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noOutputsMetadataProperty", [], 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-outputs-metadata-property.d.ts.map
|
|
@@ -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;;AAGxD,wBAoDG"}
|
|
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;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 'outputs' metadata property (@Component({ outputs: ['change'] })) is discouraged in favor of modern alternatives like the output() function (introduced in Angular v17.3) or the @Output() decorator. Modern approaches offer several benefits: (1) they make it immediately clear which properties are event emitters 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) output() uses OutputEmitterRef which provides better type safety and a more modern API than EventEmitter, and (5) @Output() decorator remains valid for EventEmitter-based outputs. 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 public API. For new code, prefer output() for its improved type safety or @Output() for traditional EventEmitter-based outputs.",
|
|
53
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noPipeImpure' | 'suggestRemovePipeImpure';
|
|
|
3
3
|
export declare const RULE_NAME = "no-pipe-impure";
|
|
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-pipe-impure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-pipe-impure.d.ts","sourceRoot":"","sources":["../../src/rules/no-pipe-impure.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,yBAAyB,CAAC;AACpE,eAAO,MAAM,SAAS,mBAAmB,CAAC;;AAE1C,wBAuCG"}
|
|
1
|
+
{"version":3,"file":"no-pipe-impure.d.ts","sourceRoot":"","sources":["../../src/rules/no-pipe-impure.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,yBAAyB,CAAC;AACpE,eAAO,MAAM,SAAS,mBAAmB,CAAC;;AAE1C,wBAuCG;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-pipe-impure';
|
|
@@ -37,3 +37,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
37
37
|
};
|
|
38
38
|
},
|
|
39
39
|
});
|
|
40
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
41
|
+
rationale: `Impure pipes are executed on every change detection cycle, regardless of whether their inputs have changed. In a typical Angular application, change detection runs very frequently (on every user interaction, timer, HTTP request, etc.). An impure pipe in a template with a list of 100 items might execute 100 times per change detection cycle, potentially thousands of times per second, causing severe performance problems. Pure pipes (the default) only re-execute when their input references change, making them much more efficient. Impure pipes should be avoided unless you have a specific need and understand the performance implications. In most cases, you can achieve the same result with a pure pipe and proper change detection strategy.`,
|
|
42
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'noQueriesMetadataProperty';
|
|
|
3
3
|
export declare const RULE_NAME = "no-queries-metadata-property";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noQueriesMetadataProperty", [], 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-queries-metadata-property.d.ts.map
|
|
@@ -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;;AAIxD,wBAiCG"}
|
|
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;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-queries-metadata-property';
|
|
@@ -33,3 +33,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
33
33
|
};
|
|
34
34
|
},
|
|
35
35
|
});
|
|
36
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
37
|
+
rationale: "Using the 'queries' metadata property (@Component({ queries: { child: new ViewChild('ref') } })) is discouraged in favor of decorator syntax (@ViewChild('ref')) because: (1) decorators make it immediately clear which properties are view/content queries when reading the class, (2) decorators allow configuration right next to the property declaration, (3) decorator syntax works better with IDE features and TypeScript type checking, and (4) the decorator approach is the standard modern Angular pattern. The metadata property approach is a legacy pattern that makes code harder to read and maintain.",
|
|
38
|
+
};
|
|
@@ -4,4 +4,7 @@ export type MessageIds = 'noUncalledSignals' | 'suggestCallSignal';
|
|
|
4
4
|
export declare const RULE_NAME = "no-uncalled-signals";
|
|
5
5
|
declare const _default: ESLintUtils.RuleModule<MessageIds, [], import("../utils/create-eslint-rule").RuleDocs, ESLintUtils.RuleListener>;
|
|
6
6
|
export default _default;
|
|
7
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
8
|
+
rationale: string;
|
|
9
|
+
};
|
|
7
10
|
//# sourceMappingURL=no-uncalled-signals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-uncalled-signals.d.ts","sourceRoot":"","sources":["../../src/rules/no-uncalled-signals.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EAGZ,MAAM,0BAA0B,CAAC;AAIlC,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AACnE,eAAO,MAAM,SAAS,wBAAwB,CAAC;;AAW/C,wBAwEG"}
|
|
1
|
+
{"version":3,"file":"no-uncalled-signals.d.ts","sourceRoot":"","sources":["../../src/rules/no-uncalled-signals.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EAGZ,MAAM,0BAA0B,CAAC;AAIlC,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AACnE,eAAO,MAAM,SAAS,wBAAwB,CAAC;;AAW/C,wBAwEG;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("@typescript-eslint/utils");
|
|
5
5
|
const create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
6
6
|
const signals_1 = require("../utils/signals");
|
|
@@ -69,3 +69,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
69
69
|
};
|
|
70
70
|
},
|
|
71
71
|
});
|
|
72
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
73
|
+
rationale: "Angular signals are functions that must be called to retrieve their value. A common mistake, especially for developers new to signals, is to use the signal itself in conditional or logical expressions without calling it first. For example, 'if (mySignal)' checks if the signal function exists (which is always true), not whether the signal's value is truthy. You need 'if (mySignal())' to check the value. This bug is easy to make because signals look like regular properties but behave like functions. The mistake leads to logic errors where conditions always evaluate incorrectly. This rule catches these mistakes by detecting when signals are used in conditionals, comparisons, or logical operations without being called.",
|
|
74
|
+
};
|
|
@@ -7,4 +7,7 @@ export type MessageIds = 'pipePrefix';
|
|
|
7
7
|
export declare const RULE_NAME = "pipe-prefix";
|
|
8
8
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"pipePrefix", 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=pipe-prefix.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipe-prefix.d.ts","sourceRoot":"","sources":["../../src/rules/pipe-prefix.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC;AACtC,eAAO,MAAM,SAAS,gBAAgB,CAAC;;AAEvC,wBAmFG"}
|
|
1
|
+
{"version":3,"file":"pipe-prefix.d.ts","sourceRoot":"","sources":["../../src/rules/pipe-prefix.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC;AACtC,eAAO,MAAM,SAAS,gBAAgB,CAAC;;AAEvC,wBAmFG;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 = 'pipe-prefix';
|
|
@@ -75,3 +75,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
75
75
|
};
|
|
76
76
|
},
|
|
77
77
|
});
|
|
78
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
79
|
+
rationale: "Prefixing pipe names helps prevent naming collisions between pipes from different libraries or modules, and makes it clear which pipes belong to your application versus third-party libraries. For example, prefixing with 'app' creates pipe names like 'appCurrency' instead of just 'currency', avoiding conflicts with Angular's built-in pipes.",
|
|
80
|
+
};
|
|
@@ -2,4 +2,7 @@ export type MessageIds = 'preferHostMetadataPropertyForBinding' | 'preferHostMet
|
|
|
2
2
|
export declare const RULE_NAME = "prefer-host-metadata-property";
|
|
3
3
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
4
4
|
export default _default;
|
|
5
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
6
|
+
rationale: string;
|
|
7
|
+
};
|
|
5
8
|
//# sourceMappingURL=prefer-host-metadata-property.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefer-host-metadata-property.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-host-metadata-property.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,UAAU,GAClB,sCAAsC,GACtC,uCAAuC,CAAC;AAC5C,eAAO,MAAM,SAAS,kCAAkC,CAAC;;AAEzD,wBAiCG"}
|
|
1
|
+
{"version":3,"file":"prefer-host-metadata-property.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-host-metadata-property.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,UAAU,GAClB,sCAAsC,GACtC,uCAAuC,CAAC;AAC5C,eAAO,MAAM,SAAS,kCAAkC,CAAC;;AAEzD,wBAiCG;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 = 'prefer-host-metadata-property';
|
|
@@ -35,3 +35,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
35
35
|
};
|
|
36
36
|
},
|
|
37
37
|
});
|
|
38
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
39
|
+
rationale: 'Using the host metadata property in the @Component or @Directive decorator instead of separate @HostBinding and @HostListener decorators consolidates all host-related bindings in one place, making it easier to see all DOM interactions at a glance. The host property approach is generally more concise and keeps component metadata organized. With decorators, host bindings and listeners are scattered throughout the class on individual properties and methods, requiring developers to hunt through the file to understand all host interactions. The centralized host property makes this information immediately visible in the decorator metadata. This is particularly helpful during code reviews and when onboarding new team members who need to understand how a component interacts with its host element. Prior to Angular v20, the Angular team actually recommended using the decorators, partly because the decorators had better IDE support for typechecking. That is no longer the case and the Angular documentation clearly states that the host metadata should be used and that the decorators are purely still there for backwards compatibility.',
|
|
40
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'preferInject';
|
|
|
3
3
|
export declare const RULE_NAME = "prefer-inject";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferInject", [], 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=prefer-inject.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefer-inject.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-inject.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AAEzB,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AACxC,eAAO,MAAM,SAAS,kBAAkB,CAAC;;AAEzC,wBAkGG"}
|
|
1
|
+
{"version":3,"file":"prefer-inject.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-inject.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AAEzB,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AACxC,eAAO,MAAM,SAAS,kBAAkB,CAAC;;AAEzC,wBAkGG;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");
|
|
@@ -81,3 +81,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
81
81
|
};
|
|
82
82
|
},
|
|
83
83
|
});
|
|
84
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
85
|
+
rationale: "The inject() function is Angular's modern dependency injection API that offers several advantages over constructor-based injection. First, it enables dependency injection outside of constructors, allowing you to use DI in functions, factories, and even at the class field level. This makes code more flexible and composable. Second, inject() is more concise and reduces boilerplate - you don't need constructor parameter properties or manual field assignments. Third, inject() works naturally with modern TypeScript features and tree-shaking. Fourth, it's required for using many modern Angular features like functional guards, interceptors, and the new signal-based APIs. Angular provides an automated migration schematic (ng generate @angular/core:inject) to convert constructor injection to inject(), making adoption straightforward. This is the recommended approach for all new Angular code.",
|
|
86
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'preferOnPushComponentChangeDetection' | 'suggestAddCha
|
|
|
3
3
|
export declare const RULE_NAME = "prefer-on-push-component-change-detection";
|
|
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=prefer-on-push-component-change-detection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefer-on-push-component-change-detection.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-on-push-component-change-detection.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAClB,sCAAsC,GACtC,iCAAiC,CAAC;AACtC,eAAO,MAAM,SAAS,8CAA8C,CAAC;;AAKrE,wBAuEG"}
|
|
1
|
+
{"version":3,"file":"prefer-on-push-component-change-detection.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-on-push-component-change-detection.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAClB,sCAAsC,GACtC,iCAAiC,CAAC;AACtC,eAAO,MAAM,SAAS,8CAA8C,CAAC;;AAKrE,wBAuEG;AAYH,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 = 'prefer-on-push-component-change-detection';
|
|
@@ -76,3 +76,6 @@ function nodeToReport(node) {
|
|
|
76
76
|
? node.value.property
|
|
77
77
|
: node.value;
|
|
78
78
|
}
|
|
79
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
80
|
+
rationale: `By default, Angular's change detection checks every component on every change detection cycle, which can involve thousands of checks per second in a large application. OnPush change detection strategy is a performance optimization that tells Angular to only check a component when: (1) its input properties receive new references, (2) an event originates from the component or its children, or (3) change detection is manually triggered. This dramatically reduces the number of change detection runs, improving application performance. OnPush pairs well with immutable data patterns and Angular signals, and is considered a best practice for most components. However, you must be careful to use immutable data patterns (creating new object references when data changes) for OnPush to work correctly.`,
|
|
81
|
+
};
|
|
@@ -2,4 +2,7 @@ export type MessageIds = 'preferOutputEmitterRef';
|
|
|
2
2
|
export declare const RULE_NAME = "prefer-output-emitter-ref";
|
|
3
3
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferOutputEmitterRef", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
4
4
|
export default _default;
|
|
5
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
6
|
+
rationale: string;
|
|
7
|
+
};
|
|
5
8
|
//# sourceMappingURL=prefer-output-emitter-ref.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefer-output-emitter-ref.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-output-emitter-ref.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAClD,eAAO,MAAM,SAAS,8BAA8B,CAAC;;AAErD,wBAqBG"}
|
|
1
|
+
{"version":3,"file":"prefer-output-emitter-ref.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-output-emitter-ref.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAClD,eAAO,MAAM,SAAS,8BAA8B,CAAC;;AAErD,wBAqBG;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 = 'prefer-output-emitter-ref';
|
|
@@ -25,3 +25,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
25
25
|
};
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
29
|
+
rationale: "The output() function is Angular's modern API for component outputs, intended to be used instead of the @Output() decorator (which still exists for backwards compatibility). OutputEmitterRef (returned by output()) provides better type safety, integrates seamlessly with Angular's signal ecosystem, and offers a more functional programming approach. Unlike @Output() which uses EventEmitter, output() is specifically designed for component outputs and has a cleaner, more predictable API, that resembles other function based and signals APIs that have been added to the framework in recent versions.",
|
|
30
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'preferOutputReadonly' | 'suggestAddReadonlyModifier';
|
|
|
3
3
|
export declare const RULE_NAME = "prefer-output-readonly";
|
|
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=prefer-output-readonly.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefer-output-readonly.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-output-readonly.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,sBAAsB,GAAG,4BAA4B,CAAC;AAC/E,eAAO,MAAM,SAAS,2BAA2B,CAAC;;AAElD,wBAkDG"}
|
|
1
|
+
{"version":3,"file":"prefer-output-readonly.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-output-readonly.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,sBAAsB,GAAG,4BAA4B,CAAC;AAC/E,eAAO,MAAM,SAAS,2BAA2B,CAAC;;AAElD,wBAkDG;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 = 'prefer-output-readonly';
|
|
@@ -46,3 +46,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
});
|
|
49
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
50
|
+
rationale: "Output properties should never be reassigned after initialization because they are meant to be stable references that parent components can bind to. Reassigning an output would break those bindings. For @Output() with EventEmitter, marking the property as 'readonly' makes this constraint explicit and leverages TypeScript's type system to prevent accidental reassignment. The correct pattern is '@Output() readonly userClick = new EventEmitter<User>()', not '@Output() userClick: EventEmitter<User>' where the emitter could be reassigned later. Note that the modern output() function (introduced in Angular v17.3) returns an OutputEmitterRef which is inherently immutable, so this rule is less relevant for those outputs but remains important for traditional EventEmitter-based outputs.",
|
|
51
|
+
};
|
|
@@ -12,4 +12,7 @@ export type MessageIds = 'preferInputSignals' | 'preferQuerySignals' | 'preferRe
|
|
|
12
12
|
export declare const RULE_NAME = "prefer-signals";
|
|
13
13
|
declare const _default: ESLintUtils.RuleModule<MessageIds, Options, import("../utils/create-eslint-rule").RuleDocs, ESLintUtils.RuleListener>;
|
|
14
14
|
export default _default;
|
|
15
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
16
|
+
rationale: string;
|
|
17
|
+
};
|
|
15
18
|
//# sourceMappingURL=prefer-signals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefer-signals.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-signals.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvE,KAAK,OAAO,GAAG;IACb;QACE,8BAA8B,EAAE,OAAO,CAAC;QACxC,kBAAkB,EAAE,OAAO,CAAC;QAC5B,kBAAkB,EAAE,OAAO,CAAC;QAC5B,eAAe,EAAE,OAAO,CAAC;QACzB,iCAAiC,EAAE,MAAM,EAAE,CAAC;KAC7C;CACF,CAAC;AAuBF,MAAM,MAAM,UAAU,GAClB,oBAAoB,GACpB,oBAAoB,GACpB,gCAAgC,CAAC;AACrC,eAAO,MAAM,SAAS,mBAAmB,CAAC;;AAE1C,wBAsLG"}
|
|
1
|
+
{"version":3,"file":"prefer-signals.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-signals.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvE,KAAK,OAAO,GAAG;IACb;QACE,8BAA8B,EAAE,OAAO,CAAC;QACxC,kBAAkB,EAAE,OAAO,CAAC;QAC5B,kBAAkB,EAAE,OAAO,CAAC;QAC5B,eAAe,EAAE,OAAO,CAAC;QACzB,iCAAiC,EAAE,MAAM,EAAE,CAAC;KAC7C;CACF,CAAC;AAuBF,MAAM,MAAM,UAAU,GAClB,oBAAoB,GACpB,oBAAoB,GACpB,gCAAgC,CAAC;AACrC,eAAO,MAAM,SAAS,mBAAmB,CAAC;;AAE1C,wBAsLG;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");
|
|
@@ -169,3 +169,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
169
169
|
return listener;
|
|
170
170
|
},
|
|
171
171
|
});
|
|
172
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
173
|
+
rationale: "Angular signals represent the future of reactivity in Angular, offering fine-grained change detection, better performance, and improved developer experience. Signal-based APIs like input(), viewChild(), and contentChild() provide type-safe, reactive properties that integrate seamlessly with computed values and effects. Unlike decorator-based APIs (@Input(), @ViewChild(), etc.), signals enable more granular tracking of dependencies and updates, allowing Angular to optimize change detection. Signal properties should be marked readonly because signals themselves are stable references - you read their value by calling them, you don't reassign the signal. This prevents bugs where developers might accidentally reassign a signal instead of updating its value. Using signals throughout your components creates a consistent, reactive programming model that makes data flow explicit and easier to understand.",
|
|
174
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'preferStandalone' | 'removeStandaloneFalse';
|
|
|
3
3
|
export declare const RULE_NAME = "prefer-standalone";
|
|
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=prefer-standalone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefer-standalone.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-standalone.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AAEzB,MAAM,MAAM,UAAU,GAAG,kBAAkB,GAAG,uBAAuB,CAAC;AACtE,eAAO,MAAM,SAAS,sBAAsB,CAAC;;AAK7C,wBAkEG"}
|
|
1
|
+
{"version":3,"file":"prefer-standalone.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-standalone.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AAEzB,MAAM,MAAM,UAAU,GAAG,kBAAkB,GAAG,uBAAuB,CAAC;AACtE,eAAO,MAAM,SAAS,sBAAsB,CAAC;;AAK7C,wBAkEG;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 = 'prefer-standalone';
|
|
@@ -61,3 +61,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
61
61
|
};
|
|
62
62
|
},
|
|
63
63
|
});
|
|
64
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
65
|
+
rationale: 'Standalone components, directives, and pipes are the recommended way to build Angular applications. Setting standalone: false opts out of the standalone API, tying your code to the older NgModule-based architecture. Standalone components simplify Angular applications by eliminating the need for NgModules in most cases, reducing boilerplate and making dependencies more explicit. Each standalone component declares its own dependencies directly, making it self-contained and easier to understand, test, and reuse. Standalone components also enable better tree-shaking and lazy loading. Angular provides comprehensive migration guides to help transition existing applications, such as https://angular.dev/reference/migrations/standalone. New projects should use standalone components from the start, and existing projects should avoid adding new non-standalone components as they will make future migrations harder.',
|
|
66
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'relativeUrlPrefix';
|
|
|
3
3
|
export declare const RULE_NAME = "relative-url-prefix";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"relativeUrlPrefix", [], 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=relative-url-prefix.d.ts.map
|
|
@@ -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;;AAI/C,wBA0CG"}
|
|
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;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 create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
6
6
|
exports.RULE_NAME = 'relative-url-prefix';
|
|
@@ -54,3 +54,6 @@ function isUrlInvalid(node) {
|
|
|
54
54
|
return (!utils_1.ASTUtils.isStringLiteral(node) ||
|
|
55
55
|
!RELATIVE_URL_PREFIX_MATCHER.test(node.value));
|
|
56
56
|
}
|
|
57
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
58
|
+
rationale: "Using relative URLs (like './user-profile.component.html') instead of absolute URLs (like 'app/users/user-profile.component.html') for templateUrl and styleUrls makes components more portable and easier to refactor. When you move a component to a different directory, relative URLs don't need to be updated as long as the template and styles move with the component. This follows the principle of co-locating related files and makes refactoring safer. Relative URLs should typically start with './' for files in the same directory or '../' for files in parent directories.",
|
|
59
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'defineOnPrototype';
|
|
|
3
3
|
export declare const RULE_NAME = "require-lifecycle-on-prototype";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"defineOnPrototype", [], 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=require-lifecycle-on-prototype.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-lifecycle-on-prototype.d.ts","sourceRoot":"","sources":["../../src/rules/require-lifecycle-on-prototype.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AAIzB,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAC7C,eAAO,MAAM,SAAS,mCAAmC,CAAC;;AAY1D,wBA2CG"}
|
|
1
|
+
{"version":3,"file":"require-lifecycle-on-prototype.d.ts","sourceRoot":"","sources":["../../src/rules/require-lifecycle-on-prototype.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AAIzB,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAC7C,eAAO,MAAM,SAAS,mCAAmC,CAAC;;AAY1D,wBA2CG;AAkBH,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("@typescript-eslint/utils");
|
|
5
5
|
const create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
6
6
|
const utils_2 = require("@angular-eslint/utils");
|
|
@@ -67,3 +67,6 @@ function isPrototype(node) {
|
|
|
67
67
|
}
|
|
68
68
|
return false;
|
|
69
69
|
}
|
|
70
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
71
|
+
rationale: "Lifecycle methods in Angular must be defined on the class prototype (using method syntax) rather than as instance properties (using arrow functions or property assignments). Angular's change detection looks for lifecycle methods on the prototype chain, and defining them as instance properties can prevent Angular from finding and invoking them correctly. This is a subtle but critical issue that can cause lifecycle hooks to silently fail. For example, if ngOnInit is defined as a class property (ngOnInit = () => {}), Angular will not call it, leading to missing initialization logic. Using standard method definitions ensures lifecycle hooks are placed on the prototype where Angular expects them.",
|
|
72
|
+
};
|
|
@@ -9,4 +9,7 @@ export type MessageIds = 'requireLocalizeDescription' | 'requireLocalizeMeaning'
|
|
|
9
9
|
export declare const RULE_NAME = "require-localize-metadata";
|
|
10
10
|
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>;
|
|
11
11
|
export default _default;
|
|
12
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
13
|
+
rationale: string;
|
|
14
|
+
};
|
|
12
15
|
//# sourceMappingURL=require-localize-metadata.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-localize-metadata.d.ts","sourceRoot":"","sources":["../../src/rules/require-localize-metadata.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;QACtC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;QAClC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;KAC7C;CACF,CAAC;AAYF,MAAM,MAAM,UAAU,GAClB,4BAA4B,GAC5B,wBAAwB,GACxB,yBAAyB,CAAC;AAC9B,eAAO,MAAM,SAAS,8BAA8B,CAAC;;AAErD,wBAyFG"}
|
|
1
|
+
{"version":3,"file":"require-localize-metadata.d.ts","sourceRoot":"","sources":["../../src/rules/require-localize-metadata.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;QACtC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;QAClC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;KAC7C;CACF,CAAC;AAYF,MAAM,MAAM,UAAU,GAClB,4BAA4B,GAC5B,wBAAwB,GACxB,yBAAyB,CAAC;AAC9B,eAAO,MAAM,SAAS,8BAA8B,CAAC;;AAErD,wBAyFG;AAyCH,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("@typescript-eslint/utils");
|
|
5
5
|
const create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
6
6
|
const DEFAULT_OPTIONS = {
|
|
@@ -118,3 +118,6 @@ function parseMetadata(rawText) {
|
|
|
118
118
|
}
|
|
119
119
|
return { rawText, meaning, description, customId };
|
|
120
120
|
}
|
|
121
|
+
exports.RULE_DOCS_EXTENSION = {
|
|
122
|
+
rationale: `When internationalizing Angular applications with @angular/localize, adding metadata (description, meaning, and custom IDs) to $localize tagged strings is essential for high-quality translations. The description helps translators understand the context and purpose of the text they're translating. For example, "Open" could mean "open a file" (access/view) or "open an account" (establish/create) - context matters for accurate translation. The meaning field distinguishes identical text that needs different translations in different contexts. Custom IDs provide stable references that persist across code changes, preventing retranslation when only code structure changes. Without this metadata, translators work blind, leading to poor translations, wasted effort on retranslating unchanged strings, and difficulty managing large translation projects. This rule ensures your $localize strings include helpful metadata for translation workflows.`,
|
|
123
|
+
};
|
|
@@ -3,4 +3,7 @@ export type MessageIds = 'runtimeLocalize';
|
|
|
3
3
|
export declare const RULE_NAME = "runtime-localize";
|
|
4
4
|
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"runtimeLocalize", [], 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=runtime-localize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-localize.d.ts","sourceRoot":"","sources":["../../src/rules/runtime-localize.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAC3C,eAAO,MAAM,SAAS,qBAAqB,CAAC;;AAE5C,wBA6CG"}
|
|
1
|
+
{"version":3,"file":"runtime-localize.d.ts","sourceRoot":"","sources":["../../src/rules/runtime-localize.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAC3C,eAAO,MAAM,SAAS,qBAAqB,CAAC;;AAE5C,wBA6CG;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("@typescript-eslint/utils");
|
|
5
5
|
const create_eslint_rule_1 = require("../utils/create-eslint-rule");
|
|
6
6
|
exports.RULE_NAME = 'runtime-localize';
|
|
@@ -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: "Using $localize at the top level of a module (outside of functions or methods) means the localization happens immediately when the module loads, before runtime translation data can be loaded. This creates a timing problem - the string gets localized using whatever translations are available at module load time (typically none), and the translated value is frozen. Even if you load translations later, these top-level $localize calls won't use them. Instead, $localize should be called inside functions, methods, or non-static class properties so it executes after translations are loaded. This ensures the runtime-loaded translations are actually used. For top-level strings that need localization, initialize them in a function called after translations load, or use them within component templates where Angular handles the timing correctly.",
|
|
45
|
+
};
|
|
@@ -8,4 +8,7 @@ export type MessageIds = 'incorrectOrder';
|
|
|
8
8
|
export declare const RULE_NAME = "sort-keys-in-type-decorator";
|
|
9
9
|
declare const _default: TSESLint.RuleModule<"incorrectOrder", Options, import("../utils/create-eslint-rule").RuleDocs, TSESLint.RuleListener>;
|
|
10
10
|
export default _default;
|
|
11
|
+
export declare const RULE_DOCS_EXTENSION: {
|
|
12
|
+
rationale: string;
|
|
13
|
+
};
|
|
11
14
|
//# sourceMappingURL=sort-keys-in-type-decorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-keys-in-type-decorator.d.ts","sourceRoot":"","sources":["../../src/rules/sort-keys-in-type-decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAG9D,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KACzB;CACF,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AA2D1C,eAAO,MAAM,SAAS,gCAAgC,CAAC;;AAEvD,wBA+IG"}
|
|
1
|
+
{"version":3,"file":"sort-keys-in-type-decorator.d.ts","sourceRoot":"","sources":["../../src/rules/sort-keys-in-type-decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAG9D,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KACzB;CACF,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AA2D1C,eAAO,MAAM,SAAS,gCAAgC,CAAC;;AAEvD,wBA+IG;AAsFH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|