@flint.fyi/jsx 0.3.1 → 0.3.3
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 +177 -177
- package/lib/rules/accessKeys.d.ts +4 -4
- package/lib/rules/accessKeys.js +1 -1
- package/lib/rules/altTexts.d.ts +4 -4
- package/lib/rules/altTexts.js +1 -1
- package/lib/rules/anchorAmbiguousText.d.ts +4 -4
- package/lib/rules/anchorAmbiguousText.js +1 -1
- package/lib/rules/anchorContent.d.ts +4 -4
- package/lib/rules/anchorContent.js +1 -1
- package/lib/rules/anchorValidity.d.ts +4 -4
- package/lib/rules/anchorValidity.js +1 -1
- package/lib/rules/ariaActiveDescendantTabIndex.d.ts +4 -4
- package/lib/rules/ariaActiveDescendantTabIndex.js +1 -1
- package/lib/rules/ariaHiddenFocusables.d.ts +4 -4
- package/lib/rules/ariaHiddenFocusables.js +1 -1
- package/lib/rules/ariaPropTypes.d.ts +4 -4
- package/lib/rules/ariaPropTypes.js +1 -1
- package/lib/rules/ariaProps.d.ts +4 -4
- package/lib/rules/ariaProps.js +1 -1
- package/lib/rules/ariaRoleValidity.d.ts +4 -4
- package/lib/rules/ariaRoleValidity.js +1 -1
- package/lib/rules/ariaUnsupportedElements.d.ts +4 -4
- package/lib/rules/ariaUnsupportedElements.js +1 -1
- package/lib/rules/autoFocusProps.d.ts +4 -4
- package/lib/rules/autoFocusProps.js +1 -1
- package/lib/rules/autocomplete.d.ts +4 -4
- package/lib/rules/autocomplete.js +1 -1
- package/lib/rules/booleanValues.d.ts +4 -4
- package/lib/rules/booleanValues.js +1 -1
- package/lib/rules/bracedStatements.d.ts +4 -4
- package/lib/rules/bracedStatements.js +1 -1
- package/lib/rules/buttonTypes.d.ts +4 -4
- package/lib/rules/buttonTypes.js +1 -1
- package/lib/rules/childrenProps.d.ts +4 -4
- package/lib/rules/childrenProps.js +1 -1
- package/lib/rules/clickEventKeyEvents.d.ts +4 -4
- package/lib/rules/clickEventKeyEvents.js +1 -1
- package/lib/rules/commentTextNodes.d.ts +4 -4
- package/lib/rules/distractingElements.d.ts +4 -4
- package/lib/rules/distractingElements.js +1 -1
- package/lib/rules/elementChildrenValidity.d.ts +4 -4
- package/lib/rules/elementChildrenValidity.js +1 -1
- package/lib/rules/headingContents.d.ts +4 -4
- package/lib/rules/headingContents.js +1 -1
- package/lib/rules/htmlLangs.d.ts +4 -4
- package/lib/rules/htmlLangs.js +1 -1
- package/lib/rules/iframeTitles.d.ts +4 -4
- package/lib/rules/iframeTitles.js +1 -1
- package/lib/rules/interactiveElementRoles.d.ts +4 -4
- package/lib/rules/interactiveElementRoles.js +1 -1
- package/lib/rules/interactiveElementsFocusable.d.ts +4 -4
- package/lib/rules/interactiveElementsFocusable.js +1 -1
- package/lib/rules/labelAssociatedControls.d.ts +4 -4
- package/lib/rules/labelAssociatedControls.js +1 -1
- package/lib/rules/langValidity.d.ts +4 -4
- package/lib/rules/langValidity.js +1 -1
- package/lib/rules/mediaCaptions.d.ts +4 -4
- package/lib/rules/mediaCaptions.js +1 -1
- package/lib/rules/mouseEventKeyEvents.d.ts +4 -4
- package/lib/rules/mouseEventKeyEvents.js +1 -1
- package/lib/rules/nonInteractiveElementInteractions.d.ts +4 -4
- package/lib/rules/nonInteractiveElementInteractions.js +1 -1
- package/lib/rules/nonInteractiveElementRoles.d.ts +4 -4
- package/lib/rules/nonInteractiveElementRoles.js +1 -1
- package/lib/rules/nonInteractiveElementTabIndexes.d.ts +4 -4
- package/lib/rules/nonInteractiveElementTabIndexes.js +1 -1
- package/lib/rules/propDuplicates.d.ts +4 -4
- package/lib/rules/propDuplicates.js +1 -1
- package/lib/rules/roleRedundancies.d.ts +4 -4
- package/lib/rules/roleRedundancies.js +1 -1
- package/lib/rules/roleRequiredAriaProps.d.ts +4 -4
- package/lib/rules/roleRequiredAriaProps.js +1 -1
- package/lib/rules/roleSupportedAriaProps.d.ts +4 -4
- package/lib/rules/roleSupportedAriaProps.js +1 -1
- package/lib/rules/roleTags.d.ts +4 -4
- package/lib/rules/roleTags.js +1 -1
- package/lib/rules/ruleCreator.d.ts +1 -1
- package/lib/rules/scopeProps.d.ts +4 -4
- package/lib/rules/scopeProps.js +1 -1
- package/lib/rules/staticElementInteractions.d.ts +4 -4
- package/lib/rules/staticElementInteractions.js +1 -1
- package/lib/rules/svgTitles.d.ts +4 -4
- package/lib/rules/svgTitles.js +1 -1
- package/lib/rules/tabIndexPositiveValues.d.ts +4 -4
- package/lib/rules/tabIndexPositiveValues.js +1 -1
- package/lib/rules/unescapedEntities.d.ts +4 -4
- package/lib/rules/unnecessaryFragments.d.ts +4 -4
- package/lib/rules/unnecessaryFragments.js +1 -1
- package/package.json +7 -7
package/lib/plugin.d.ts
CHANGED
|
@@ -1,315 +1,315 @@
|
|
|
1
1
|
import * as _flint_fyi_core0 from "@flint.fyi/core";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin.d.ts
|
|
4
|
-
declare const jsx: _flint_fyi_core0.Plugin<_flint_fyi_core0.RuleAbout
|
|
4
|
+
declare const jsx: _flint_fyi_core0.Plugin<_flint_fyi_core0.RuleAbout<string>, "all" | "javascript" | "typescript", [_flint_fyi_core0.Rule<{
|
|
5
5
|
readonly description: "Disallow the use of the `accessKey` / `accesskey` attribute on JSX elements.";
|
|
6
6
|
readonly id: "accessKeys";
|
|
7
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
7
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
8
8
|
} & {
|
|
9
|
-
|
|
10
|
-
url: string;
|
|
11
|
-
},
|
|
9
|
+
readonly pluginId: string;
|
|
10
|
+
readonly url: string;
|
|
11
|
+
}, "avoidAccessKey", undefined>, _flint_fyi_core0.Rule<{
|
|
12
12
|
readonly description: "Reports elements that require alt text but are missing it.";
|
|
13
13
|
readonly id: "altTexts";
|
|
14
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
14
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
15
15
|
} & {
|
|
16
|
-
|
|
17
|
-
url: string;
|
|
18
|
-
},
|
|
16
|
+
readonly pluginId: string;
|
|
17
|
+
readonly url: string;
|
|
18
|
+
}, "missingAlt", undefined>, _flint_fyi_core0.Rule<{
|
|
19
19
|
readonly description: "Reports anchor elements with ambiguous text that doesn't describe the link destination.";
|
|
20
20
|
readonly id: "anchorAmbiguousText";
|
|
21
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
21
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
22
22
|
} & {
|
|
23
|
-
|
|
24
|
-
url: string;
|
|
25
|
-
},
|
|
23
|
+
readonly pluginId: string;
|
|
24
|
+
readonly url: string;
|
|
25
|
+
}, "ambiguousText", undefined>, _flint_fyi_core0.Rule<{
|
|
26
26
|
readonly description: "Reports anchor elements without accessible content.";
|
|
27
27
|
readonly id: "anchorContent";
|
|
28
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
28
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
29
29
|
} & {
|
|
30
|
-
|
|
31
|
-
url: string;
|
|
32
|
-
},
|
|
30
|
+
readonly pluginId: string;
|
|
31
|
+
readonly url: string;
|
|
32
|
+
}, "missingContent", undefined>, _flint_fyi_core0.Rule<{
|
|
33
33
|
readonly description: "Reports invalid usage of anchor elements.";
|
|
34
34
|
readonly id: "anchorValidity";
|
|
35
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
35
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
36
36
|
} & {
|
|
37
|
-
|
|
38
|
-
url: string;
|
|
39
|
-
},
|
|
37
|
+
readonly pluginId: string;
|
|
38
|
+
readonly url: string;
|
|
39
|
+
}, "invalidHref" | "missingHref" | "shouldBeButton", undefined>, _flint_fyi_core0.Rule<{
|
|
40
40
|
readonly description: "Reports elements with aria-activedescendant without tabIndex.";
|
|
41
41
|
readonly id: "ariaActiveDescendantTabIndex";
|
|
42
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
42
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
43
43
|
} & {
|
|
44
|
-
|
|
45
|
-
url: string;
|
|
46
|
-
},
|
|
44
|
+
readonly pluginId: string;
|
|
45
|
+
readonly url: string;
|
|
46
|
+
}, "missingTabIndex", undefined>, _flint_fyi_core0.Rule<{
|
|
47
47
|
readonly description: "Reports elements with aria-hidden='true' that are focusable.";
|
|
48
48
|
readonly id: "ariaHiddenFocusables";
|
|
49
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
49
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
50
50
|
} & {
|
|
51
|
-
|
|
52
|
-
url: string;
|
|
53
|
-
},
|
|
51
|
+
readonly pluginId: string;
|
|
52
|
+
readonly url: string;
|
|
53
|
+
}, "ariaHiddenFocusable", undefined>, _flint_fyi_core0.Rule<{
|
|
54
54
|
readonly description: "Reports invalid ARIA properties.";
|
|
55
55
|
readonly id: "ariaProps";
|
|
56
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
56
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
57
57
|
} & {
|
|
58
|
-
|
|
59
|
-
url: string;
|
|
60
|
-
},
|
|
58
|
+
readonly pluginId: string;
|
|
59
|
+
readonly url: string;
|
|
60
|
+
}, "invalidAriaProp", undefined>, _flint_fyi_core0.Rule<{
|
|
61
61
|
readonly description: "Reports ARIA properties with invalid value types.";
|
|
62
62
|
readonly id: "ariaPropTypes";
|
|
63
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
63
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
64
64
|
} & {
|
|
65
|
-
|
|
66
|
-
url: string;
|
|
67
|
-
},
|
|
65
|
+
readonly pluginId: string;
|
|
66
|
+
readonly url: string;
|
|
67
|
+
}, "invalidPropType", undefined>, _flint_fyi_core0.Rule<{
|
|
68
68
|
readonly description: "Reports invalid or abstract ARIA roles.";
|
|
69
69
|
readonly id: "ariaRoleValidity";
|
|
70
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
70
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
71
71
|
} & {
|
|
72
|
-
|
|
73
|
-
url: string;
|
|
74
|
-
},
|
|
72
|
+
readonly pluginId: string;
|
|
73
|
+
readonly url: string;
|
|
74
|
+
}, "invalidRole", undefined>, _flint_fyi_core0.Rule<{
|
|
75
75
|
readonly description: "Reports ARIA attributes on elements that don't support them.";
|
|
76
76
|
readonly id: "ariaUnsupportedElements";
|
|
77
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
77
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
78
78
|
} & {
|
|
79
|
-
|
|
80
|
-
url: string;
|
|
81
|
-
},
|
|
79
|
+
readonly pluginId: string;
|
|
80
|
+
readonly url: string;
|
|
81
|
+
}, "unsupportedElement", undefined>, _flint_fyi_core0.Rule<{
|
|
82
82
|
readonly description: "Ensure the autocomplete attribute is correct and suitable for the form field.";
|
|
83
83
|
readonly id: "autocomplete";
|
|
84
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
84
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
85
85
|
} & {
|
|
86
|
-
|
|
87
|
-
url: string;
|
|
88
|
-
},
|
|
86
|
+
readonly pluginId: string;
|
|
87
|
+
readonly url: string;
|
|
88
|
+
}, "invalid", undefined>, _flint_fyi_core0.Rule<{
|
|
89
89
|
readonly description: "Reports autoFocus props that are not set to false.";
|
|
90
90
|
readonly id: "autoFocusProps";
|
|
91
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
91
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
92
92
|
} & {
|
|
93
|
-
|
|
94
|
-
url: string;
|
|
95
|
-
},
|
|
93
|
+
readonly pluginId: string;
|
|
94
|
+
readonly url: string;
|
|
95
|
+
}, "noAutoFocus", undefined>, _flint_fyi_core0.Rule<{
|
|
96
96
|
readonly description: "Prefer shorthand boolean attributes over explicit {true} values in JSX.";
|
|
97
97
|
readonly id: "booleanValues";
|
|
98
|
-
readonly presets: ["stylistic"];
|
|
98
|
+
readonly presets: readonly ["stylistic"];
|
|
99
99
|
} & {
|
|
100
|
-
|
|
101
|
-
url: string;
|
|
102
|
-
},
|
|
100
|
+
readonly pluginId: string;
|
|
101
|
+
readonly url: string;
|
|
102
|
+
}, "preferShorthand", undefined>, _flint_fyi_core0.Rule<{
|
|
103
103
|
readonly description: "Disallow unnecessary JSX curly braces around literals and JSX elements.";
|
|
104
104
|
readonly id: "bracedStatements";
|
|
105
|
-
readonly presets: ["stylistic"];
|
|
105
|
+
readonly presets: readonly ["stylistic"];
|
|
106
106
|
} & {
|
|
107
|
-
|
|
108
|
-
url: string;
|
|
109
|
-
},
|
|
107
|
+
readonly pluginId: string;
|
|
108
|
+
readonly url: string;
|
|
109
|
+
}, "unnecessaryBraces", undefined>, _flint_fyi_core0.Rule<{
|
|
110
110
|
readonly description: "Reports button elements without an explicit type attribute.";
|
|
111
111
|
readonly id: "buttonTypes";
|
|
112
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
112
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
113
113
|
} & {
|
|
114
|
-
|
|
115
|
-
url: string;
|
|
116
|
-
},
|
|
114
|
+
readonly pluginId: string;
|
|
115
|
+
readonly url: string;
|
|
116
|
+
}, "invalidType" | "missingType", undefined>, _flint_fyi_core0.Rule<{
|
|
117
117
|
readonly description: "Reports usage of the children prop.";
|
|
118
118
|
readonly id: "childrenProps";
|
|
119
|
-
readonly presets: ["stylistic"];
|
|
119
|
+
readonly presets: readonly ["stylistic"];
|
|
120
120
|
} & {
|
|
121
|
-
|
|
122
|
-
url: string;
|
|
123
|
-
},
|
|
121
|
+
readonly pluginId: string;
|
|
122
|
+
readonly url: string;
|
|
123
|
+
}, "noChildrenProp", undefined>, _flint_fyi_core0.Rule<{
|
|
124
124
|
readonly description: "Reports onClick without keyboard event handlers.";
|
|
125
125
|
readonly id: "clickEventKeyEvents";
|
|
126
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
126
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
127
127
|
} & {
|
|
128
|
-
|
|
129
|
-
url: string;
|
|
130
|
-
},
|
|
128
|
+
readonly pluginId: string;
|
|
129
|
+
readonly url: string;
|
|
130
|
+
}, "missingKeyEvent", undefined>, _flint_fyi_core0.Rule<{
|
|
131
131
|
readonly description: "Reports JSX text nodes that contain comment syntax but are rendered as text.";
|
|
132
132
|
readonly id: "commentTextNodes";
|
|
133
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
133
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
134
134
|
} & {
|
|
135
|
-
|
|
136
|
-
url: string;
|
|
137
|
-
},
|
|
135
|
+
readonly pluginId: string;
|
|
136
|
+
readonly url: string;
|
|
137
|
+
}, "commentAsText", undefined>, _flint_fyi_core0.Rule<{
|
|
138
138
|
readonly description: "Reports distracting elements like <marquee> and <blink>.";
|
|
139
139
|
readonly id: "distractingElements";
|
|
140
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
140
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
141
141
|
} & {
|
|
142
|
-
|
|
143
|
-
url: string;
|
|
144
|
-
},
|
|
142
|
+
readonly pluginId: string;
|
|
143
|
+
readonly url: string;
|
|
144
|
+
}, "noDistractingElement", undefined>, _flint_fyi_core0.Rule<{
|
|
145
145
|
readonly description: "Reports void DOM elements that have children, which is invalid HTML.";
|
|
146
146
|
readonly id: "elementChildrenValidity";
|
|
147
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
147
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
148
148
|
} & {
|
|
149
|
-
|
|
150
|
-
url: string;
|
|
151
|
-
},
|
|
149
|
+
readonly pluginId: string;
|
|
150
|
+
readonly url: string;
|
|
151
|
+
}, "voidElementWithChildren", undefined>, _flint_fyi_core0.Rule<{
|
|
152
152
|
readonly description: "Reports heading elements without accessible content.";
|
|
153
153
|
readonly id: "headingContents";
|
|
154
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
154
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
155
155
|
} & {
|
|
156
|
-
|
|
157
|
-
url: string;
|
|
158
|
-
},
|
|
156
|
+
readonly pluginId: string;
|
|
157
|
+
readonly url: string;
|
|
158
|
+
}, "emptyHeading", undefined>, _flint_fyi_core0.Rule<{
|
|
159
159
|
readonly description: "Reports <html> elements without a lang prop.";
|
|
160
160
|
readonly id: "htmlLangs";
|
|
161
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
161
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
162
162
|
} & {
|
|
163
|
-
|
|
164
|
-
url: string;
|
|
165
|
-
},
|
|
163
|
+
readonly pluginId: string;
|
|
164
|
+
readonly url: string;
|
|
165
|
+
}, "missingLang", undefined>, _flint_fyi_core0.Rule<{
|
|
166
166
|
readonly description: "Reports <iframe> elements without a title prop.";
|
|
167
167
|
readonly id: "iframeTitles";
|
|
168
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
168
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
169
169
|
} & {
|
|
170
|
-
|
|
171
|
-
url: string;
|
|
172
|
-
},
|
|
170
|
+
readonly pluginId: string;
|
|
171
|
+
readonly url: string;
|
|
172
|
+
}, "missingTitle", undefined>, _flint_fyi_core0.Rule<{
|
|
173
173
|
readonly description: "Reports interactive elements with non-interactive ARIA roles.";
|
|
174
174
|
readonly id: "interactiveElementRoles";
|
|
175
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
175
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
176
176
|
} & {
|
|
177
|
-
|
|
178
|
-
url: string;
|
|
179
|
-
},
|
|
177
|
+
readonly pluginId: string;
|
|
178
|
+
readonly url: string;
|
|
179
|
+
}, "invalidRole", undefined>, _flint_fyi_core0.Rule<{
|
|
180
180
|
readonly description: "Reports interactive elements that are not focusable via keyboard.";
|
|
181
181
|
readonly id: "interactiveElementsFocusable";
|
|
182
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
182
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
183
183
|
} & {
|
|
184
|
-
|
|
185
|
-
url: string;
|
|
186
|
-
},
|
|
184
|
+
readonly pluginId: string;
|
|
185
|
+
readonly url: string;
|
|
186
|
+
}, "notFocusable", undefined>, _flint_fyi_core0.Rule<{
|
|
187
187
|
readonly description: "Reports <label> elements without an associated control element.";
|
|
188
188
|
readonly id: "labelAssociatedControls";
|
|
189
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
189
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
190
190
|
} & {
|
|
191
|
-
|
|
192
|
-
url: string;
|
|
193
|
-
},
|
|
191
|
+
readonly pluginId: string;
|
|
192
|
+
readonly url: string;
|
|
193
|
+
}, "missingAssociatedControl", undefined>, _flint_fyi_core0.Rule<{
|
|
194
194
|
readonly description: "Reports invalid lang attribute values.";
|
|
195
195
|
readonly id: "langValidity";
|
|
196
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
196
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
197
197
|
} & {
|
|
198
|
-
|
|
199
|
-
url: string;
|
|
200
|
-
},
|
|
198
|
+
readonly pluginId: string;
|
|
199
|
+
readonly url: string;
|
|
200
|
+
}, "invalidLang", undefined>, _flint_fyi_core0.Rule<{
|
|
201
201
|
readonly description: "Reports media elements without captions.";
|
|
202
202
|
readonly id: "mediaCaptions";
|
|
203
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
203
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
204
204
|
} & {
|
|
205
|
-
|
|
206
|
-
url: string;
|
|
207
|
-
},
|
|
205
|
+
readonly pluginId: string;
|
|
206
|
+
readonly url: string;
|
|
207
|
+
}, "missingCaptions", undefined>, _flint_fyi_core0.Rule<{
|
|
208
208
|
readonly description: "Reports mouse events without corresponding keyboard events.";
|
|
209
209
|
readonly id: "mouseEventKeyEvents";
|
|
210
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
210
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
211
211
|
} & {
|
|
212
|
-
|
|
213
|
-
url: string;
|
|
214
|
-
},
|
|
212
|
+
readonly pluginId: string;
|
|
213
|
+
readonly url: string;
|
|
214
|
+
}, "missingKeyEvent", undefined>, _flint_fyi_core0.Rule<{
|
|
215
215
|
readonly description: "Reports non-interactive elements with interactive event handlers.";
|
|
216
216
|
readonly id: "nonInteractiveElementInteractions";
|
|
217
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
217
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
218
218
|
} & {
|
|
219
|
-
|
|
220
|
-
url: string;
|
|
221
|
-
},
|
|
219
|
+
readonly pluginId: string;
|
|
220
|
+
readonly url: string;
|
|
221
|
+
}, "invalidHandler", undefined>, _flint_fyi_core0.Rule<{
|
|
222
222
|
readonly description: "Reports non-interactive elements with interactive ARIA roles.";
|
|
223
223
|
readonly id: "nonInteractiveElementRoles";
|
|
224
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
224
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
225
225
|
} & {
|
|
226
|
-
|
|
227
|
-
url: string;
|
|
228
|
-
},
|
|
226
|
+
readonly pluginId: string;
|
|
227
|
+
readonly url: string;
|
|
228
|
+
}, "invalidRole", undefined>, _flint_fyi_core0.Rule<{
|
|
229
229
|
readonly description: "Reports non-interactive elements with positive or zero tabIndex values.";
|
|
230
230
|
readonly id: "nonInteractiveElementTabIndexes";
|
|
231
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
231
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
232
232
|
} & {
|
|
233
|
-
|
|
234
|
-
url: string;
|
|
235
|
-
},
|
|
233
|
+
readonly pluginId: string;
|
|
234
|
+
readonly url: string;
|
|
235
|
+
}, "nonInteractiveTabIndex", undefined>, _flint_fyi_core0.Rule<{
|
|
236
236
|
readonly description: "Disallow duplicate props in JSX elements.";
|
|
237
237
|
readonly id: "propDuplicates";
|
|
238
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
238
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
239
239
|
} & {
|
|
240
|
-
|
|
241
|
-
url: string;
|
|
242
|
-
},
|
|
240
|
+
readonly pluginId: string;
|
|
241
|
+
readonly url: string;
|
|
242
|
+
}, "duplicateProp", undefined>, _flint_fyi_core0.Rule<{
|
|
243
243
|
readonly description: "Reports redundant ARIA roles on elements with implicit roles.";
|
|
244
244
|
readonly id: "roleRedundancies";
|
|
245
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
245
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
246
246
|
} & {
|
|
247
|
-
|
|
248
|
-
url: string;
|
|
249
|
-
},
|
|
247
|
+
readonly pluginId: string;
|
|
248
|
+
readonly url: string;
|
|
249
|
+
}, "redundantRole", undefined>, _flint_fyi_core0.Rule<{
|
|
250
250
|
readonly description: "Reports ARIA roles missing their required ARIA properties.";
|
|
251
251
|
readonly id: "roleRequiredAriaProps";
|
|
252
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
252
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
253
253
|
} & {
|
|
254
|
-
|
|
255
|
-
url: string;
|
|
256
|
-
},
|
|
254
|
+
readonly pluginId: string;
|
|
255
|
+
readonly url: string;
|
|
256
|
+
}, "missingRequiredProps", undefined>, _flint_fyi_core0.Rule<{
|
|
257
257
|
readonly description: "Reports ARIA properties that are not supported by an element's role.";
|
|
258
258
|
readonly id: "roleSupportedAriaProps";
|
|
259
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
259
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
260
260
|
} & {
|
|
261
|
-
|
|
262
|
-
url: string;
|
|
263
|
-
},
|
|
261
|
+
readonly pluginId: string;
|
|
262
|
+
readonly url: string;
|
|
263
|
+
}, "unsupportedProp", undefined>, _flint_fyi_core0.Rule<{
|
|
264
264
|
readonly description: "Reports ARIA roles that have semantic HTML element equivalents.";
|
|
265
265
|
readonly id: "roleTags";
|
|
266
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
266
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
267
267
|
} & {
|
|
268
|
-
|
|
269
|
-
url: string;
|
|
270
|
-
},
|
|
268
|
+
readonly pluginId: string;
|
|
269
|
+
readonly url: string;
|
|
270
|
+
}, "preferSemanticElement", undefined>, _flint_fyi_core0.Rule<{
|
|
271
271
|
readonly description: "Reports scope props on non-th elements.";
|
|
272
272
|
readonly id: "scopeProps";
|
|
273
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
273
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
274
274
|
} & {
|
|
275
|
-
|
|
276
|
-
url: string;
|
|
277
|
-
},
|
|
275
|
+
readonly pluginId: string;
|
|
276
|
+
readonly url: string;
|
|
277
|
+
}, "invalidScope", undefined>, _flint_fyi_core0.Rule<{
|
|
278
278
|
readonly description: "Reports static elements with event handlers that lack ARIA roles.";
|
|
279
279
|
readonly id: "staticElementInteractions";
|
|
280
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
280
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
281
281
|
} & {
|
|
282
|
-
|
|
283
|
-
url: string;
|
|
284
|
-
},
|
|
282
|
+
readonly pluginId: string;
|
|
283
|
+
readonly url: string;
|
|
284
|
+
}, "missingRole", undefined>, _flint_fyi_core0.Rule<{
|
|
285
285
|
readonly description: "Reports <svg> elements without a <title> child element.";
|
|
286
286
|
readonly id: "svgTitles";
|
|
287
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
287
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
288
288
|
} & {
|
|
289
|
-
|
|
290
|
-
url: string;
|
|
291
|
-
},
|
|
289
|
+
readonly pluginId: string;
|
|
290
|
+
readonly url: string;
|
|
291
|
+
}, "missingTitle", undefined>, _flint_fyi_core0.Rule<{
|
|
292
292
|
readonly description: "Reports positive tabIndex values.";
|
|
293
293
|
readonly id: "tabIndexPositiveValues";
|
|
294
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
294
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
295
295
|
} & {
|
|
296
|
-
|
|
297
|
-
url: string;
|
|
298
|
-
},
|
|
296
|
+
readonly pluginId: string;
|
|
297
|
+
readonly url: string;
|
|
298
|
+
}, "noPositiveTabIndex", undefined>, _flint_fyi_core0.Rule<{
|
|
299
299
|
readonly description: "Disallow unescaped HTML entities in JSX text that may cause rendering issues.";
|
|
300
300
|
readonly id: "unescapedEntities";
|
|
301
|
-
readonly presets: ["stylistic"];
|
|
301
|
+
readonly presets: readonly ["stylistic"];
|
|
302
302
|
} & {
|
|
303
|
-
|
|
304
|
-
url: string;
|
|
305
|
-
},
|
|
303
|
+
readonly pluginId: string;
|
|
304
|
+
readonly url: string;
|
|
305
|
+
}, "unescapedEntity", undefined>, _flint_fyi_core0.Rule<{
|
|
306
306
|
readonly description: "Disallow unnecessary JSX fragments that wrap a single child or have no children.";
|
|
307
307
|
readonly id: "unnecessaryFragments";
|
|
308
|
-
readonly presets: ["stylistic"];
|
|
308
|
+
readonly presets: readonly ["stylistic"];
|
|
309
309
|
} & {
|
|
310
|
-
|
|
311
|
-
url: string;
|
|
312
|
-
},
|
|
310
|
+
readonly pluginId: string;
|
|
311
|
+
readonly url: string;
|
|
312
|
+
}, "unnecessaryFragment", undefined>]>;
|
|
313
313
|
//#endregion
|
|
314
314
|
export { jsx };
|
|
315
315
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const _default: import("@flint.fyi/core").Rule<{
|
|
2
2
|
readonly description: "Disallow the use of the `accessKey` / `accesskey` attribute on JSX elements.";
|
|
3
3
|
readonly id: "accessKeys";
|
|
4
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
4
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
5
5
|
} & {
|
|
6
|
-
|
|
7
|
-
url: string;
|
|
8
|
-
},
|
|
6
|
+
readonly pluginId: string;
|
|
7
|
+
readonly url: string;
|
|
8
|
+
}, "avoidAccessKey", undefined>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=accessKeys.d.ts.map
|
package/lib/rules/accessKeys.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/accessKeys.ts
|
|
5
5
|
var accessKeys_default = ruleCreator.createRule(typescriptLanguage, {
|
|
6
6
|
about: {
|
package/lib/rules/altTexts.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const _default: import("@flint.fyi/core").Rule<{
|
|
2
2
|
readonly description: "Reports elements that require alt text but are missing it.";
|
|
3
3
|
readonly id: "altTexts";
|
|
4
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
4
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
5
5
|
} & {
|
|
6
|
-
|
|
7
|
-
url: string;
|
|
8
|
-
},
|
|
6
|
+
readonly pluginId: string;
|
|
7
|
+
readonly url: string;
|
|
8
|
+
}, "missingAlt", undefined>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=altTexts.d.ts.map
|
package/lib/rules/altTexts.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/altTexts.ts
|
|
5
5
|
const alternateProperties = new Set([
|
|
6
6
|
"aria-label",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const _default: import("@flint.fyi/core").Rule<{
|
|
2
2
|
readonly description: "Reports anchor elements with ambiguous text that doesn't describe the link destination.";
|
|
3
3
|
readonly id: "anchorAmbiguousText";
|
|
4
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
4
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
5
5
|
} & {
|
|
6
|
-
|
|
7
|
-
url: string;
|
|
8
|
-
},
|
|
6
|
+
readonly pluginId: string;
|
|
7
|
+
readonly url: string;
|
|
8
|
+
}, "ambiguousText", undefined>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=anchorAmbiguousText.d.ts.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/anchorAmbiguousText.ts
|
|
5
5
|
const ambiguousWords = new Set([
|
|
6
6
|
"a link",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const _default: import("@flint.fyi/core").Rule<{
|
|
2
2
|
readonly description: "Reports anchor elements without accessible content.";
|
|
3
3
|
readonly id: "anchorContent";
|
|
4
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
4
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
5
5
|
} & {
|
|
6
|
-
|
|
7
|
-
url: string;
|
|
8
|
-
},
|
|
6
|
+
readonly pluginId: string;
|
|
7
|
+
readonly url: string;
|
|
8
|
+
}, "missingContent", undefined>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=anchorContent.d.ts.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/anchorContent.ts
|
|
5
5
|
var anchorContent_default = ruleCreator.createRule(typescriptLanguage, {
|
|
6
6
|
about: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const _default: import("@flint.fyi/core").Rule<{
|
|
2
2
|
readonly description: "Reports invalid usage of anchor elements.";
|
|
3
3
|
readonly id: "anchorValidity";
|
|
4
|
-
readonly presets: ["logical", "logicalStrict"];
|
|
4
|
+
readonly presets: readonly ["logical", "logicalStrict"];
|
|
5
5
|
} & {
|
|
6
|
-
|
|
7
|
-
url: string;
|
|
8
|
-
},
|
|
6
|
+
readonly pluginId: string;
|
|
7
|
+
readonly url: string;
|
|
8
|
+
}, "invalidHref" | "missingHref" | "shouldBeButton", undefined>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=anchorValidity.d.ts.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/anchorValidity.ts
|
|
5
5
|
var anchorValidity_default = ruleCreator.createRule(typescriptLanguage, {
|
|
6
6
|
about: {
|