@angular-eslint/eslint-plugin-template 20.5.3-alpha.0 → 20.5.3-alpha.2

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.
Files changed (106) hide show
  1. package/dist/rules/alt-text.d.ts +3 -0
  2. package/dist/rules/alt-text.d.ts.map +1 -1
  3. package/dist/rules/alt-text.js +4 -1
  4. package/dist/rules/attributes-order.d.ts +3 -0
  5. package/dist/rules/attributes-order.d.ts.map +1 -1
  6. package/dist/rules/attributes-order.js +4 -1
  7. package/dist/rules/banana-in-box.d.ts +3 -0
  8. package/dist/rules/banana-in-box.d.ts.map +1 -1
  9. package/dist/rules/banana-in-box.js +4 -1
  10. package/dist/rules/click-events-have-key-events.d.ts +3 -0
  11. package/dist/rules/click-events-have-key-events.d.ts.map +1 -1
  12. package/dist/rules/click-events-have-key-events.js +4 -1
  13. package/dist/rules/conditional-complexity.d.ts +3 -0
  14. package/dist/rules/conditional-complexity.d.ts.map +1 -1
  15. package/dist/rules/conditional-complexity.js +4 -1
  16. package/dist/rules/cyclomatic-complexity.d.ts +3 -0
  17. package/dist/rules/cyclomatic-complexity.d.ts.map +1 -1
  18. package/dist/rules/cyclomatic-complexity.js +4 -1
  19. package/dist/rules/elements-content.d.ts +3 -0
  20. package/dist/rules/elements-content.d.ts.map +1 -1
  21. package/dist/rules/elements-content.js +4 -1
  22. package/dist/rules/eqeqeq.d.ts +3 -0
  23. package/dist/rules/eqeqeq.d.ts.map +1 -1
  24. package/dist/rules/eqeqeq.js +4 -1
  25. package/dist/rules/i18n.d.ts +3 -0
  26. package/dist/rules/i18n.d.ts.map +1 -1
  27. package/dist/rules/i18n.js +4 -1
  28. package/dist/rules/interactive-supports-focus.d.ts +3 -0
  29. package/dist/rules/interactive-supports-focus.d.ts.map +1 -1
  30. package/dist/rules/interactive-supports-focus.js +4 -1
  31. package/dist/rules/label-has-associated-control.d.ts +3 -0
  32. package/dist/rules/label-has-associated-control.d.ts.map +1 -1
  33. package/dist/rules/label-has-associated-control.js +4 -1
  34. package/dist/rules/mouse-events-have-key-events.d.ts +3 -0
  35. package/dist/rules/mouse-events-have-key-events.d.ts.map +1 -1
  36. package/dist/rules/mouse-events-have-key-events.js +4 -1
  37. package/dist/rules/no-any.d.ts +3 -0
  38. package/dist/rules/no-any.d.ts.map +1 -1
  39. package/dist/rules/no-any.js +4 -1
  40. package/dist/rules/no-autofocus.d.ts +3 -0
  41. package/dist/rules/no-autofocus.d.ts.map +1 -1
  42. package/dist/rules/no-autofocus.js +4 -1
  43. package/dist/rules/no-call-expression.d.ts +3 -0
  44. package/dist/rules/no-call-expression.d.ts.map +1 -1
  45. package/dist/rules/no-call-expression.js +4 -1
  46. package/dist/rules/no-distracting-elements.d.ts +3 -0
  47. package/dist/rules/no-distracting-elements.d.ts.map +1 -1
  48. package/dist/rules/no-distracting-elements.js +4 -1
  49. package/dist/rules/no-duplicate-attributes.d.ts +3 -0
  50. package/dist/rules/no-duplicate-attributes.d.ts.map +1 -1
  51. package/dist/rules/no-duplicate-attributes.js +4 -1
  52. package/dist/rules/no-empty-control-flow.d.ts +3 -0
  53. package/dist/rules/no-empty-control-flow.d.ts.map +1 -1
  54. package/dist/rules/no-empty-control-flow.js +4 -1
  55. package/dist/rules/no-inline-styles.d.ts +3 -0
  56. package/dist/rules/no-inline-styles.d.ts.map +1 -1
  57. package/dist/rules/no-inline-styles.js +4 -1
  58. package/dist/rules/no-interpolation-in-attributes.d.ts +3 -0
  59. package/dist/rules/no-interpolation-in-attributes.d.ts.map +1 -1
  60. package/dist/rules/no-interpolation-in-attributes.js +4 -1
  61. package/dist/rules/no-nested-tags.d.ts +3 -0
  62. package/dist/rules/no-nested-tags.d.ts.map +1 -1
  63. package/dist/rules/no-nested-tags.js +4 -1
  64. package/dist/rules/no-positive-tabindex.d.ts +3 -0
  65. package/dist/rules/no-positive-tabindex.d.ts.map +1 -1
  66. package/dist/rules/no-positive-tabindex.js +4 -1
  67. package/dist/rules/prefer-at-else.d.ts +3 -0
  68. package/dist/rules/prefer-at-else.d.ts.map +1 -1
  69. package/dist/rules/prefer-at-else.js +4 -1
  70. package/dist/rules/prefer-at-empty.d.ts +3 -0
  71. package/dist/rules/prefer-at-empty.d.ts.map +1 -1
  72. package/dist/rules/prefer-at-empty.js +4 -1
  73. package/dist/rules/prefer-built-in-pipes.d.ts +3 -0
  74. package/dist/rules/prefer-built-in-pipes.d.ts.map +1 -1
  75. package/dist/rules/prefer-built-in-pipes.js +4 -1
  76. package/dist/rules/prefer-contextual-for-variables.d.ts +3 -0
  77. package/dist/rules/prefer-contextual-for-variables.d.ts.map +1 -1
  78. package/dist/rules/prefer-contextual-for-variables.js +4 -1
  79. package/dist/rules/prefer-control-flow.d.ts +3 -0
  80. package/dist/rules/prefer-control-flow.d.ts.map +1 -1
  81. package/dist/rules/prefer-control-flow.js +4 -1
  82. package/dist/rules/prefer-ngsrc.d.ts +3 -0
  83. package/dist/rules/prefer-ngsrc.d.ts.map +1 -1
  84. package/dist/rules/prefer-ngsrc.js +4 -1
  85. package/dist/rules/prefer-self-closing-tags.d.ts +3 -0
  86. package/dist/rules/prefer-self-closing-tags.d.ts.map +1 -1
  87. package/dist/rules/prefer-self-closing-tags.js +4 -1
  88. package/dist/rules/prefer-static-string-properties.d.ts +3 -0
  89. package/dist/rules/prefer-static-string-properties.d.ts.map +1 -1
  90. package/dist/rules/prefer-static-string-properties.js +4 -1
  91. package/dist/rules/prefer-template-literal.d.ts +3 -0
  92. package/dist/rules/prefer-template-literal.d.ts.map +1 -1
  93. package/dist/rules/prefer-template-literal.js +4 -1
  94. package/dist/rules/role-has-required-aria.d.ts +3 -0
  95. package/dist/rules/role-has-required-aria.d.ts.map +1 -1
  96. package/dist/rules/role-has-required-aria.js +4 -1
  97. package/dist/rules/table-scope.d.ts +3 -0
  98. package/dist/rules/table-scope.d.ts.map +1 -1
  99. package/dist/rules/table-scope.js +4 -1
  100. package/dist/rules/use-track-by-function.d.ts +3 -0
  101. package/dist/rules/use-track-by-function.d.ts.map +1 -1
  102. package/dist/rules/use-track-by-function.js +4 -1
  103. package/dist/rules/valid-aria.d.ts +3 -0
  104. package/dist/rules/valid-aria.d.ts.map +1 -1
  105. package/dist/rules/valid-aria.js +4 -1
  106. package/package.json +5 -5
