@flint.fyi/jsx 0.6.0 → 0.6.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.mts CHANGED
@@ -1,312 +1,175 @@
1
1
  //#region src/plugin.d.ts
2
- declare const jsx: import("@flint.fyi/core").Plugin<import("@flint.fyi/core").RuleAbout<string>, "all" | "javascript" | "typescript", [import("@flint.fyi/core").Rule<{
2
+ export declare const jsx: import("@flint.fyi/core").Plugin<import("@flint.fyi/core").RuleAbout<string>, "all" | "javascript" | "typescript", [import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
3
3
  readonly description: "Disallow the use of the `accessKey` / `accesskey` attribute on JSX elements.";
4
4
  readonly id: "accessKeys";
5
5
  readonly presets: readonly ["logical", "logicalStrict"];
6
- } & {
7
- readonly pluginId: string;
8
- readonly url: string;
9
- }, "avoidAccessKey", undefined>, import("@flint.fyi/core").Rule<{
6
+ }, "avoidAccessKey", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
10
7
  readonly description: "Reports elements that require alt text but are missing it.";
11
8
  readonly id: "altTexts";
12
9
  readonly presets: readonly ["logical", "logicalStrict"];
13
- } & {
14
- readonly pluginId: string;
15
- readonly url: string;
16
- }, "missingAlt", undefined>, import("@flint.fyi/core").Rule<{
10
+ }, "missingAlt", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
17
11
  readonly description: "Reports anchor elements with ambiguous text that doesn't describe the link destination.";
18
12
  readonly id: "anchorAmbiguousText";
19
13
  readonly presets: readonly ["logical", "logicalStrict"];
20
- } & {
21
- readonly pluginId: string;
22
- readonly url: string;
23
- }, "ambiguousText", undefined>, import("@flint.fyi/core").Rule<{
14
+ }, "ambiguousText", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
24
15
  readonly description: "Reports anchor elements without accessible content.";
25
16
  readonly id: "anchorContent";
26
17
  readonly presets: readonly ["logical", "logicalStrict"];
27
- } & {
28
- readonly pluginId: string;
29
- readonly url: string;
30
- }, "missingContent", undefined>, import("@flint.fyi/core").Rule<{
18
+ }, "missingContent", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
31
19
  readonly description: "Reports invalid usage of anchor elements.";
32
20
  readonly id: "anchorValidity";
33
21
  readonly presets: readonly ["logical", "logicalStrict"];
34
- } & {
35
- readonly pluginId: string;
36
- readonly url: string;
37
- }, "invalidHref" | "missingHref" | "shouldBeButton", undefined>, import("@flint.fyi/core").Rule<{
22
+ }, "invalidHref" | "missingHref" | "shouldBeButton", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
38
23
  readonly description: "Reports elements with aria-activedescendant without tabIndex.";
39
24
  readonly id: "ariaActiveDescendantTabIndex";
40
25
  readonly presets: readonly ["logical", "logicalStrict"];
41
- } & {
42
- readonly pluginId: string;
43
- readonly url: string;
44
- }, "missingTabIndex", undefined>, import("@flint.fyi/core").Rule<{
26
+ }, "missingTabIndex", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
45
27
  readonly description: "Reports elements with aria-hidden='true' that are focusable.";
46
28
  readonly id: "ariaHiddenFocusables";
47
29
  readonly presets: readonly ["logical", "logicalStrict"];
48
- } & {
49
- readonly pluginId: string;
50
- readonly url: string;
51
- }, "ariaHiddenFocusable", undefined>, import("@flint.fyi/core").Rule<{
30
+ }, "ariaHiddenFocusable", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
52
31
  readonly description: "Reports invalid ARIA properties.";
53
32
  readonly id: "ariaProps";
54
33
  readonly presets: readonly ["logical", "logicalStrict"];
