@angular-eslint/eslint-plugin-template 18.1.1-alpha.1 → 18.1.1-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.
package/dist/index.d.ts CHANGED
@@ -94,49 +94,49 @@ declare const _default: {
94
94
  maxComplexity: number;
95
95
  }], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
96
96
  "elements-content": import("@typescript-eslint/utils/ts-eslint").RuleModule<"elementsContent", [{
97
- readonly allowList?: readonly string[] | undefined;
97
+ readonly allowList?: readonly string[];
98
98
  }], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
99
99
  eqeqeq: import("@typescript-eslint/utils/ts-eslint").RuleModule<import("./rules/eqeqeq").MessageIds, [{
100
- readonly allowNullOrUndefined?: boolean | undefined;
100
+ readonly allowNullOrUndefined?: boolean;
101
101
  }], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
102
102
  i18n: import("@typescript-eslint/utils/ts-eslint").RuleModule<import("./rules/i18n").MessageIds, [{
103
- readonly allowMarkupInContent?: boolean | undefined;
104
- readonly boundTextAllowedPattern?: string | undefined;
105
- readonly checkAttributes?: boolean | undefined;
106
- readonly checkDuplicateId?: boolean | undefined;
107
- readonly checkId?: boolean | undefined;
108
- readonly checkText?: boolean | undefined;
109
- readonly ignoreAttributes?: readonly string[] | undefined;
110
- readonly ignoreTags?: readonly string[] | undefined;
111
- readonly requireDescription?: boolean | undefined;
112
- readonly requireMeaning?: boolean | undefined;
103
+ readonly allowMarkupInContent?: boolean;
104
+ readonly boundTextAllowedPattern?: string;
105
+ readonly checkAttributes?: boolean;
106
+ readonly checkDuplicateId?: boolean;
107
+ readonly checkId?: boolean;
108
+ readonly checkText?: boolean;
109
+ readonly ignoreAttributes?: readonly string[];
110
+ readonly ignoreTags?: readonly string[];
111
+ readonly requireDescription?: boolean;
112
+ readonly requireMeaning?: boolean;
113
113
  }], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
114
114
  "interactive-supports-focus": import("@typescript-eslint/utils/ts-eslint").RuleModule<"interactiveSupportsFocus", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
115
115
  "label-has-associated-control": import("@typescript-eslint/utils/ts-eslint").RuleModule<"labelHasAssociatedControl", [{
116
- readonly controlComponents?: readonly string[] | undefined;
116
+ readonly controlComponents?: readonly string[];
117
117
  readonly labelComponents?: readonly {
118
- readonly inputs?: readonly string[] | undefined;
118
+ readonly inputs?: readonly string[];
119
119
  readonly selector: string;
120
- }[] | undefined;
121
- readonly checkIds?: boolean | undefined;
120
+ }[];
121
+ readonly checkIds?: boolean;
122
122
  }], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
123
123
  "mouse-events-have-key-events": import("@typescript-eslint/utils/ts-eslint").RuleModule<"mouseEventsHaveKeyEvents", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
124
124
  "no-any": import("@typescript-eslint/utils/ts-eslint").RuleModule<import("./rules/no-any").MessageIds, [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
125
125
  "no-autofocus": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noAutofocus", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
126
126
  "no-call-expression": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noCallExpression", [{
127
- readonly allowList?: readonly string[] | undefined;
128
- readonly allowPrefix?: string | undefined;
129
- readonly allowSuffix?: string | undefined;
127
+ readonly allowList?: readonly string[];
128
+ readonly allowPrefix?: string;
129
+ readonly allowSuffix?: string;
130
130
  }], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
131
131
  "no-distracting-elements": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noDistractingElements", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
132
132
  "no-duplicate-attributes": import("@typescript-eslint/utils/ts-eslint").RuleModule<import("./rules/no-duplicate-attributes").MessageIds, [{
133
- readonly allowTwoWayDataBinding?: boolean | undefined;
134
- readonly allowStylePrecedenceDuplicates?: boolean | undefined;
135
- readonly ignore?: readonly string[] | undefined;
133
+ readonly allowTwoWayDataBinding?: boolean;
134
+ readonly allowStylePrecedenceDuplicates?: boolean;
135
+ readonly ignore?: readonly string[];
136
136
  }], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
137
137
  "no-inline-styles": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noInlineStyles", [{