@@ -3,4 +3,7 @@ export type MessageIds = 'altText';
3
3
  export declare const RULE_NAME = "alt-text";
4
4
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"altText", [], 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=alt-text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alt-text.d.ts","sourceRoot":"","sources":["../../src/rules/alt-text.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC;AACnC,eAAO,MAAM,SAAS,aAAa,CAAC;;AAEpC,wBAsCG"}
1
+ {"version":3,"file":"alt-text.d.ts","sourceRoot":"","sources":["../../src/rules/alt-text.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC;AACnC,eAAO,MAAM,SAAS,aAAa,CAAC;;AAEpC,wBAsCG;AAsHH,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 get_attribute_value_1 = require("../utils/get-attribute-value");
@@ -131,3 +131,6 @@ function isAriaLabel(name) {
131
131
  function isAlt(name) {
132
132
  return name === 'alt';
133
133
  }
134
+ exports.RULE_DOCS_EXTENSION = {
135
+ rationale: 'Images, area elements, and input buttons must have alternative text for accessibility. Screen readers used by blind and visually impaired users rely on alt text to describe images. Without alt text, these users miss important content and context. Decorative images should have an empty alt attribute (alt="") to signal they can be safely ignored by screen readers. Meaningful images require descriptive alt text that conveys the image\'s content and purpose. This is a WCAG Level A requirement, meaning it\'s a basic accessibility standard.',
136
+ };
@@ -17,4 +17,7 @@ export type MessageIds = 'attributesOrder';
17
17
  export declare const RULE_NAME = "attributes-order";
18
18
  declare const _default: TSESLint.RuleModule<"attributesOrder", Options, import("../utils/create-eslint-rule").RuleDocs, TSESLint.RuleListener>;
19
19
  export default _default;
20
+ export declare const RULE_DOCS_EXTENSION: {
21
+ rationale: string;
22
+ };
20
23
  //# sourceMappingURL=attributes-order.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attributes-order.d.ts","sourceRoot":"","sources":["../../src/rules/attributes-order.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGnE,oBAAY,SAAS;IACnB,yBAAyB,uBAAuB;IAChD,mBAAmB,yBAAyB;IAC5C,gBAAgB,sBAAsB;IACtC,YAAY,kBAAkB;IAC9B,aAAa,mBAAmB;IAChC,aAAa,oBAAoB;CAClC;AAED,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;QAC/B,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;KACtC;CACF,CAAC;AAkCF,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAC3C,eAAO,MAAM,SAAS,qBAAqB,CAAC;;AAgB5C,wBA4HG"}
1
+ {"version":3,"file":"attributes-order.d.ts","sourceRoot":"","sources":["../../src/rules/attributes-order.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGnE,oBAAY,SAAS;IACnB,yBAAyB,uBAAuB;IAChD,mBAAmB,yBAAyB;IAC5C,gBAAgB,sBAAsB;IACtC,YAAY,kBAAkB;IAC9B,aAAa,mBAAmB;IAChC,aAAa,oBAAoB;CAClC;AAED,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;QAC/B,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;KACtC;CACF,CAAC;AAkCF,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAC3C,eAAO,MAAM,SAAS,qBAAqB,CAAC;;AAgB5C,wBA4HG;AAubH,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 = exports.OrderType = void 0;
3
+ exports.RULE_DOCS_EXTENSION = exports.RULE_NAME = exports.OrderType = void 0;
4
4
  const bundled_angular_compiler_1 = require("@angular-eslint/bundled-angular-compiler");
5
5
  const utils_1 = require("@angular-eslint/utils");
6
6
  const create_eslint_rule_1 = require("../utils/create-eslint-rule");
@@ -448,3 +448,6 @@ function getHtmlAttributeNameAndOrderType(attr, inputs) {
448
448
  isI18nForAttribute,
449
449
  };
450
450
  }
451
+ exports.RULE_DOCS_EXTENSION = {
452
+ rationale: 'Consistent ordering of template attributes makes templates easier to read and scan visually. When attributes are always ordered the same way across a codebase (for example: structural directives first, then template references, then inputs, then outputs), developers can quickly locate specific attributes without having to scan randomly-ordered attribute lists. This is especially valuable for elements with many attributes. The rule supports both semantic ordering (grouping by attribute type) and alphabetical sorting within groups, allowing teams to choose the organizational pattern that works best for them.',
453
+ };
@@ -3,4 +3,7 @@ export type MessageIds = 'bananaInBox';
3
3
  export declare const RULE_NAME = "banana-in-box";
4
4
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"bananaInBox", [], 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=banana-in-box.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"banana-in-box.d.ts","sourceRoot":"","sources":["../../src/rules/banana-in-box.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC;AACvC,eAAO,MAAM,SAAS,kBAAkB,CAAC;;AAKzC,wBA2CG"}
1
+ {"version":3,"file":"banana-in-box.d.ts","sourceRoot":"","sources":["../../src/rules/banana-in-box.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC;AACvC,eAAO,MAAM,SAAS,kBAAkB,CAAC;;AAKzC,wBA2CG;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 = 'banana-in-box';
@@ -45,3 +45,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
45
45
  };
46
46
  },
47
47
  });
48
+ exports.RULE_DOCS_EXTENSION = {
49
+ rationale: 'The Angular two-way binding syntax is [(ngModel)]="value", where the parentheses are INSIDE the brackets, resembling a banana in a box. A common typo is ([ngModel])="value" with the parentheses outside, which creates a one-way binding FROM the template TO the component (the opposite of what\'s intended). This will make the input update when the value changes but won\'t update the value when the user types. This syntax error is easy to make and can be hard to spot visually, but it breaks two-way data binding. The correct syntax is: [()] for two-way binding, [] for property binding (component to template), and () for event binding (template to component).',
50
+ };
@@ -7,4 +7,7 @@ export type MessageIds = 'clickEventsHaveKeyEvents';
7
7
  export declare const RULE_NAME = "click-events-have-key-events";
8
8
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"clickEventsHaveKeyEvents", 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=click-events-have-key-events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"click-events-have-key-events.d.ts","sourceRoot":"","sources":["../../src/rules/click-events-have-key-events.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC1C;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,0BAA0B,CAAC;AACpD,eAAO,MAAM,SAAS,iCAAiC,CAAC;;AAKxD,wBA+EG"}
1
+ {"version":3,"file":"click-events-have-key-events.d.ts","sourceRoot":"","sources":["../../src/rules/click-events-have-key-events.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC1C;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,0BAA0B,CAAC;AACpD,eAAO,MAAM,SAAS,iCAAiC,CAAC;;AAKxD,wBA+EG;AAsBH,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 get_dom_elements_1 = require("../utils/get-dom-elements");
@@ -93,3 +93,6 @@ function isIgnored(ignoreWithDirectives, { inputs, attributes }) {
93
93
  }
94
94
  return false;
95
95
  }
96
+ exports.RULE_DOCS_EXTENSION = {
97
+ rationale: 'Elements with click handlers must also be operable via keyboard for users who cannot use a mouse. This includes users with motor disabilities, users of assistive technologies, and keyboard-only users. While native interactive elements like buttons and links are keyboard-accessible by default (activated by Enter or Space keys), non-interactive elements with click handlers (like divs or spans) are not. For such elements, you must add keyboard event handlers (keyup, keydown, or keypress) that perform the same action as the click handler. Alternatively, use a semantic button element which handles this automatically. This is a WCAG Level A requirement for keyboard accessibility.',
98
+ };
@@ -5,4 +5,7 @@ export type MessageIds = 'conditionalComplexity';
5
5
  export declare const RULE_NAME = "conditional-complexity";
6
6
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"conditionalComplexity", 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=conditional-complexity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conditional-complexity.d.ts","sourceRoot":"","sources":["../../src/rules/conditional-complexity.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,OAAO,GAAG,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,uBAAuB,CAAC;AACjD,eAAO,MAAM,SAAS,2BAA2B,CAAC;;AAIlD,wBAsFG"}
1
+ {"version":3,"file":"conditional-complexity.d.ts","sourceRoot":"","sources":["../../src/rules/conditional-complexity.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,OAAO,GAAG,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,uBAAuB,CAAC;AACjD,eAAO,MAAM,SAAS,2BAA2B,CAAC;;AAIlD,wBAsFG;AA6DH,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 bundled_angular_compiler_1 = require("@angular-eslint/bundled-angular-compiler");
5
5
  const utils_1 = require("@angular-eslint/utils");
6
6
  const create_eslint_rule_1 = require("../utils/create-eslint-rule");
@@ -112,3 +112,6 @@ function getTotalComplexity(ast) {
112
112
  }
113
113
  return total;
114
114
  }
115
+ exports.RULE_DOCS_EXTENSION = {
116
+ rationale: "Complex conditional expressions in templates (like multiple '&&' or '||' operators, nested ternaries, or long chains of conditions) make templates hard to read, test, and maintain. Template logic should be minimal and easy to understand at a glance. Complex conditionals are better moved to the component class as computed properties or methods, where they can be properly tested, documented, and reasoned about. For example, instead of '*ngIf=\"user && user.role === 'admin' && user.isActive && !user.isLocked\"', create a component property like 'get canAccessAdmin() { return this.user?.role === 'admin' && this.user?.isActive && !this.user?.isLocked; }' and use '*ngIf=\"canAccessAdmin\"'. This makes templates more declarative and components easier to unit test.",
117
+ };
@@ -5,4 +5,7 @@ export type MessageIds = 'cyclomaticComplexity';
5
5
  export declare const RULE_NAME = "cyclomatic-complexity";
6
6
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"cyclomaticComplexity", 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=cyclomatic-complexity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cyclomatic-complexity.d.ts","sourceRoot":"","sources":["../../src/rules/cyclomatic-complexity.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,OAAO,GAAG,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAChD,eAAO,MAAM,SAAS,0BAA0B,CAAC;;AAIjD,wBAiEG"}
1
+ {"version":3,"file":"cyclomatic-complexity.d.ts","sourceRoot":"","sources":["../../src/rules/cyclomatic-complexity.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,OAAO,GAAG,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAChD,eAAO,MAAM,SAAS,0BAA0B,CAAC;;AAIjD,wBAiEG;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 bundled_angular_compiler_1 = require("@angular-eslint/bundled-angular-compiler");
5
5
  const utils_1 = require("@angular-eslint/utils");
6
6
  const create_eslint_rule_1 = require("../utils/create-eslint-rule");
@@ -63,3 +63,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
63
63
  };
64
64
  },
65
65
  });
66
+ exports.RULE_DOCS_EXTENSION = {
67
+ rationale: 'Cyclomatic complexity measures the number of independent paths through code by counting control flow statements (if, for, while, etc.). High complexity in templates indicates too much logic in the template, making it hard to read, test, and maintain. Templates with high complexity often contain nested *ngIf/*ngFor combinations, complex ternary expressions, or multiple structural directives. This logic should be moved to the component class or into separate components. Component classes can be unit tested, but template logic is harder to test and reason about. Breaking complex templates into smaller, focused components also improves reusability and follows the single responsibility principle.',
68
+ };
@@ -7,4 +7,7 @@ export type MessageIds = 'elementsContent';
7
7
  export declare const RULE_NAME = "elements-content";
8
8
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"elementsContent", 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=elements-content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"elements-content.d.ts","sourceRoot":"","sources":["../../src/rules/elements-content.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACxC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAC3C,eAAO,MAAM,SAAS,qBAAqB,CAAC;;AAa5C,wBAwDG"}
1
+ {"version":3,"file":"elements-content.d.ts","sourceRoot":"","sources":["../../src/rules/elements-content.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACxC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAC3C,eAAO,MAAM,SAAS,qBAAqB,CAAC;;AAa5C,wBAwDG;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
  const is_hidden_from_screen_reader_1 = require("../utils/is-hidden-from-screen-reader");
@@ -67,3 +67,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
67
67
  };
68
68
  },
69
69
  });