55
- } & {
56
- readonly pluginId: string;
57
- readonly url: string;
58
- }, "invalidAriaProp", undefined>, import("@flint.fyi/core").Rule<{
34
+ }, "invalidAriaProp", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
59
35
  readonly description: "Reports ARIA properties with invalid value types.";
60
36
  readonly id: "ariaPropTypes";
61
37
  readonly presets: readonly ["logical", "logicalStrict"];
62
- } & {
63
- readonly pluginId: string;
64
- readonly url: string;
65
- }, "invalidPropType", undefined>, import("@flint.fyi/core").Rule<{
38
+ }, "invalidPropType", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
66
39
  readonly description: "Reports invalid or abstract ARIA roles.";
67
40
  readonly id: "ariaRoleValidity";
68
41
  readonly presets: readonly ["logical", "logicalStrict"];
69
- } & {
70
- readonly pluginId: string;
71
- readonly url: string;
72
- }, "invalidRole", undefined>, import("@flint.fyi/core").Rule<{
42
+ }, "invalidRole", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
73
43
  readonly description: "Reports ARIA attributes on elements that don't support them.";
74
44
  readonly id: "ariaUnsupportedElements";
75
45
  readonly presets: readonly ["logical", "logicalStrict"];
76
- } & {
77
- readonly pluginId: string;
78
- readonly url: string;
79
- }, "unsupportedElement", undefined>, import("@flint.fyi/core").Rule<{
46
+ }, "unsupportedElement", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
80
47
  readonly description: "Ensure the autocomplete attribute is correct and suitable for the form field.";
81
48
  readonly id: "autocomplete";
82
49
  readonly presets: readonly ["logical", "logicalStrict"];
83
- } & {
84
- readonly pluginId: string;
85
- readonly url: string;
86
- }, "invalid", undefined>, import("@flint.fyi/core").Rule<{
50
+ }, "invalid", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
87
51
  readonly description: "Reports autoFocus props that are not set to false.";
88
52
  readonly id: "autoFocusProps";
89
53
  readonly presets: readonly ["logical", "logicalStrict"];
90
- } & {
91
- readonly pluginId: string;
92
- readonly url: string;
93
- }, "noAutoFocus", undefined>, import("@flint.fyi/core").Rule<{
54
+ }, "noAutoFocus", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
94
55
  readonly description: "Prefer shorthand boolean attributes over explicit {true} values in JSX.";
95
56
  readonly id: "booleanValues";
96
57
  readonly presets: readonly ["stylistic"];
97
- } & {
98
- readonly pluginId: string;
99
- readonly url: string;
100
- }, "preferShorthand", undefined>, import("@flint.fyi/core").Rule<{
58
+ }, "preferShorthand", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
101
59
  readonly description: "Disallow unnecessary JSX curly braces around literals and JSX elements.";
102
60
  readonly id: "bracedStatements";
103
61
  readonly presets: readonly ["stylistic"];
104
- } & {
105
- readonly pluginId: string;
106
- readonly url: string;
107
- }, "unnecessaryBraces", undefined>, import("@flint.fyi/core").Rule<{
62
+ }, "unnecessaryBraces", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
108
63
  readonly description: "Reports button elements without an explicit type attribute.";
109
64
  readonly id: "buttonTypes";
110
65
  readonly presets: readonly ["logical", "logicalStrict"];
111
- } & {
112
- readonly pluginId: string;
113
- readonly url: string;
114
- }, "invalidType" | "missingType", undefined>, import("@flint.fyi/core").Rule<{
66
+ }, "invalidType" | "missingType", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
115
67
  readonly description: "Reports usage of the children prop.";
116
68
  readonly id: "childrenProps";
117
69
  readonly presets: readonly ["stylistic"];
118
- } & {
119
- readonly pluginId: string;
120
- readonly url: string;
121
- }, "noChildrenProp", undefined>, import("@flint.fyi/core").Rule<{
70
+ }, "noChildrenProp", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
122
71
  readonly description: "Reports onClick without keyboard event handlers.";