138
- readonly allowNgStyle?: boolean | undefined;
139
- readonly allowBindToStyle?: boolean | undefined;
138
+ readonly allowNgStyle?: boolean;
139
+ readonly allowBindToStyle?: boolean;
140
140
  }], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
141
141
  "no-interpolation-in-attributes": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noInterpolationInAttributes", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
142
142
  "no-negated-async": import("@typescript-eslint/utils/ts-eslint").RuleModule<import("./rules/no-negated-async").MessageIds, [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.postprocessComponentFile = exports.preprocessComponentFile = exports.isFileLikelyToContainComponentDeclarations = void 0;
6
+ exports.isFileLikelyToContainComponentDeclarations = isFileLikelyToContainComponentDeclarations;
7
+ exports.preprocessComponentFile = preprocessComponentFile;
8
+ exports.postprocessComponentFile = postprocessComponentFile;
7
9
  const path_1 = require("path");
8
10
  const typescript_1 = __importDefault(require("typescript"));
9
11
  const rangeMap = new Map();
@@ -39,7 +41,6 @@ function isFileLikelyToContainComponentDeclarations(text, filename) {
39
41
  }
40
42
  return false;
41
43
  }
42
- exports.isFileLikelyToContainComponentDeclarations = isFileLikelyToContainComponentDeclarations;
43
44
  function preprocessComponentFile(text, filename) {
44
45
  // This effectively instructs ESLint that there were no code blocks to extract for the current file
45
46
  const noopResult = [text];
@@ -152,7 +153,6 @@ function preprocessComponentFile(text, filename) {
152
153
  return noopResult;
153
154
  }
154
155
  }