70
+ exports.RULE_DOCS_EXTENSION = {
71
+ rationale: "Interactive elements like buttons, anchors (links), and headings must have accessible text content for screen readers. For example, '<button><mat-icon>delete</mat-icon></button>' is not accessible because screen readers will just announce 'button' without explaining what it does. Solutions include adding visible text, using aria-label, or including visually-hidden text with CSS. This ensures all users, including those using screen readers, know the purpose of each interactive element. This is a fundamental WCAG requirement for web accessibility.",
72
+ };
@@ -6,4 +6,7 @@ export type MessageIds = 'eqeqeq' | 'suggestStrictEquality';
6
6
  export declare const RULE_NAME = "eqeqeq";
7
7
  declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../utils/create-eslint-rule").RuleDocs, TSESLint.RuleListener>;
8
8
  export default _default;
9
+ export declare const RULE_DOCS_EXTENSION: {
10
+ rationale: string;
11
+ };
9
12
  //# sourceMappingURL=eqeqeq.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eqeqeq.d.ts","sourceRoot":"","sources":["../../src/rules/eqeqeq.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQzD,MAAM,MAAM,OAAO,GAAG,CAAC;IAAE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AACpE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,uBAAuB,CAAC;AAC5D,eAAO,MAAM,SAAS,WAAW,CAAC;;AAGlC,wBA4EG"}