123
72
  readonly id: "clickEventKeyEvents";
124
73
  readonly presets: readonly ["logical", "logicalStrict"];
125
- } & {
126
- readonly pluginId: string;
127
- readonly url: string;
128
- }, "missingKeyEvent", undefined>, import("@flint.fyi/core").Rule<{
74
+ }, "missingKeyEvent", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
129
75
  readonly description: "Reports JSX text nodes that contain comment syntax but are rendered as text.";
130
76
  readonly id: "commentTextNodes";
131
77
  readonly presets: readonly ["logical", "logicalStrict"];
132
- } & {
133
- readonly pluginId: string;
134
- readonly url: string;
135
- }, "commentAsText", undefined>, import("@flint.fyi/core").Rule<{
78
+ }, "commentAsText", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
136
79
  readonly description: "Reports distracting elements like <marquee> and <blink>.";
137
80
  readonly id: "distractingElements";
138
81
  readonly presets: readonly ["logical", "logicalStrict"];
139
- } & {
140
- readonly pluginId: string;
141
- readonly url: string;
142
- }, "noDistractingElement", undefined>, import("@flint.fyi/core").Rule<{
82
+ }, "noDistractingElement", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
143
83
  readonly description: "Reports void DOM elements that have children, which is invalid HTML.";
144
84
  readonly id: "elementChildrenValidity";
145
85
  readonly presets: readonly ["logical", "logicalStrict"];
146
- } & {
147
- readonly pluginId: string;
148
- readonly url: string;
149
- }, "voidElementWithChildren", undefined>, import("@flint.fyi/core").Rule<{
86
+ }, "voidElementWithChildren", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
150
87
  readonly description: "Reports heading elements without accessible content.";
151
88
  readonly id: "headingContents";
152
89
  readonly presets: readonly ["logical", "logicalStrict"];
153
- } & {
154
- readonly pluginId: string;
155
- readonly url: string;
156
- }, "emptyHeading", undefined>, import("@flint.fyi/core").Rule<{
90
+ }, "emptyHeading", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
157
91
  readonly description: "Reports <html> elements without a lang prop.";
158
92
  readonly id: "htmlLangs";
159
93
  readonly presets: readonly ["logical", "logicalStrict"];
160
- } & {
161
- readonly pluginId: string;
162
- readonly url: string;
163
- }, "missingLang", undefined>, import("@flint.fyi/core").Rule<{
94
+ }, "missingLang", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
164
95
  readonly description: "Reports <iframe> elements without a title prop.";
165
96
  readonly id: "iframeTitles";
166
97
  readonly presets: readonly ["logical", "logicalStrict"];
167
- } & {
168
- readonly pluginId: string;
169
- readonly url: string;
170
- }, "missingTitle", undefined>, import("@flint.fyi/core").Rule<{
98
+ }, "missingTitle", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
171
99
  readonly description: "Reports interactive elements with non-interactive ARIA roles.";
172
100
  readonly id: "interactiveElementRoles";
173
101
  readonly presets: readonly ["logical", "logicalStrict"];
174
- } & {
175
- readonly pluginId: string;
176
- readonly url: string;
177
- }, "invalidRole", undefined>, import("@flint.fyi/core").Rule<{
102
+ }, "invalidRole", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
178
103
  readonly description: "Reports interactive elements that are not focusable via keyboard.";
179
104
  readonly id: "interactiveElementsFocusable";
180
105
  readonly presets: readonly ["logical", "logicalStrict"];
181
- } & {
182
- readonly pluginId: string;
183
- readonly url: string;
184
- }, "notFocusable", undefined>, import("@flint.fyi/core").Rule<{
106
+ }, "notFocusable", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
185
107
  readonly description: "Reports <label> elements without an associated control element.";
186
108
  readonly id: "labelAssociatedControls";
187
109
  readonly presets: readonly ["logical", "logicalStrict"];
