@flint.fyi/jsx 0.3.3 → 0.4.0

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 (93) hide show
  1. package/lib/plugin.d.ts +45 -48
  2. package/lib/plugin.js +0 -2
  3. package/lib/rules/accessKeys.d.ts +0 -1
  4. package/lib/rules/accessKeys.js +0 -2
  5. package/lib/rules/altTexts.d.ts +0 -1
  6. package/lib/rules/altTexts.js +1 -3
  7. package/lib/rules/anchorAmbiguousText.d.ts +0 -1
  8. package/lib/rules/anchorAmbiguousText.js +1 -3
  9. package/lib/rules/anchorContent.d.ts +0 -1
  10. package/lib/rules/anchorContent.js +0 -2
  11. package/lib/rules/anchorValidity.d.ts +0 -1
  12. package/lib/rules/anchorValidity.js +0 -2
  13. package/lib/rules/ariaActiveDescendantTabIndex.d.ts +0 -1
  14. package/lib/rules/ariaActiveDescendantTabIndex.js +1 -3
  15. package/lib/rules/ariaHiddenFocusables.d.ts +0 -1
  16. package/lib/rules/ariaHiddenFocusables.js +1 -3
  17. package/lib/rules/ariaPropTypes.d.ts +0 -1
  18. package/lib/rules/ariaPropTypes.js +9 -11
  19. package/lib/rules/ariaProps.d.ts +0 -1
  20. package/lib/rules/ariaProps.js +1 -3
  21. package/lib/rules/ariaRoleValidity.d.ts +0 -1
  22. package/lib/rules/ariaRoleValidity.js +1 -3
  23. package/lib/rules/ariaUnsupportedElements.d.ts +0 -1
  24. package/lib/rules/ariaUnsupportedElements.js +1 -3
  25. package/lib/rules/autoFocusProps.d.ts +0 -1
  26. package/lib/rules/autoFocusProps.js +0 -2
  27. package/lib/rules/autocomplete.d.ts +0 -1
  28. package/lib/rules/autocomplete.js +4 -10
  29. package/lib/rules/booleanValues.d.ts +0 -1
  30. package/lib/rules/booleanValues.js +0 -2
  31. package/lib/rules/bracedStatements.d.ts +0 -1
  32. package/lib/rules/bracedStatements.js +0 -2
  33. package/lib/rules/buttonTypes.d.ts +0 -1
  34. package/lib/rules/buttonTypes.js +5 -13
  35. package/lib/rules/childrenProps.d.ts +0 -1
  36. package/lib/rules/childrenProps.js +0 -2
  37. package/lib/rules/clickEventKeyEvents.d.ts +0 -1
  38. package/lib/rules/clickEventKeyEvents.js +1 -3
  39. package/lib/rules/commentTextNodes.d.ts +0 -1
  40. package/lib/rules/commentTextNodes.js +0 -2
  41. package/lib/rules/distractingElements.d.ts +0 -1
  42. package/lib/rules/distractingElements.js +1 -3
  43. package/lib/rules/elementChildrenValidity.d.ts +0 -1
  44. package/lib/rules/elementChildrenValidity.js +1 -3
  45. package/lib/rules/headingContents.d.ts +0 -1
  46. package/lib/rules/headingContents.js +1 -3
  47. package/lib/rules/htmlLangs.d.ts +0 -1
  48. package/lib/rules/htmlLangs.js +0 -2
  49. package/lib/rules/iframeTitles.d.ts +0 -1
  50. package/lib/rules/iframeTitles.js +0 -2
  51. package/lib/rules/interactiveElementRoles.d.ts +0 -1
  52. package/lib/rules/interactiveElementRoles.js +2 -4
  53. package/lib/rules/interactiveElementsFocusable.d.ts +0 -1
  54. package/lib/rules/interactiveElementsFocusable.js +4 -6
  55. package/lib/rules/labelAssociatedControls.d.ts +0 -1
  56. package/lib/rules/labelAssociatedControls.js +1 -3
  57. package/lib/rules/langValidity.d.ts +0 -1
  58. package/lib/rules/langValidity.js +0 -2
  59. package/lib/rules/mediaCaptions.d.ts +0 -1
  60. package/lib/rules/mediaCaptions.js +0 -2
  61. package/lib/rules/mouseEventKeyEvents.d.ts +0 -1
  62. package/lib/rules/mouseEventKeyEvents.js +1 -3
  63. package/lib/rules/nonInteractiveElementInteractions.d.ts +0 -1
  64. package/lib/rules/nonInteractiveElementInteractions.js +2 -4
  65. package/lib/rules/nonInteractiveElementRoles.d.ts +0 -1
  66. package/lib/rules/nonInteractiveElementRoles.js +7 -9
  67. package/lib/rules/nonInteractiveElementTabIndexes.d.ts +0 -1
  68. package/lib/rules/nonInteractiveElementTabIndexes.js +2 -4
  69. package/lib/rules/propDuplicates.d.ts +0 -1
  70. package/lib/rules/propDuplicates.js +0 -2
  71. package/lib/rules/roleRedundancies.d.ts +0 -1
  72. package/lib/rules/roleRedundancies.js +0 -2
  73. package/lib/rules/roleRequiredAriaProps.d.ts +0 -1
  74. package/lib/rules/roleRequiredAriaProps.js +0 -2
  75. package/lib/rules/roleSupportedAriaProps.d.ts +0 -1
  76. package/lib/rules/roleSupportedAriaProps.js +81 -83
  77. package/lib/rules/roleTags.d.ts +0 -1
  78. package/lib/rules/roleTags.js +0 -2
  79. package/lib/rules/ruleCreator.d.ts +0 -1
  80. package/lib/rules/ruleCreator.js +0 -2
  81. package/lib/rules/scopeProps.d.ts +0 -1
  82. package/lib/rules/scopeProps.js +0 -2
  83. package/lib/rules/staticElementInteractions.d.ts +0 -1
  84. package/lib/rules/staticElementInteractions.js +1 -3
  85. package/lib/rules/svgTitles.d.ts +0 -1
  86. package/lib/rules/svgTitles.js +0 -2
  87. package/lib/rules/tabIndexPositiveValues.d.ts +0 -1
  88. package/lib/rules/tabIndexPositiveValues.js +0 -2
  89. package/lib/rules/unescapedEntities.d.ts +0 -1
  90. package/lib/rules/unescapedEntities.js +0 -2
  91. package/lib/rules/unnecessaryFragments.d.ts +0 -1
  92. package/lib/rules/unnecessaryFragments.js +0 -2
  93. package/package.json +7 -8