1
+ {"version":3,"file":"eqeqeq.d.ts","sourceRoot":"","sources":["../../src/rules/eqeqeq.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQzD,MAAM,MAAM,OAAO,GAAG,CAAC;IAAE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AACpE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,uBAAuB,CAAC;AAC5D,eAAO,MAAM,SAAS,WAAW,CAAC;;AAGlC,wBA4EG;AA6EH,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 bundled_angular_compiler_1 = require("@angular-eslint/bundled-angular-compiler");
5
5
  const utils_1 = require("@angular-eslint/utils");
6
6
  const create_eslint_rule_1 = require("../utils/create-eslint-rule");
@@ -111,3 +111,6 @@ function isStringNonNumericValue(ast) {
111
111
  function isNilValue(ast) {
112
112
  return ((0, literal_primitive_1.isLiteralPrimitive)(ast) && (ast.value === null || ast.value === undefined));
113
113
  }
114
+ exports.RULE_DOCS_EXTENSION = {
115
+ rationale: 'The == and != operators perform type coercion before comparison, which can lead to unexpected and confusing results. For example, "0" == 0 is true, [] == false is true, and null == undefined is true. These implicit conversions make code harder to understand and can hide bugs. The strict equality operators === and !== compare both value and type without coercion, making comparisons predictable and explicit. This is a widely accepted JavaScript/TypeScript best practice that Angular templates should follow for consistency with TypeScript code. The rule can optionally allow == and != when comparing to null or undefined, as this is a common pattern for checking if a value exists.',
116
+ };
@@ -17,4 +17,7 @@ export type MessageIds = 'i18nAttribute' | 'i18nAttributeOnIcuOrText' | 'i18nCus
17
17
  export declare const RULE_NAME = "i18n";
18
18
  declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../utils/create-eslint-rule").RuleDocs, TSESLint.RuleListener>;
19
19
  export default _default;
20
+ export declare const RULE_DOCS_EXTENSION: {
21
+ rationale: string;
22
+ };
20
23
  //# sourceMappingURL=i18n.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/rules/i18n.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AA6CnE,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;QACxC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC;QAC1C,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;QACnC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;QACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAC7B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAC9C,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QACxC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;QACtC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;KACnC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,0BAA0B,GAC1B,yBAAyB,GACzB,uBAAuB,GACvB,uBAAuB,GACvB,yBAAyB,GACzB,wBAAwB,GACxB,oBAAoB,GACpB,qBAAqB,CAAC;AAqB1B,eAAO,MAAM,SAAS,SAAS,CAAC;;AAkBhC,wBAsUG"}
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/rules/i18n.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AA6CnE,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;QACxC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC;QAC1C,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;QACnC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;QACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAC7B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAC9C,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QACxC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;QACtC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;KACnC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,0BAA0B,GAC1B,yBAAyB,GACzB,uBAAuB,GACvB,uBAAuB,GACvB,yBAAyB,GACzB,wBAAwB,GACxB,oBAAoB,GACpB,qBAAqB,CAAC;AAqB1B,eAAO,MAAM,SAAS,SAAS,CAAC;;AAkBhC,wBAsUG;AAqJH,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 bundled_angular_compiler_1 = require("@angular-eslint/bundled-angular-compiler");
5
5
  const utils_1 = require("@angular-eslint/utils");
6
6
  const create_eslint_rule_1 = require("../utils/create-eslint-rule");
@@ -397,3 +397,6 @@ function isTagAllowed(allowedTags, node) {
397
397
  function getI18nCustomId(i18n) {
398
398
  return i18n?.customId;
399
399
  }
400
+ exports.RULE_DOCS_EXTENSION = {
401
+ rationale: "Internationalization (i18n) attributes and directives mark text content for translation, making your application accessible to users who speak different languages. Angular's i18n system extracts marked strings into translation files that can be translated and then compiled back into the application for each locale. Forgetting to mark user-facing text for translation means those strings will remain in the original language even in translated builds, creating a poor user experience. This rule can enforce that certain elements or text content must have i18n markers, ensuring your application is properly prepared for internationalization. Even if you don't currently support multiple languages, adding i18n markers early makes future translation easier.",
402
+ };
@@ -7,4 +7,7 @@ export type MessageIds = 'interactiveSupportsFocus';
7
7
  export declare const RULE_NAME = "interactive-supports-focus";
8
8
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"interactiveSupportsFocus", 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=interactive-supports-focus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interactive-supports-focus.d.ts","sourceRoot":"","sources":["../../src/rules/interactive-supports-focus.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACxC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,0BAA0B,CAAC;AACpD,eAAO,MAAM,SAAS,+BAA+B,CAAC;;AAGtD,wBAiFG"}
1
+ {"version":3,"file":"interactive-supports-focus.d.ts","sourceRoot":"","sources":["../../src/rules/interactive-supports-focus.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACxC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,0BAA0B,CAAC;AACpD,eAAO,MAAM,SAAS,+BAA+B,CAAC;;AAGtD,wBAiFG;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 create_eslint_rule_1 = require("../utils/create-eslint-rule");
6
6
  const get_dom_elements_1 = require("../utils/get-dom-elements");
@@ -79,3 +79,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
79
79
  function isElementInAllowList(elementType, allowList) {
80
80
  return (allowList && allowList.length > 0 && allowList.indexOf(elementType) > -1);
81
81
  }
82
+ exports.RULE_DOCS_EXTENSION = {
83
+ rationale: 'Interactive elements with click handlers or other event listeners must be keyboard-accessible to users who cannot use a mouse. Elements that trigger actions must be focusable (either naturally like buttons and links, or via tabindex) so keyboard users can navigate to them and activate them with Enter or Space. Without this, keyboard-only users, screen reader users, and users with motor disabilities cannot interact with the application. Native interactive elements (button, a, input, select, textarea) are automatically focusable and keyboard-accessible. For custom interactive elements, you must add tabindex="0" to make them focusable and add appropriate keyboard event handlers. This is a WCAG Level A requirement for keyboard accessibility.',
84
+ };
@@ -13,4 +13,7 @@ export type MessageIds = 'labelHasAssociatedControl';
13
13
  export declare const RULE_NAME = "label-has-associated-control";
14
14
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"labelHasAssociatedControl", Options, import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
15
15
  export default _default;
16
+ export declare const RULE_DOCS_EXTENSION: {
17
+ rationale: string;
18
+ };
16
19
  //# sourceMappingURL=label-has-associated-control.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"label-has-associated-control.d.ts","sourceRoot":"","sources":["../../src/rules/label-has-associated-control.ts"],"names":[],"mappings":"AAQA,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AACF,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAC/C,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;QACrD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;KAC7B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC;AACrD,eAAO,MAAM,SAAS,iCAAiC,CAAC;;AAkBxD,wBAqHG"}
1
+ {"version":3,"file":"label-has-associated-control.d.ts","sourceRoot":"","sources":["../../src/rules/label-has-associated-control.ts"],"names":[],"mappings":"AAQA,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AACF,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAC/C,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;QACrD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;KAC7B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC;AACrD,eAAO,MAAM,SAAS,iCAAiC,CAAC;;AAkBxD,wBAqHG;AA8BH,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 is_child_node_of_1 = require("../utils/is-child-node-of");
@@ -130,3 +130,6 @@ function hasControlComponentWithId(controlComponents, id) {
130
130
  function filterUndefined(value) {
131
131
  return value !== undefined && value !== null;
132
132
  }
133
+ exports.RULE_DOCS_EXTENSION = {
134
+ rationale: "Form labels must be associated with their form controls for accessibility and usability. This association can be achieved by: (1) wrapping the input inside the label, (2) using the 'for' attribute with a matching input 'id', or (3) for Angular Material, ensuring proper accessibility attributes are set. This association provides multiple benefits: screen readers can announce what each form field is for, clicking the label focuses the input (increasing the clickable area), and it creates a clear connection between labels and fields for all users. This is a WCAG Level A requirement.",
135
+ };
@@ -4,4 +4,7 @@ export type MessageIds = 'mouseEventsHaveKeyEvents';
4
4
  export declare const RULE_NAME = "mouse-events-have-key-events";
5
5
  declare const _default: TSESLint.RuleModule<"mouseEventsHaveKeyEvents", [], 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=mouse-events-have-key-events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mouse-events-have-key-events.d.ts","sourceRoot":"","sources":["../../src/rules/mouse-events-have-key-events.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAKzD,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,0BAA0B,CAAC;AACpD,eAAO,MAAM,SAAS,iCAAiC,CAAC;;AAaxD,wBAuCG"}
1
+ {"version":3,"file":"mouse-events-have-key-events.d.ts","sourceRoot":"","sources":["../../src/rules/mouse-events-have-key-events.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAKzD,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,0BAA0B,CAAC;AACpD,eAAO,MAAM,SAAS,iCAAiC,CAAC;;AAaxD,wBAuCG;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
  const get_dom_elements_1 = require("../utils/get-dom-elements");
@@ -50,3 +50,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
50
50
  }), {});
51
51
  },
52
52
  });
53
+ exports.RULE_DOCS_EXTENSION = {
54
+ rationale: 'Elements that show or hide content on mouse hover (using mouseover and mouseout events) must also be accessible to keyboard users. When mouseover is used, there must be an equivalent focus event; when mouseout is used, there must be an equivalent blur event. This ensures that tooltips, dropdown menus, and other hover-triggered content can be accessed by users who navigate with keyboards instead of mice. For example, a tooltip that appears on mouseover should also appear when the element receives keyboard focus. This is essential for users with motor disabilities who cannot use a mouse, as well as screen reader users. This is a WCAG Level A requirement for keyboard accessibility.',
55
+ };
@@ -3,4 +3,7 @@ export type MessageIds = 'noAny' | 'suggestRemoveAny';
3
3
  export declare const RULE_NAME = "no-any";
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-any.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-any.d.ts","sourceRoot":"","sources":["../../src/rules/no-any.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,kBAAkB,CAAC;AACtD,eAAO,MAAM,SAAS,WAAW,CAAC;;AAGlC,wBA0FG"}
1
+ {"version":3,"file":"no-any.d.ts","sourceRoot":"","sources":["../../src/rules/no-any.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,kBAAkB,CAAC;AACtD,eAAO,MAAM,SAAS,WAAW,CAAC;;AAGlC,wBA0FG;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 bundled_angular_compiler_1 = require("@angular-eslint/bundled-angular-compiler");
5
5
  const utils_1 = require("@angular-eslint/utils");
6
6
  const create_eslint_rule_1 = require("../utils/create-eslint-rule");
@@ -84,3 +84,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
84
84
  };
85
85
  },
86
86
  });
87
+ exports.RULE_DOCS_EXTENSION = {
88
+ rationale: "The $any() type cast function in Angular templates disables TypeScript's type checking for an expression, removing all the benefits of static typing. This means typos, incorrect property access, and invalid method calls won't be caught until runtime. While $any() can be a quick fix for type errors, it's better to properly type your component properties or fix the underlying type issue. Overusing $any() makes templates less safe and can hide real bugs. If you're using $any() frequently, it often indicates that your component's types need improvement. Use $any() sparingly and only when you have a specific reason why TypeScript's type checking isn't applicable.",
89
+ };
@@ -3,4 +3,7 @@ export type MessageIds = 'noAutofocus';
3
3
  export declare const RULE_NAME = "no-autofocus";
4
4
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noAutofocus", [], 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-autofocus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-autofocus.d.ts","sourceRoot":"","sources":["../../src/rules/no-autofocus.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC;AACvC,eAAO,MAAM,SAAS,iBAAiB,CAAC;;AAExC,wBAsCG"}
1
+ {"version":3,"file":"no-autofocus.d.ts","sourceRoot":"","sources":["../../src/rules/no-autofocus.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC;AACvC,eAAO,MAAM,SAAS,iBAAiB,CAAC;;AAExC,wBAsCG;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
  const get_dom_elements_1 = require("../utils/get-dom-elements");
@@ -38,3 +38,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
38
38
  };
39
39
  },
40
40
  });