188
- } & {
189
- readonly pluginId: string;
190
- readonly url: string;
191
- }, "missingAssociatedControl", undefined>, import("@flint.fyi/core").Rule<{
110
+ }, "missingAssociatedControl", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
192
111
  readonly description: "Reports invalid lang attribute values.";
193
112
  readonly id: "langValidity";
194
113
  readonly presets: readonly ["logical", "logicalStrict"];
195
- } & {
196
- readonly pluginId: string;
197
- readonly url: string;
198
- }, "invalidLang", undefined>, import("@flint.fyi/core").Rule<{
114
+ }, "invalidLang", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
199
115
  readonly description: "Reports media elements without captions.";
200
116
  readonly id: "mediaCaptions";
201
117
  readonly presets: readonly ["logical", "logicalStrict"];
202
- } & {
203
- readonly pluginId: string;
204
- readonly url: string;
205
- }, "missingCaptions", undefined>, import("@flint.fyi/core").Rule<{
118
+ }, "missingCaptions", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
206
119
  readonly description: "Reports mouse events without corresponding keyboard events.";
207
120
  readonly id: "mouseEventKeyEvents";
208
121
  readonly presets: readonly ["logical", "logicalStrict"];
209
- } & {
210
- readonly pluginId: string;
211
- readonly url: string;
212
- }, "missingKeyEvent", undefined>, import("@flint.fyi/core").Rule<{
122
+ }, "missingKeyEvent", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
213
123
  readonly description: "Reports non-interactive elements with interactive event handlers.";
214
124
  readonly id: "nonInteractiveElementInteractions";
215
125
  readonly presets: readonly ["logical", "logicalStrict"];
216
- } & {
217
- readonly pluginId: string;
218
- readonly url: string;
219
- }, "invalidHandler", undefined>, import("@flint.fyi/core").Rule<{
126
+ }, "invalidHandler", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
220
127
  readonly description: "Reports non-interactive elements with interactive ARIA roles.";
221
128
  readonly id: "nonInteractiveElementRoles";
222
129
  readonly presets: readonly ["logical", "logicalStrict"];
223
- } & {
224
- readonly pluginId: string;
225
- readonly url: string;
226
- }, "invalidRole", undefined>, import("@flint.fyi/core").Rule<{
130
+ }, "invalidRole", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
227
131
  readonly description: "Reports non-interactive elements with positive or zero tabIndex values.";
228
132
  readonly id: "nonInteractiveElementTabIndexes";
229
133
  readonly presets: readonly ["logical", "logicalStrict"];
230
- } & {
231
- readonly pluginId: string;
232
- readonly url: string;
233
- }, "nonInteractiveTabIndex", undefined>, import("@flint.fyi/core").Rule<{
234
- readonly description: "Disallow duplicate props in JSX elements.";
235
- readonly id: "propDuplicates";
236
- readonly presets: readonly ["logical", "logicalStrict"];
237
- } & {
238
- readonly pluginId: string;
239
- readonly url: string;
240
- }, "duplicateProp", undefined>, import("@flint.fyi/core").Rule<{
134
+ }, "nonInteractiveTabIndex", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
241
135
  readonly description: "Reports redundant ARIA roles on elements with implicit roles.";
242
136
  readonly id: "roleRedundancies";
243
137
  readonly presets: readonly ["logical", "logicalStrict"];
244
- } & {
245
- readonly pluginId: string;
246
- readonly url: string;
247
- }, "redundantRole", undefined>, import("@flint.fyi/core").Rule<{
138
+ }, "redundantRole", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
248
139
  readonly description: "Reports ARIA roles missing their required ARIA properties.";
249
140
  readonly id: "roleRequiredAriaProps";
250
141
  readonly presets: readonly ["logical", "logicalStrict"];
251
- } & {
252
- readonly pluginId: string;
253
- readonly url: string;
254
- }, "missingRequiredProps", undefined>, import("@flint.fyi/core").Rule<{
142
+ }, "missingRequiredProps", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
255
143
  readonly description: "Reports ARIA properties that are not supported by an element's role.";