@@ -40,5 +40,3 @@ var autoFocusProps_default = ruleCreator.createRule(typescriptLanguage, {
40
40
  });
41
41
  //#endregion
42
42
  export { autoFocusProps_default as default };
43
-
44
- //# sourceMappingURL=autoFocusProps.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "invalid", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=autocomplete.d.ts.map
@@ -1,9 +1,9 @@
1
1
  import { ruleCreator } from "./ruleCreator.js";
2
2
  import { SyntaxKind } from "typescript";
3
- import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
3
+ import { getStaticStringValue, getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
4
4
  import { nullThrows } from "@flint.fyi/utils";
5
5
  //#region src/rules/autocomplete.ts
6
- const validAutocompleteValues = new Set([
6
+ const validAutocompleteValues = /* @__PURE__ */ new Set([
7
7
  "address-level1",
8
8
  "address-level2",
9
9
  "address-level3",
@@ -54,7 +54,7 @@ const validAutocompleteValues = new Set([
54
54
  "username",
55
55
  "webauthn"
56
56
  ]);
57
- const billingAndShippingValues = new Set([
57
+ const billingAndShippingValues = /* @__PURE__ */ new Set([
58
58
  "address-level1",
59
59
  "address-level2",
60
60
  "address-level3",
@@ -102,7 +102,7 @@ var autocomplete_default = ruleCreator.createRule(typescriptLanguage, {
102
102
  if (tagName.text.toLowerCase() !== "input") return;
103
103
  const autocomplete = attributes.properties.find((property) => property.kind === SyntaxKind.JsxAttribute && property.name.kind === SyntaxKind.Identifier && property.name.text.toLowerCase() === "autocomplete");
104
104
  if (autocomplete?.kind !== SyntaxKind.JsxAttribute || !autocomplete.initializer) return;
105
- const value = getStringLiteralValue(autocomplete.initializer);
105
+ const value = getStaticStringValue(autocomplete.initializer);
106
106
  if (value === void 0 || isValidAutocompleteValue(value)) return;
107
107
  context.report({
108
108
  data: { value },
@@ -116,11 +116,5 @@ var autocomplete_default = ruleCreator.createRule(typescriptLanguage, {
116
116
  } };
117
117
  }
118
118
  });
119
- function getStringLiteralValue(node) {
120
- if (node.kind === SyntaxKind.StringLiteral) return node.text;
121
- if (node.kind === SyntaxKind.NoSubstitutionTemplateLiteral && node.parent.kind !== SyntaxKind.TaggedTemplateExpression) return node.text;
122
- }
123
119
  //#endregion
124
120
  export { autocomplete_default as default };
125
-
126
- //# sourceMappingURL=autocomplete.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "preferShorthand", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=booleanValues.d.ts.map
@@ -29,5 +29,3 @@ var booleanValues_default = ruleCreator.createRule(typescriptLanguage, {
29
29
  });
30
30
  //#endregion
31
31
  export { booleanValues_default as default };
32
-
33
- //# sourceMappingURL=booleanValues.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "unnecessaryBraces", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=bracedStatements.d.ts.map
@@ -29,5 +29,3 @@ var bracedStatements_default = ruleCreator.createRule(typescriptLanguage, {
29
29
  });
30
30
  //#endregion
31
31
  export { bracedStatements_default as default };
32
-
33
- //# sourceMappingURL=bracedStatements.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "invalidType" | "missingType", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=buttonTypes.d.ts.map
@@ -1,8 +1,8 @@
1
1
  import { ruleCreator } from "./ruleCreator.js";
2
2
  import { SyntaxKind } from "typescript";
3
- import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
3
+ import { getStaticStringValue, getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
4
4
  //#region src/rules/buttonTypes.ts
5
- const validButtonTypes = new Set([
5
+ const validButtonTypes = /* @__PURE__ */ new Set([
6
6
  "button",
7
7
  "reset",
8
8
  "submit"
@@ -49,7 +49,9 @@ var buttonTypes_default = ruleCreator.createRule(typescriptLanguage, {
49
49
  });
50
50
  return;
51
51
  }
52
- const typeValue = getTypeValue(typeAttribute);
52
+ const typeInitializer = typeAttribute.initializer;
53
+ const typeExpression = typeInitializer?.kind === SyntaxKind.JsxExpression ? typeInitializer.expression : typeInitializer;
54
+ const typeValue = typeExpression && getStaticStringValue(typeExpression);
53
55
  if (typeValue && !validButtonTypes.has(typeValue)) context.report({
54
56
  data: { type: typeValue },
55
57
  message: "invalidType",
@@ -62,15 +64,5 @@ var buttonTypes_default = ruleCreator.createRule(typescriptLanguage, {
62
64
  } };
63
65
  }
64
66
  });
65
- function getTypeValue(attribute) {
66
- if (!attribute.initializer) return;
67
- if (attribute.initializer.kind === SyntaxKind.StringLiteral) return attribute.initializer.text;
68
- if (attribute.initializer.kind === SyntaxKind.JsxExpression) {
69
- const expr = attribute.initializer.expression;
70
- if (expr?.kind === SyntaxKind.StringLiteral) return expr.text;
71
- }
72
- }
73
67
  //#endregion
74
68
  export { buttonTypes_default as default };
75
-
76
- //# sourceMappingURL=buttonTypes.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "noChildrenProp", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=childrenProps.d.ts.map
@@ -35,5 +35,3 @@ var childrenProps_default = ruleCreator.createRule(typescriptLanguage, {
35
35
  });
36
36
  //#endregion
37
37
  export { childrenProps_default as default };
38
-
39
- //# sourceMappingURL=childrenProps.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "missingKeyEvent", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=clickEventKeyEvents.d.ts.map
@@ -2,7 +2,7 @@ import { ruleCreator } from "./ruleCreator.js";
2
2
  import { SyntaxKind } from "typescript";
3
3
  import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
4
4
  //#region src/rules/clickEventKeyEvents.ts
5
- const interactiveElements = new Set([
5
+ const interactiveElements = /* @__PURE__ */ new Set([
6
6
  "a",
7
7
  "button",
8
8
  "input",
@@ -52,5 +52,3 @@ var clickEventKeyEvents_default = ruleCreator.createRule(typescriptLanguage, {
52
52
  });
53
53
  //#endregion
54
54
  export { clickEventKeyEvents_default as default };
55
-
56
- //# sourceMappingURL=clickEventKeyEvents.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "commentAsText", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=commentTextNodes.d.ts.map
@@ -28,5 +28,3 @@ var commentTextNodes_default = ruleCreator.createRule(typescriptLanguage, {
28
28
  });
29
29
  //#endregion
30
30
  export { commentTextNodes_default as default };
31
-
32
- //# sourceMappingURL=commentTextNodes.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "noDistractingElement", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=distractingElements.d.ts.map
@@ -2,7 +2,7 @@ import { ruleCreator } from "./ruleCreator.js";
2
2
  import { SyntaxKind } from "typescript";
3
3
  import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
4
4
  //#region src/rules/distractingElements.ts
5
- const distractingElements = new Set(["blink", "marquee"]);
5
+ const distractingElements = /* @__PURE__ */ new Set(["blink", "marquee"]);
6
6
  var distractingElements_default = ruleCreator.createRule(typescriptLanguage, {
7
7
  about: {
8
8
  description: "Reports distracting elements like <marquee> and <blink>.",
@@ -36,5 +36,3 @@ var distractingElements_default = ruleCreator.createRule(typescriptLanguage, {
36
36
  });
37
37
  //#endregion
38
38
  export { distractingElements_default as default };
39
-
40
- //# sourceMappingURL=distractingElements.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "voidElementWithChildren", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=elementChildrenValidity.d.ts.map
@@ -2,7 +2,7 @@ import { ruleCreator } from "./ruleCreator.js";
2
2
  import { SyntaxKind } from "typescript";
3
3
  import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
4
4
  //#region src/rules/elementChildrenValidity.ts
5
- const voidElements = new Set([
5
+ const voidElements = /* @__PURE__ */ new Set([
6
6
  "area",
7
7
  "base",
8
8
  "br",
@@ -50,5 +50,3 @@ var elementChildrenValidity_default = ruleCreator.createRule(typescriptLanguage,
50
50
  });
51
51
  //#endregion
52
52
  export { elementChildrenValidity_default as default };
53
-
54
- //# sourceMappingURL=elementChildrenValidity.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "emptyHeading", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=headingContents.d.ts.map
@@ -2,7 +2,7 @@ import { ruleCreator } from "./ruleCreator.js";
2
2
  import { SyntaxKind } from "typescript";
3
3
  import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
4
4
  //#region src/rules/headingContents.ts
5
- const headingElements = new Set([
5
+ const headingElements = /* @__PURE__ */ new Set([
6
6
  "h1",
7
7
  "h2",
8
8
  "h3",
@@ -50,5 +50,3 @@ var headingContents_default = ruleCreator.createRule(typescriptLanguage, {
50
50
  });
51
51
  //#endregion
52
52
  export { headingContents_default as default };
53
-
54
- //# sourceMappingURL=headingContents.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "missingLang", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=htmlLangs.d.ts.map
@@ -28,5 +28,3 @@ var htmlLangs_default = ruleCreator.createRule(typescriptLanguage, {
28
28
  });
29
29
  //#endregion
30
30
  export { htmlLangs_default as default };
31
-
32
- //# sourceMappingURL=htmlLangs.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "missingTitle", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=iframeTitles.d.ts.map
@@ -59,5 +59,3 @@ var iframeTitles_default = ruleCreator.createRule(typescriptLanguage, {
59
59
  });
60
60
  //#endregion
61
61
  export { iframeTitles_default as default };
62
-
63
- //# sourceMappingURL=iframeTitles.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "invalidRole", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=interactiveElementRoles.d.ts.map
@@ -2,7 +2,7 @@ import { ruleCreator } from "./ruleCreator.js";
2
2
  import { SyntaxKind } from "typescript";
3
3
  import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
4
4
  //#region src/rules/interactiveElementRoles.ts
5
- const interactiveElements = new Set([
5
+ const interactiveElements = /* @__PURE__ */ new Set([
6
6
  "a",
7
7
  "audio",
8
8
  "button",
@@ -13,7 +13,7 @@ const interactiveElements = new Set([
13
13
  "textarea",
14
14
  "video"
15
15
  ]);
16
- const nonInteractiveRoles = new Set([
16
+ const nonInteractiveRoles = /* @__PURE__ */ new Set([
17
17
  "article",
18
18
  "banner",
19
19
  "complementary",
@@ -89,5 +89,3 @@ var interactiveElementRoles_default = ruleCreator.createRule(typescriptLanguage,
89
89
  });
90
90
  //#endregion
91
91
  export { interactiveElementRoles_default as default };
92
-
93
- //# sourceMappingURL=interactiveElementRoles.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "notFocusable", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=interactiveElementsFocusable.d.ts.map
@@ -10,7 +10,7 @@ const interactiveHandlers = [
10
10
  "onMouseDown",
11
11
  "onMouseUp"
12
12
  ];
13
- const interactiveRoles = new Set([
13
+ const interactiveRoles = /* @__PURE__ */ new Set([
14
14
  "button",
15
15
  "checkbox",
16
16
  "columnheader",
@@ -42,7 +42,7 @@ const interactiveRoles = new Set([
42
42
  "treegrid",
43
43
  "treeitem"
44
44
  ]);
45
- const inherentlyFocusableElements = new Set([
45
+ const inherentlyFocusableElements = /* @__PURE__ */ new Set([
46
46
  "a",
47
47
  "audio",
48
48
  "button",
@@ -51,7 +51,7 @@ const inherentlyFocusableElements = new Set([
51
51
  "textarea",
52
52
  "video"
53
53
  ]);
54
- const nonInteractiveElements = new Set([
54
+ const nonInteractiveElements = /* @__PURE__ */ new Set([
55
55
  "article",
56
56
  "aside",
57
57
  "body",
@@ -79,7 +79,7 @@ const nonInteractiveElements = new Set([
79
79
  "td",
80
80
  "ul"
81
81
  ]);
82
- const nonInteractiveRoles = new Set([
82
+ const nonInteractiveRoles = /* @__PURE__ */ new Set([
83
83
  "article",
84
84
  "banner",
85
85
  "complementary",
@@ -168,5 +168,3 @@ var interactiveElementsFocusable_default = ruleCreator.createRule(typescriptLang
168
168
  });
169
169
  //#endregion
170
170
  export { interactiveElementsFocusable_default as default };
171
-
172
- //# sourceMappingURL=interactiveElementsFocusable.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "missingAssociatedControl", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=labelAssociatedControls.d.ts.map
@@ -2,7 +2,7 @@ import { ruleCreator } from "./ruleCreator.js";
2
2
  import { SyntaxKind } from "typescript";
3
3
  import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
4
4
  //#region src/rules/labelAssociatedControls.ts
5
- const controlElements = new Set([
5
+ const controlElements = /* @__PURE__ */ new Set([
6
6
  "input",
7
7
  "meter",
8
8
  "output",
@@ -66,5 +66,3 @@ var labelAssociatedControls_default = ruleCreator.createRule(typescriptLanguage,
66
66
  });
67
67
  //#endregion
68
68
  export { labelAssociatedControls_default as default };
69
-
70
- //# sourceMappingURL=labelAssociatedControls.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "invalidLang", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=langValidity.d.ts.map
@@ -39,5 +39,3 @@ var langValidity_default = ruleCreator.createRule(typescriptLanguage, {
39
39
  });
40
40
  //#endregion
41
41
  export { langValidity_default as default };
42
-
43
- //# sourceMappingURL=langValidity.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "missingCaptions", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=mediaCaptions.d.ts.map
@@ -48,5 +48,3 @@ function isCaptionsTrack(node) {
48
48
  }
49
49
  //#endregion
50
50
  export { mediaCaptions_default as default };
51
-
52
- //# sourceMappingURL=mediaCaptions.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "missingKeyEvent", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=mouseEventKeyEvents.d.ts.map
@@ -2,7 +2,7 @@ import { ruleCreator } from "./ruleCreator.js";
2
2
  import { SyntaxKind } from "typescript";
3
3
  import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
4
4
  //#region src/rules/mouseEventKeyEvents.ts
5
- const mouseNamesToKeyboardNames = new Map([["onMouseOut", "onBlur"], ["onMouseOver", "onFocus"]]);
5
+ const mouseNamesToKeyboardNames = /* @__PURE__ */ new Map([["onMouseOut", "onBlur"], ["onMouseOver", "onFocus"]]);
6
6
  var mouseEventKeyEvents_default = ruleCreator.createRule(typescriptLanguage, {
7
7
  about: {
8
8
  description: "Reports mouse events without corresponding keyboard events.",
@@ -45,5 +45,3 @@ var mouseEventKeyEvents_default = ruleCreator.createRule(typescriptLanguage, {
45
45
  });
46
46
  //#endregion
47
47
  export { mouseEventKeyEvents_default as default };
48
-
49
- //# sourceMappingURL=mouseEventKeyEvents.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "invalidHandler", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=nonInteractiveElementInteractions.d.ts.map
@@ -10,7 +10,7 @@ const interactiveHandlers = [
10
10
  "onMouseDown",
11
11
  "onMouseUp"
12
12
  ];
13
- const nonInteractiveElements = new Set([
13
+ const nonInteractiveElements = /* @__PURE__ */ new Set([
14
14
  "area",
15
15
  "article",
16
16
  "aside",
@@ -37,7 +37,7 @@ const nonInteractiveElements = new Set([
37
37
  "td",
38
38
  "ul"
39
39
  ]);
40
- const nonInteractiveRoles = new Set([
40
+ const nonInteractiveRoles = /* @__PURE__ */ new Set([
41
41
  "article",
42
42
  "banner",
43
43
  "complementary",
@@ -91,5 +91,3 @@ var nonInteractiveElementInteractions_default = ruleCreator.createRule(typescrip
91
91
  });
92
92
  //#endregion
93
93
  export { nonInteractiveElementInteractions_default as default };
94
-
95
- //# sourceMappingURL=nonInteractiveElementInteractions.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "invalidRole", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=nonInteractiveElementRoles.d.ts.map
@@ -2,7 +2,7 @@ import { ruleCreator } from "./ruleCreator.js";
2
2
  import { SyntaxKind } from "typescript";
3
3
  import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
4
4
  //#region src/rules/nonInteractiveElementRoles.ts
5
- const nonInteractiveElements = new Set([
5
+ const nonInteractiveElements = /* @__PURE__ */ new Set([
6
6
  "article",
7
7
  "aside",
8
8
  "body",
@@ -29,7 +29,7 @@ const nonInteractiveElements = new Set([
29
29
  "td",
30
30
  "ul"
31
31
  ]);
32
- const interactiveRoles = new Set([
32
+ const interactiveRoles = /* @__PURE__ */ new Set([
33
33
  "button",
34
34
  "checkbox",
35
35
  "link",
@@ -46,14 +46,14 @@ const interactiveRoles = new Set([
46
46
  "textbox"
47
47
  ]);
48
48
  const allowedExceptions = {
49
- li: new Set([
49
+ li: /* @__PURE__ */ new Set([
50
50
  "menuitem",
51
51
  "option",
52
52
  "row",
53
53
  "tab",
54
54
  "treeitem"
55
55
  ]),
56
- ol: new Set([
56
+ ol: /* @__PURE__ */ new Set([
57
57
  "listbox",
58
58
  "menu",
59
59
  "menubar",
@@ -62,9 +62,9 @@ const allowedExceptions = {
62
62
  "tree",
63
63
  "treegrid"
64
64
  ]),
65
- table: new Set(["grid"]),
66
- td: new Set(["gridcell"]),
67
- ul: new Set([
65
+ table: /* @__PURE__ */ new Set(["grid"]),
66
+ td: /* @__PURE__ */ new Set(["gridcell"]),
67
+ ul: /* @__PURE__ */ new Set([
68
68
  "listbox",
69
69
  "menu",
70
70
  "menubar",
@@ -114,5 +114,3 @@ var nonInteractiveElementRoles_default = ruleCreator.createRule(typescriptLangua
114
114
  });
115
115
  //#endregion
116
116
  export { nonInteractiveElementRoles_default as default };
117
-
118
- //# sourceMappingURL=nonInteractiveElementRoles.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "nonInteractiveTabIndex", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=nonInteractiveElementTabIndexes.d.ts.map
@@ -2,7 +2,7 @@ import { ruleCreator } from "./ruleCreator.js";
2
2
  import { SyntaxKind } from "typescript";
3
3
  import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
4
4
  //#region src/rules/nonInteractiveElementTabIndexes.ts
5
- const nonInteractiveElements = new Set([
5
+ const nonInteractiveElements = /* @__PURE__ */ new Set([
6
6
  "article",
7
7
  "aside",
8
8
  "body",
@@ -28,7 +28,7 @@ const nonInteractiveElements = new Set([
28
28
  "span",
29
29
  "ul"
30
30
  ]);
31
- const interactiveRoles = new Set([
31
+ const interactiveRoles = /* @__PURE__ */ new Set([
32
32
  "button",
33
33
  "checkbox",
34
34
  "link",
@@ -105,5 +105,3 @@ var nonInteractiveElementTabIndexes_default = ruleCreator.createRule(typescriptL
105
105
  });
106
106
  //#endregion
107
107
  export { nonInteractiveElementTabIndexes_default as default };
108
-
109
- //# sourceMappingURL=nonInteractiveElementTabIndexes.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "duplicateProp", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=propDuplicates.d.ts.map
@@ -35,5 +35,3 @@ var propDuplicates_default = ruleCreator.createRule(typescriptLanguage, {
35
35
  });
36
36
  //#endregion
37
37
  export { propDuplicates_default as default };
38
-
39
- //# sourceMappingURL=propDuplicates.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "redundantRole", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=roleRedundancies.d.ts.map
@@ -72,5 +72,3 @@ var roleRedundancies_default = ruleCreator.createRule(typescriptLanguage, {
72
72
  });
73
73
  //#endregion
74
74
  export { roleRedundancies_default as default };
75
-
76
- //# sourceMappingURL=roleRedundancies.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "missingRequiredProps", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=roleRequiredAriaProps.d.ts.map
@@ -74,5 +74,3 @@ var roleRequiredAriaProps_default = ruleCreator.createRule(typescriptLanguage, {
74
74
  });
75
75
  //#endregion
76
76
  export { roleRequiredAriaProps_default as default };
77
-
78
- //# sourceMappingURL=roleRequiredAriaProps.js.map
@@ -7,4 +7,3 @@ declare const _default: import("@flint.fyi/core").Rule<{
7
7
  readonly url: string;
8
8
  }, "unsupportedProp", undefined>;
9
9
  export default _default;
10
- //# sourceMappingURL=roleSupportedAriaProps.d.ts.map