41
+ exports.RULE_DOCS_EXTENSION = {
42
+ rationale: "The autofocus attribute automatically moves focus to an element when the page loads, which can be disorienting and problematic for accessibility. For screen reader users, autofocus disrupts their normal navigation flow and can cause them to miss important page content. For users with motor disabilities, unexpected focus changes can be confusing. For users with cognitive disabilities, the auto-focused element might grab attention before they've had a chance to understand the page structure. Additionally, autofocus can interfere with browser features like scroll restoration. If focus management is needed, implement it through Angular lifecycle hooks with proper context awareness rather than using the autofocus attribute.",
43
+ };
@@ -9,4 +9,7 @@ export type MessageIds = 'noCallExpression';
9
9
  export declare const RULE_NAME = "no-call-expression";
10
10
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noCallExpression", 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=no-call-expression.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-call-expression.d.ts","sourceRoot":"","sources":["../../src/rules/no-call-expression.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC;AAC5C,eAAO,MAAM,SAAS,uBAAuB,CAAC;;AAE9C,wBA4EG"}
1
+ {"version":3,"file":"no-call-expression.d.ts","sourceRoot":"","sources":["../../src/rules/no-call-expression.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC;AAC5C,eAAO,MAAM,SAAS,uBAAuB,CAAC;;AAE9C,wBA4EG;AAcH,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 get_nearest_node_from_1 = require("../utils/get-nearest-node-from");
@@ -74,3 +74,6 @@ function isCallNameInAllowList(ast, allowList) {
74
74
  (0, is_ast_with_name_1.isASTWithName)(ast) &&
75
75
  allowList.indexOf(ast.name) > -1);
76
76
  }
77
+ exports.RULE_DOCS_EXTENSION = {
78
+ rationale: 'Calling functions or methods in Angular templates (like {{ formatDate(date) }} or *ngIf="isValid()") causes those functions to execute on every change detection cycle. In a typical application, change detection runs very frequently—on every user interaction, HTTP request, or timer event. If a function is called in a template that renders a list of 100 items, it might execute 100 times per change detection cycle, potentially thousands of times per second. This can cause severe performance problems. Instead, use component properties, pipes (which cache results), or computed signals (in modern Angular). For example, instead of {{ formatDate(date) }}, use {{ date | date }} or create a computed signal or getter that calculates the value once per change detection cycle.',
79
+ };
@@ -3,4 +3,7 @@ export type MessageIds = 'noDistractingElements';
3
3
  export declare const RULE_NAME = "no-distracting-elements";
4
4
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noDistractingElements", [], 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-distracting-elements.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-distracting-elements.d.ts","sourceRoot":"","sources":["../../src/rules/no-distracting-elements.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,uBAAuB,CAAC;AACjD,eAAO,MAAM,SAAS,4BAA4B,CAAC;;AAEnD,wBAoCG"}
1
+ {"version":3,"file":"no-distracting-elements.d.ts","sourceRoot":"","sources":["../../src/rules/no-distracting-elements.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,uBAAuB,CAAC;AACjD,eAAO,MAAM,SAAS,4BAA4B,CAAC;;AAEnD,wBAoCG;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-distracting-elements';
@@ -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: "Elements like <marquee> and <blink> create distracting motion that can cause problems for users with attention disorders, vestibular disorders, or seizure disorders. Moving text is harder to read for everyone, including users with dyslexia or cognitive disabilities. These elements are also deprecated in HTML5 and not well-supported across browsers. WCAG guidelines require that moving, blinking, or scrolling content can be paused, stopped, or hidden by users. Instead of these elements, use modern CSS animations with appropriate controls, or simply use static content that doesn't distract from the main page content.",
38
+ };
@@ -9,4 +9,7 @@ export type MessageIds = 'noDuplicateAttributes' | 'suggestRemoveAttribute';
9
9
  export declare const RULE_NAME = "no-duplicate-attributes";
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=no-duplicate-attributes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-duplicate-attributes.d.ts","sourceRoot":"","sources":["../../src/rules/no-duplicate-attributes.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;QAC1C,QAAQ,CAAC,8BAA8B,CAAC,EAAE,OAAO,CAAC;QAClD,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACrC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,uBAAuB,GAAG,wBAAwB,CAAC;AAC5E,eAAO,MAAM,SAAS,4BAA4B,CAAC;;AAOnD,wBA2IG"}
1
+ {"version":3,"file":"no-duplicate-attributes.d.ts","sourceRoot":"","sources":["../../src/rules/no-duplicate-attributes.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;QAC1C,QAAQ,CAAC,8BAA8B,CAAC,EAAE,OAAO,CAAC;QAClD,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACrC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,uBAAuB,GAAG,wBAAwB,CAAC;AAC5E,eAAO,MAAM,SAAS,4BAA4B,CAAC;;AAOnD,wBA2IG;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("@angular-eslint/utils");
5
5
  const create_eslint_rule_1 = require("../utils/create-eslint-rule");
6
6
  const get_original_attribute_name_1 = require("../utils/get-original-attribute-name");
@@ -123,3 +123,6 @@ function findDuplicates(elements) {
123
123
  (0, get_original_attribute_name_1.getOriginalAttributeName)(element));
124
124
  });
125
125
  }
126
+ exports.RULE_DOCS_EXTENSION = {
127
+ rationale: 'Duplicate input properties or output event listeners on the same element create ambiguous behavior and are almost always a mistake. When the same input or output appears multiple times, Angular uses the last occurrence, silently ignoring earlier ones. This can lead to confusing bugs where it appears that a binding is set but it has no effect. Duplicate attributes can occur during refactoring or when combining multiple sources of bindings. The rule can be configured to allow certain patterns like two-way data binding (which creates both an input and output with related names) and Angular style precedence (where multiple style bindings are intentionally combined). Catching duplicates early prevents hard-to-debug issues where bindings mysteriously do not work.',
128
+ };
@@ -3,4 +3,7 @@ export type MessageIds = 'noEmptyControlFlow';
3
3
  export declare const RULE_NAME = "no-empty-control-flow";
4
4
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noEmptyControlFlow", [], 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-control-flow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-empty-control-flow.d.ts","sourceRoot":"","sources":["../../src/rules/no-empty-control-flow.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAC9C,eAAO,MAAM,SAAS,0BAA0B,CAAC;;AAEjD,wBA0EG"}
1
+ {"version":3,"file":"no-empty-control-flow.d.ts","sourceRoot":"","sources":["../../src/rules/no-empty-control-flow.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAC9C,eAAO,MAAM,SAAS,0BAA0B,CAAC;;AAEjD,wBA0EG;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-empty-control-flow';
@@ -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: 'Empty control flow blocks (@if, @else, @for, @switch, @case, @empty) usually indicate incomplete refactoring or code that was commented out or deleted but left the block structure behind. These empty blocks add no functionality but create visual noise and confusion when reading templates. Developers may wonder whether the empty block is intentional or a bug. Removing empty blocks keeps templates clean and makes it clear that there is no conditional logic or looping in that location. This rule helps maintain template quality and catches likely mistakes during development.',
66
+ };
@@ -8,4 +8,7 @@ export type MessageIds = 'noInlineStyles';
8
8
  export declare const RULE_NAME = "no-inline-styles";
9
9
  declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noInlineStyles", Options, import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
10
10
  export default _default;
11
+ export declare const RULE_DOCS_EXTENSION: {
12
+ rationale: string;
13
+ };
11
14
  //# sourceMappingURL=no-inline-styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-inline-styles.d.ts","sourceRoot":"","sources":["../../src/rules/no-inline-styles.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;QAChC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;KACrC;CACF,CAAC;AAKF,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAC1C,eAAO,MAAM,SAAS,qBAAqB,CAAC;;AAE5C,wBAqEG"}
1
+ {"version":3,"file":"no-inline-styles.d.ts","sourceRoot":"","sources":["../../src/rules/no-inline-styles.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;QAChC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;KACrC;CACF,CAAC;AAKF,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAC1C,eAAO,MAAM,SAAS,qBAAqB,CAAC;;AAE5C,wBAqEG;AAwCH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}