256
144
  readonly id: "roleSupportedAriaProps";
257
145
  readonly presets: readonly ["logical", "logicalStrict"];
258
- } & {
259
- readonly pluginId: string;
260
- readonly url: string;
261
- }, "unsupportedProp", undefined>, import("@flint.fyi/core").Rule<{
146
+ }, "unsupportedProp", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
262
147
  readonly description: "Reports ARIA roles that have semantic HTML element equivalents.";
263
148
  readonly id: "roleTags";
264
149
  readonly presets: readonly ["logical", "logicalStrict"];
265
- } & {
266
- readonly pluginId: string;
267
- readonly url: string;
268
- }, "preferSemanticElement", undefined>, import("@flint.fyi/core").Rule<{
150
+ }, "preferSemanticElement", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
269
151
  readonly description: "Reports scope props on non-th elements.";
270
152
  readonly id: "scopeProps";
271
153
  readonly presets: readonly ["logical", "logicalStrict"];
272
- } & {
273
- readonly pluginId: string;
274
- readonly url: string;
275
- }, "invalidScope", undefined>, import("@flint.fyi/core").Rule<{
154
+ }, "invalidScope", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
276
155
  readonly description: "Reports static elements with event handlers that lack ARIA roles.";
277
156
  readonly id: "staticElementInteractions";
278
157
  readonly presets: readonly ["logical", "logicalStrict"];
279
- } & {
280
- readonly pluginId: string;
281
- readonly url: string;
282
- }, "missingRole", undefined>, import("@flint.fyi/core").Rule<{
158
+ }, "missingRole", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
283
159
  readonly description: "Reports <svg> elements without a <title> child element.";
284
160
  readonly id: "svgTitles";
285
161
  readonly presets: readonly ["logical", "logicalStrict"];
286
- } & {
287
- readonly pluginId: string;
288
- readonly url: string;
289
- }, "missingTitle", undefined>, import("@flint.fyi/core").Rule<{
162
+ }, "missingTitle", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
290
163
  readonly description: "Reports positive tabIndex values.";
291
164
  readonly id: "tabIndexPositiveValues";
292
165
  readonly presets: readonly ["logical", "logicalStrict"];
293
- } & {
294
- readonly pluginId: string;
295
- readonly url: string;
296
- }, "noPositiveTabIndex", undefined>, import("@flint.fyi/core").Rule<{
166
+ }, "noPositiveTabIndex", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
297
167
  readonly description: "Disallow unescaped HTML entities in JSX text that may cause rendering issues.";
298
168
  readonly id: "unescapedEntities";
299
169
  readonly presets: readonly ["stylistic"];
300
- } & {
301
- readonly pluginId: string;
302
- readonly url: string;
303
- }, "unescapedEntity", undefined>, import("@flint.fyi/core").Rule<{
170
+ }, "unescapedEntity", undefined>, import("@flint.fyi/core").Rule<import("@flint.fyi/core").PluginRuleAbout<string> & {
304
171
  readonly description: "Disallow unnecessary JSX fragments that wrap a single child or have no children.";
305
172
  readonly id: "unnecessaryFragments";
306
173
  readonly presets: readonly ["stylistic"];
307
- } & {
308
- readonly pluginId: string;
309
- readonly url: string;
310
174
  }, "unnecessaryFragment", undefined>]>;
