@flint.fyi/jsx 0.3.2 → 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.
- package/lib/plugin.d.ts +45 -48
- package/lib/plugin.js +0 -2
- package/lib/rules/accessKeys.d.ts +0 -1
- package/lib/rules/accessKeys.js +1 -3
- package/lib/rules/altTexts.d.ts +0 -1
- package/lib/rules/altTexts.js +2 -4
- package/lib/rules/anchorAmbiguousText.d.ts +0 -1
- package/lib/rules/anchorAmbiguousText.js +2 -4
- package/lib/rules/anchorContent.d.ts +0 -1
- package/lib/rules/anchorContent.js +1 -3
- package/lib/rules/anchorValidity.d.ts +0 -1
- package/lib/rules/anchorValidity.js +1 -3
- package/lib/rules/ariaActiveDescendantTabIndex.d.ts +0 -1
- package/lib/rules/ariaActiveDescendantTabIndex.js +2 -4
- package/lib/rules/ariaHiddenFocusables.d.ts +0 -1
- package/lib/rules/ariaHiddenFocusables.js +2 -4
- package/lib/rules/ariaPropTypes.d.ts +0 -1
- package/lib/rules/ariaPropTypes.js +10 -12
- package/lib/rules/ariaProps.d.ts +0 -1
- package/lib/rules/ariaProps.js +2 -4
- package/lib/rules/ariaRoleValidity.d.ts +0 -1
- package/lib/rules/ariaRoleValidity.js +2 -4
- package/lib/rules/ariaUnsupportedElements.d.ts +0 -1
- package/lib/rules/ariaUnsupportedElements.js +2 -4
- package/lib/rules/autoFocusProps.d.ts +0 -1
- package/lib/rules/autoFocusProps.js +1 -3
- package/lib/rules/autocomplete.d.ts +0 -1
- package/lib/rules/autocomplete.js +4 -10
- package/lib/rules/booleanValues.d.ts +0 -1
- package/lib/rules/booleanValues.js +1 -3
- package/lib/rules/bracedStatements.d.ts +0 -1
- package/lib/rules/bracedStatements.js +1 -3
- package/lib/rules/buttonTypes.d.ts +0 -1
- package/lib/rules/buttonTypes.js +5 -13
- package/lib/rules/childrenProps.d.ts +0 -1
- package/lib/rules/childrenProps.js +1 -3
- package/lib/rules/clickEventKeyEvents.d.ts +0 -1
- package/lib/rules/clickEventKeyEvents.js +2 -4
- package/lib/rules/commentTextNodes.d.ts +0 -1
- package/lib/rules/commentTextNodes.js +0 -2
- package/lib/rules/distractingElements.d.ts +0 -1
- package/lib/rules/distractingElements.js +2 -4
- package/lib/rules/elementChildrenValidity.d.ts +0 -1
- package/lib/rules/elementChildrenValidity.js +2 -4
- package/lib/rules/headingContents.d.ts +0 -1
- package/lib/rules/headingContents.js +2 -4
- package/lib/rules/htmlLangs.d.ts +0 -1
- package/lib/rules/htmlLangs.js +1 -3
- package/lib/rules/iframeTitles.d.ts +0 -1
- package/lib/rules/iframeTitles.js +1 -3
- package/lib/rules/interactiveElementRoles.d.ts +0 -1
- package/lib/rules/interactiveElementRoles.js +3 -5
- package/lib/rules/interactiveElementsFocusable.d.ts +0 -1
- package/lib/rules/interactiveElementsFocusable.js +5 -7
- package/lib/rules/labelAssociatedControls.d.ts +0 -1
- package/lib/rules/labelAssociatedControls.js +2 -4
- package/lib/rules/langValidity.d.ts +0 -1
- package/lib/rules/langValidity.js +1 -3
- package/lib/rules/mediaCaptions.d.ts +0 -1
- package/lib/rules/mediaCaptions.js +1 -3
- package/lib/rules/mouseEventKeyEvents.d.ts +0 -1
- package/lib/rules/mouseEventKeyEvents.js +2 -4
- package/lib/rules/nonInteractiveElementInteractions.d.ts +0 -1
- package/lib/rules/nonInteractiveElementInteractions.js +3 -5
- package/lib/rules/nonInteractiveElementRoles.d.ts +0 -1
- package/lib/rules/nonInteractiveElementRoles.js +8 -10
- package/lib/rules/nonInteractiveElementTabIndexes.d.ts +0 -1
- package/lib/rules/nonInteractiveElementTabIndexes.js +3 -5
- package/lib/rules/propDuplicates.d.ts +0 -1
- package/lib/rules/propDuplicates.js +1 -3
- package/lib/rules/roleRedundancies.d.ts +0 -1
- package/lib/rules/roleRedundancies.js +1 -3
- package/lib/rules/roleRequiredAriaProps.d.ts +0 -1
- package/lib/rules/roleRequiredAriaProps.js +1 -3
- package/lib/rules/roleSupportedAriaProps.d.ts +0 -1
- package/lib/rules/roleSupportedAriaProps.js +82 -84
- package/lib/rules/roleTags.d.ts +0 -1
- package/lib/rules/roleTags.js +1 -3
- package/lib/rules/ruleCreator.d.ts +0 -1
- package/lib/rules/ruleCreator.js +0 -2
- package/lib/rules/scopeProps.d.ts +0 -1
- package/lib/rules/scopeProps.js +1 -3
- package/lib/rules/staticElementInteractions.d.ts +0 -1
- package/lib/rules/staticElementInteractions.js +2 -4
- package/lib/rules/svgTitles.d.ts +0 -1
- package/lib/rules/svgTitles.js +1 -3
- package/lib/rules/tabIndexPositiveValues.d.ts +0 -1
- package/lib/rules/tabIndexPositiveValues.js +1 -3
- package/lib/rules/unescapedEntities.d.ts +0 -1
- package/lib/rules/unescapedEntities.js +0 -2
- package/lib/rules/unnecessaryFragments.d.ts +0 -1
- package/lib/rules/unnecessaryFragments.js +1 -3
- package/package.json +10 -11
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
3
|
+
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
4
4
|
//#region src/rules/ariaRoleValidity.ts
|
|
5
|
-
const validAriaRoles = new Set([
|
|
5
|
+
const validAriaRoles = /* @__PURE__ */ new Set([
|
|
6
6
|
"alert",
|
|
7
7
|
"alertdialog",
|
|
8
8
|
"application",
|
|
@@ -109,5 +109,3 @@ var ariaRoleValidity_default = ruleCreator.createRule(typescriptLanguage, {
|
|
|
109
109
|
});
|
|
110
110
|
//#endregion
|
|
111
111
|
export { ariaRoleValidity_default as default };
|
|
112
|
-
|
|
113
|
-
//# sourceMappingURL=ariaRoleValidity.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
3
|
+
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
4
4
|
//#region src/rules/ariaUnsupportedElements.ts
|
|
5
|
-
const unsupportedElements = new Set([
|
|
5
|
+
const unsupportedElements = /* @__PURE__ */ new Set([
|
|
6
6
|
"base",
|
|
7
7
|
"body",
|
|
8
8
|
"caption",
|
|
@@ -84,5 +84,3 @@ var ariaUnsupportedElements_default = ruleCreator.createRule(typescriptLanguage,
|
|
|
84
84
|
});
|
|
85
85
|
//#endregion
|
|
86
86
|
export { ariaUnsupportedElements_default as default };
|
|
87
|
-
|
|
88
|
-
//# sourceMappingURL=ariaUnsupportedElements.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
3
|
+
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
4
4
|
//#region src/rules/autoFocusProps.ts
|
|
5
5
|
var autoFocusProps_default = ruleCreator.createRule(typescriptLanguage, {
|
|
6
6
|
about: {
|
|
@@ -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
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
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 =
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
3
|
+
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
4
4
|
//#region src/rules/booleanValues.ts
|
|
5
5
|
var booleanValues_default = ruleCreator.createRule(typescriptLanguage, {
|
|
6
6
|
about: {
|
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
3
|
+
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
4
4
|
//#region src/rules/bracedStatements.ts
|
|
5
5
|
var bracedStatements_default = ruleCreator.createRule(typescriptLanguage, {
|
|
6
6
|
about: {
|
|
@@ -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
|
package/lib/rules/buttonTypes.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
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
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
3
|
+
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
4
4
|
//#region src/rules/childrenProps.ts
|
|
5
5
|
var childrenProps_default = ruleCreator.createRule(typescriptLanguage, {
|
|
6
6
|
about: {
|
|
@@ -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
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
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
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
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
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
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
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
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
|
package/lib/rules/htmlLangs.d.ts
CHANGED
package/lib/rules/htmlLangs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
3
|
+
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
4
4
|
//#region src/rules/htmlLangs.ts
|
|
5
5
|
var htmlLangs_default = ruleCreator.createRule(typescriptLanguage, {
|
|
6
6
|
about: {
|
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
3
|
+
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
4
4
|
//#region src/rules/iframeTitles.ts
|
|
5
5
|
var iframeTitles_default = ruleCreator.createRule(typescriptLanguage, {
|
|
6
6
|
about: {
|
|
@@ -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
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
3
|
+
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
4
4
|
//#region src/rules/interactiveElementsFocusable.ts
|
|
5
5
|
const interactiveHandlers = [
|
|
6
6
|
"onClick",
|
|
@@ -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
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
3
|
+
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
4
4
|
import languageTags from "language-tags";
|
|
5
5
|
//#region src/rules/langValidity.ts
|
|
6
6
|
var langValidity_default = ruleCreator.createRule(typescriptLanguage, {
|
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
3
|
+
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
4
4
|
//#region src/rules/mediaCaptions.ts
|
|
5
5
|
var mediaCaptions_default = ruleCreator.createRule(typescriptLanguage, {
|
|
6
6
|
about: {
|
|
@@ -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
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
3
|
+
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
4
4
|
//#region src/rules/nonInteractiveElementInteractions.ts
|
|
5
5
|
const interactiveHandlers = [
|
|
6
6
|
"onClick",
|
|
@@ -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
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ruleCreator } from "./ruleCreator.js";
|
|
2
|
-
import { getTSNodeRange, typescriptLanguage } from "@flint.fyi/typescript-language";
|
|
3
2
|
import { SyntaxKind } from "typescript";
|
|
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
|