155
- exports.preprocessComponentFile = preprocessComponentFile;
156
156
  function postprocessComponentFile(multiDimensionalMessages, filename) {
157
157
  const messagesFromComponentSource = multiDimensionalMessages[0];
158
158
  /**
@@ -198,7 +198,6 @@ function postprocessComponentFile(multiDimensionalMessages, filename) {
198
198
  ];
199
199
  return res;
200
200
  }
201
- exports.postprocessComponentFile = postprocessComponentFile;
202
201
  exports.default = {
203
202
  'extract-inline-html': {
204
203
  preprocess: preprocessComponentFile,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.attributesComparator = void 0;
3
+ exports.attributesComparator = attributesComparator;
4
4
  const get_attribute_value_1 = require("./get-attribute-value");
5
5
  function attributesComparator(ariaRoleRelationConceptAttributes, node) {
6
6
  const attributesInputs = [...node.attributes, ...node.inputs];
@@ -16,4 +16,3 @@ function attributesComparator(ariaRoleRelationConceptAttributes, node) {
16
16
  (0, get_attribute_value_1.getAttributeValue)(node, ariaRoleRelationConceptAttribute.name));
17
17
  }));
18
18
  }
19
- exports.attributesComparator = attributesComparator;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAttributeValue = void 0;
3
+ exports.getAttributeValue = getAttributeValue;
4
4
  const bundled_angular_compiler_1 = require("@angular-eslint/bundled-angular-compiler");
5
5
  const constants_1 = require("./constants");
6
6
  const get_original_attribute_name_1 = require("./get-original-attribute-name");
@@ -36,4 +36,3 @@ function getAttributeValue({ attributes, inputs }, attributeName) {
36
36
  }
37
37
  return constants_1.PROPERTY_READ;
38
38
  }
39
- exports.getAttributeValue = getAttributeValue;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDomElements = void 0;
3
+ exports.getDomElements = getDomElements;
4
4
  const aria_query_1 = require("aria-query");
5
5
  let domElements = null;
6
6
  function getDomElements() {
7
7
  return domElements ?? (domElements = new Set(aria_query_1.dom.keys()));
8
8
  }
9
- exports.getDomElements = getDomElements;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getNearestNodeFrom = void 0;
3
+ exports.getNearestNodeFrom = getNearestNodeFrom;
4
4
  const types_1 = require("@typescript-eslint/types");
5
5
  function isProgram(node) {
6
6
  return node.type === types_1.AST_NODE_TYPES.Program;
@@ -14,4 +14,3 @@ function getNearestNodeFrom({ parent }, predicate) {
14
14
  }
15
15
  return null;
16
16
  }
17
- exports.getNearestNodeFrom = getNearestNodeFrom;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getOriginalAttributeName = void 0;
3
+ exports.getOriginalAttributeName = getOriginalAttributeName;
4
4
  const bundled_angular_compiler_1 = require("@angular-eslint/bundled-angular-compiler");
5
5
  /**
6
6
  * Returns the original attribute name.
@@ -22,7 +22,6 @@ function getOriginalAttributeName(attribute) {
22
22
  }
23
23
  return details.replace('attr.', '');
24
24
  }
25
- exports.getOriginalAttributeName = getOriginalAttributeName;
26
25
  function isTwoWayDataBinding({ keySpan: { details }, name, }) {
27
26
  return name === `${details}Change`;
28
27
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isChildNodeOf = void 0;
3
+ exports.isChildNodeOf = isChildNodeOf;
4
4
  const bundled_angular_compiler_1 = require("@angular-eslint/bundled-angular-compiler");
5
5
  function isChildNodeOf(ast, childNodeName) {
6
6
  function traverseChildNodes({ children }) {
@@ -9,4 +9,3 @@ function isChildNodeOf(ast, childNodeName) {
9
9
  }
10
10
  return traverseChildNodes(ast);
11
11
  }
12
- exports.isChildNodeOf = isChildNodeOf;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isContentEditable = void 0;
3
+ exports.isContentEditable = isContentEditable;
4
4
  const get_original_attribute_name_1 = require("./get-original-attribute-name");
5
5
  const get_attribute_value_1 = require("./get-attribute-value");
6
6
  function isContentEditable(node) {
@@ -11,4 +11,3 @@ function isContentEditable(node) {
11
11
  (contentEditableValue === '' ||
12
12
  String(contentEditableValue).toLowerCase() === 'true'));
13
13
  }
14
- exports.isContentEditable = isContentEditable;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isDisabledElement = void 0;
3
+ exports.isDisabledElement = isDisabledElement;
4
4
  const get_original_attribute_name_1 = require("./get-original-attribute-name");
5
5
  const get_attribute_value_1 = require("./get-attribute-value");
6
6
  function isDisabledElement(node) {
@@ -17,4 +17,3 @@ function isDisabledElement(node) {
17
17
  }
18
18
  return false;
19
19
  }
20
- exports.isDisabledElement = isDisabledElement;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isHiddenFromScreenReader = void 0;
3
+ exports.isHiddenFromScreenReader = isHiddenFromScreenReader;
4
4
  const bundled_angular_compiler_1 = require("@angular-eslint/bundled-angular-compiler");
5
5
  const get_attribute_value_1 = require("./get-attribute-value");
6
6
  const get_nearest_node_from_1 = require("./get-nearest-node-from");
@@ -31,7 +31,6 @@ function isHiddenFromScreenReader(node) {
31
31
  return (typeof typeAttributeValue === 'string' &&
32
32
  typeAttributeValue.toUpperCase() === 'HIDDEN');
33
33
  }
34
- exports.isHiddenFromScreenReader = isHiddenFromScreenReader;
35
34
  /**
36
35
  * Whether an element has hidden static styles.
37
36
  * @example
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getInteractiveElementAXObjectSchemas = void 0;
3
+ exports.getInteractiveElementAXObjectSchemas = getInteractiveElementAXObjectSchemas;
4
4
  let interactiveElementAXObjectSchemas = null;
5
5
  // This function follows the lazy initialization pattern.
6
6
  // Since this is a top-level module (it will be included via `require`), we do not need to
@@ -27,4 +27,3 @@ function getInteractiveElementAXObjectSchemas() {
27
27
  }
28
28
  return interactiveElementAXObjectSchemas;
29
29
  }
30
- exports.getInteractiveElementAXObjectSchemas = getInteractiveElementAXObjectSchemas;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getInteractiveElementRoleSchemas = void 0;
3
+ exports.getInteractiveElementRoleSchemas = getInteractiveElementRoleSchemas;
4
4
  const aria_query_1 = require("aria-query");
5
5
  let interactiveElementRoleSchemas = null;
6
6
  // This function follows the lazy initialization pattern.
@@ -35,4 +35,3 @@ function getInteractiveElementRoleSchemas() {
35
35
  }
36
36
  return interactiveElementRoleSchemas;
37
37
  }
38
- exports.getInteractiveElementRoleSchemas = getInteractiveElementRoleSchemas;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getNonInteractiveRoles = exports.getNonInteractiveElementRoleSchemas = void 0;
3
+ exports.getNonInteractiveElementRoleSchemas = getNonInteractiveElementRoleSchemas;
4
+ exports.getNonInteractiveRoles = getNonInteractiveRoles;
4
5
  const aria_query_1 = require("aria-query");
5
6
  let nonInteractiveElementRoleSchemas = null;
6
7
  let nonInteractiveRoles = null;
@@ -20,7 +21,6 @@ function getNonInteractiveElementRoleSchemas() {
20
21
  }
21
22
  return nonInteractiveElementRoleSchemas;
22
23
  }
23
- exports.getNonInteractiveElementRoleSchemas = getNonInteractiveElementRoleSchemas;
24
24
  function getNonInteractiveRoles() {
25
25
  if (nonInteractiveRoles === null) {
26
26
  const roleKeys = [...aria_query_1.roles.keys()];
@@ -41,4 +41,3 @@ function getNonInteractiveRoles() {
41
41
  }
42
42
  return nonInteractiveRoles;
43
43
  }
44
- exports.getNonInteractiveRoles = getNonInteractiveRoles;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isNonInteractiveRole = exports.isInteractiveElement = void 0;
3
+ exports.isInteractiveElement = isInteractiveElement;
4
+ exports.isNonInteractiveRole = isNonInteractiveRole;
4
5
  const attributes_comparator_1 = require("../attributes-comparator");
5
6
  const get_attribute_value_1 = require("../get-attribute-value");
6
7
  const get_dom_elements_1 = require("../get-dom-elements");
@@ -38,8 +39,6 @@ function checkIsNonInteractiveRole(node) {
38
39
  function isInteractiveElement(node) {
39
40
  return (0, get_dom_elements_1.getDomElements)().has(node.name) && checkIsInteractiveElement(node);
40
41
  }
41
- exports.isInteractiveElement = isInteractiveElement;
42
42
  function isNonInteractiveRole(node) {
43
43
  return checkIsNonInteractiveRole(node);
44
44
  }
45
- exports.isNonInteractiveRole = isNonInteractiveRole;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isPresentationRole = void 0;
3
+ exports.isPresentationRole = isPresentationRole;
4
4
  const get_attribute_value_1 = require("./get-attribute-value");
5
5
  const presentationRoles = new Set([
6
6
  'none',
@@ -11,4 +11,3 @@ function isPresentationRole(node) {
11
11
  return (typeof roleAttributeValue === 'string' &&
12
12
  presentationRoles.has(roleAttributeValue));
13
13
  }
14
- exports.isPresentationRole = isPresentationRole;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSemanticRoleElement = void 0;
3
+ exports.isSemanticRoleElement = isSemanticRoleElement;
4
4
  // The axobject-query package doesn't have type definitions, but this is what we're using from it here
5
5
  let axElements = null;
6
6
  let axRoles = null;
@@ -28,4 +28,3 @@ function isSemanticRoleElement(element, role, elementAttributes) {
28
28
  ?.get(roleName)
29
29
  ?.find((semanticRole) => semanticRole.name === role)));
30
30
  }
31
- exports.isSemanticRoleElement = isSemanticRoleElement;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toPattern = void 0;
3
+ exports.toPattern = toPattern;
4
4
  function toPattern(value) {
5
5
  return RegExp(`^(${value.join('|')})$`);
6
6
  }
7
- exports.toPattern = toPattern;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/eslint-plugin-template",
3
- "version": "18.1.1-alpha.1",
3
+ "version": "18.1.1-alpha.2",
4
4
  "description": "ESLint plugin for Angular Templates",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -18,13 +18,13 @@
18
18
  "LICENSE"
19
19
  ],
20
20
  "dependencies": {
21
- "@angular-eslint/bundled-angular-compiler": "18.1.1-alpha.1",
22
- "@angular-eslint/utils": "18.1.1-alpha.1",
21
+ "@angular-eslint/bundled-angular-compiler": "18.1.1-alpha.2",
22
+ "@angular-eslint/utils": "18.1.1-alpha.2",
23
23
  "aria-query": "5.3.0",
24
24
  "axobject-query": "4.0.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@angular-eslint/test-utils": "18.1.1-alpha.1",
27
+ "@angular-eslint/test-utils": "18.1.1-alpha.2",
28
28
  "@types/aria-query": "5.0.4"
29
29
  },
30
30
  "peerDependencies": {