311
- //#endregion
312
- export { jsx };
175
+ //#endregion
package/dist/index.mjs CHANGED
@@ -1227,9 +1227,7 @@ var clickEventKeyEvents_default = ruleCreator.createRule(typescriptLanguage, {
1227
1227
  case "onKeyDown":
1228
1228
  case "onKeyPress":
1229
1229
  case "onKeyUp": return;
1230
- case "onClick":
1231
- onClickName = property.name;
1232
- break;
1230
+ case "onClick": onClickName = property.name;
1233
1231
  }
1234
1232
  if (onClickName) context.report({
1235
1233
  message: "missingKeyEvent",
@@ -2229,39 +2227,6 @@ var nonInteractiveElementTabIndexes_default = ruleCreator.createRule(typescriptL
2229
2227
  }
2230
2228
  });
2231
2229
  //#endregion
2232
- //#region src/rules/propDuplicates.ts
2233
- var propDuplicates_default = ruleCreator.createRule(typescriptLanguage, {
2234
- about: {
2235
- description: "Disallow duplicate props in JSX elements.",
2236
- id: "propDuplicates",
2237
- presets: ["logical", "logicalStrict"]
2238
- },
2239
- messages: { duplicateProp: {
2240
- primary: "Duplicate prop `{{ propName }}` found in JSX element. The last occurrence will override earlier ones.",
2241
- secondary: ["Having duplicate props can lead to unexpected behavior since only the last value is used.", "This makes the code harder to understand and maintain."],
2242
- suggestions: ["Remove the duplicate prop and keep only one definition."]
2243
- } },
2244
- setup(context) {
2245
- function checkElement(node, { sourceFile }) {
2246
- const seenProps = /* @__PURE__ */ new Set();
2247
- for (const property of node.attributes.properties) {
2248
- if (property.kind !== SyntaxKind.JsxAttribute || property.name.kind !== SyntaxKind.Identifier) continue;
2249
- const propName = property.name.text;
2250
- if (seenProps.has(propName)) context.report({
2251
- data: { propName },
2252
- message: "duplicateProp",
2253
- range: getTSNodeRange(property.name, sourceFile)
2254
- });
2255
- else seenProps.add(propName);
2256
- }
2257
- }
2258
- return { visitors: {
2259
- JsxOpeningElement: checkElement,
2260
- JsxSelfClosingElement: checkElement
2261
- } };
2262
- }
2263
- });
2264
- //#endregion
2265
2230
  //#region src/rules/roleRedundancies.ts
2266
2231
  const implicitRoles$1 = {
2267
2232
  a: "link",
@@ -3218,7 +3183,6 @@ const jsx = createPlugin({
3218
3183
  nonInteractiveElementInteractions_default,
3219
3184
  nonInteractiveElementRoles_default,
3220
3185
  nonInteractiveElementTabIndexes_default,
3221
- propDuplicates_default,
3222
3186
  roleRedundancies_default,
3223
3187
  roleRequiredAriaProps_default,
3224
3188
  roleSupportedAriaProps_default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flint.fyi/jsx",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "[Experimental] A Flint plugin for JSX code.",
5
5
  "homepage": "https://flint.fyi/rules/jsx",
6
6
  "repository": {
@@ -22,18 +22,18 @@
22
22
  "dist/"
23
23
  ],
24
24
  "dependencies": {
25
+ "@flint.fyi/core": "^0.27.0",
26
+ "@flint.fyi/typescript-language": "^0.21.0",
27
+ "@flint.fyi/utils": "^0.16.0",
25
28
  "language-tags": "^2.1.0",
26
- "typescript": "^6.0.0",
27
- "@flint.fyi/core": "^0.25.0",
28
- "@flint.fyi/typescript-language": "^0.20.0",
29
- "@flint.fyi/utils": "^0.16.0"
29
+ "typescript": "^6.0.3"
30
30
  },
31
31
  "devDependencies": {
32
+ "@flint.fyi/build": "^0.1.0",
33
+ "@flint.fyi/rule-tester": "^0.20.0",
32
34
  "@types/language-tags": "1.0.4",
33
- "tsdown": "0.22.3",
34
- "vitest": "4.1.0",
35
- "@flint.fyi/rule-tester": "^0.18.0",
36
- "@flint.fyi/build": "^0.1.0"
35
+ "tsdown": "0.23.0",
36
+ "vitest": "5.0.1"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=26.1.0"