eslint-plugin-react-dom 1.24.0-next.1 → 1.24.0-next.12
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.js +170 -112
- package/dist/index.mjs +169 -110
- package/package.json +11 -12
package/dist/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var eff = require('@eslint-react/eff');
|
|
5
|
-
var VAR = require('@eslint-react/var');
|
|
6
|
-
var tsPattern = require('ts-pattern');
|
|
3
|
+
var JSX = require('@eslint-react/jsx');
|
|
7
4
|
var shared = require('@eslint-react/shared');
|
|
8
5
|
var types = require('@typescript-eslint/types');
|
|
9
|
-
var core = require('@eslint-react/core');
|
|
10
6
|
var AST = require('@eslint-react/ast');
|
|
11
7
|
var compareVersions = require('compare-versions');
|
|
8
|
+
var eff = require('@eslint-react/eff');
|
|
12
9
|
|
|
13
10
|
function _interopNamespace(e) {
|
|
14
11
|
if (e && e.__esModule) return e;
|
|
@@ -28,31 +25,40 @@ function _interopNamespace(e) {
|
|
|
28
25
|
return Object.freeze(n);
|
|
29
26
|
}
|
|
30
27
|
|
|
31
|
-
var
|
|
32
|
-
var VAR__namespace = /*#__PURE__*/_interopNamespace(VAR);
|
|
28
|
+
var JSX__namespace = /*#__PURE__*/_interopNamespace(JSX);
|
|
33
29
|
var AST__namespace = /*#__PURE__*/_interopNamespace(AST);
|
|
34
30
|
|
|
35
31
|
// package.json
|
|
36
32
|
var name = "eslint-plugin-react-dom";
|
|
37
|
-
var version = "1.24.0-next.
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
var version = "1.24.0-next.12";
|
|
34
|
+
var createRule = shared.createRuleForPlugin("dom");
|
|
35
|
+
|
|
36
|
+
// src/utils/find-custom-component.ts
|
|
37
|
+
function findCustomComponent(name2, components) {
|
|
38
|
+
return components.findLast((c) => c.name === name2 || c.re.test(name2));
|
|
39
|
+
}
|
|
40
|
+
function findCustomComponentProp(name2, props) {
|
|
41
|
+
return props.findLast((a) => a.as === name2);
|
|
40
42
|
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
function getElementNameOnJsxAndDom(node, context, polymorphicPropName, additionalComponents = []) {
|
|
44
|
+
const name2 = JSX__namespace.getElementName(node);
|
|
45
|
+
if (name2 === name2.toLowerCase()) return [name2, name2];
|
|
46
|
+
const component = additionalComponents.findLast((c) => c.name === name2 || c.re.test(name2));
|
|
47
|
+
if (component != null) return [name2, component.as];
|
|
48
|
+
if (polymorphicPropName == null) return [name2, name2];
|
|
49
|
+
const initialScope = context.sourceCode.getScope(node);
|
|
50
|
+
const attributeNode = JSX__namespace.getAttribute(
|
|
51
|
+
polymorphicPropName,
|
|
52
|
+
initialScope,
|
|
53
|
+
node.openingElement.attributes
|
|
48
54
|
);
|
|
49
|
-
if (
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
if (attributeNode == null) return [name2, name2];
|
|
56
|
+
const polymorphicPropValue = JSX__namespace.getAttributeValue(polymorphicPropName, attributeNode, initialScope);
|
|
57
|
+
if (polymorphicPropValue.kind === "some" && typeof polymorphicPropValue.value === "string") {
|
|
58
|
+
return [name2, polymorphicPropValue.value];
|
|
59
|
+
}
|
|
60
|
+
return [name2, name2];
|
|
54
61
|
}
|
|
55
|
-
var createRule = shared.createRuleForPlugin("dom");
|
|
56
62
|
|
|
57
63
|
// src/rules/no-dangerously-set-innerhtml.ts
|
|
58
64
|
var RULE_NAME = "no-dangerously-set-innerhtml";
|
|
@@ -73,14 +79,19 @@ var no_dangerously_set_innerhtml_default = createRule({
|
|
|
73
79
|
},
|
|
74
80
|
name: RULE_NAME,
|
|
75
81
|
create(context) {
|
|
82
|
+
if (!context.sourceCode.text.includes("dangerouslySetInnerHTML")) return {};
|
|
76
83
|
return {
|
|
77
84
|
JSXElement(node) {
|
|
78
85
|
const attributes = node.openingElement.attributes;
|
|
79
|
-
const
|
|
80
|
-
|
|
86
|
+
const attribute = JSX__namespace.getAttribute(
|
|
87
|
+
"dangerouslySetInnerHTML",
|
|
88
|
+
context.sourceCode.getScope(node),
|
|
89
|
+
attributes
|
|
90
|
+
);
|
|
91
|
+
if (attribute == null) return;
|
|
81
92
|
context.report({
|
|
82
93
|
messageId: "noDangerouslySetInnerhtml",
|
|
83
|
-
node:
|
|
94
|
+
node: attribute
|
|
84
95
|
});
|
|
85
96
|
}
|
|
86
97
|
};
|
|
@@ -105,13 +116,13 @@ var no_dangerously_set_innerhtml_with_children_default = createRule({
|
|
|
105
116
|
},
|
|
106
117
|
name: RULE_NAME2,
|
|
107
118
|
create(context) {
|
|
119
|
+
if (!context.sourceCode.text.includes("dangerouslySetInnerHTML")) return {};
|
|
108
120
|
return {
|
|
109
121
|
JSXElement(node) {
|
|
110
122
|
const attributes = node.openingElement.attributes;
|
|
111
123
|
const initialScope = context.sourceCode.getScope(node);
|
|
112
|
-
const hasChildren = hasChildrenWithin(node) ||
|
|
113
|
-
|
|
114
|
-
if (hasChildren && hasDangerouslySetInnerHTML) {
|
|
124
|
+
const hasChildren = hasChildrenWithin(node) || JSX__namespace.hasAttribute("children", initialScope, attributes);
|
|
125
|
+
if (hasChildren && JSX__namespace.hasAttribute("dangerouslySetInnerHTML", initialScope, attributes)) {
|
|
115
126
|
context.report({
|
|
116
127
|
messageId: "noDangerouslySetInnerhtmlWithChildren",
|
|
117
128
|
node
|
|
@@ -123,7 +134,7 @@ var no_dangerously_set_innerhtml_with_children_default = createRule({
|
|
|
123
134
|
defaultOptions: []
|
|
124
135
|
});
|
|
125
136
|
function hasChildrenWithin(node) {
|
|
126
|
-
return node.children.length > 0 && node.children[0] != null && !
|
|
137
|
+
return node.children.length > 0 && node.children[0] != null && !JSX__namespace.isLineBreak(node.children[0]);
|
|
127
138
|
}
|
|
128
139
|
var RULE_NAME3 = "no-find-dom-node";
|
|
129
140
|
var RULE_FEATURES3 = [
|
|
@@ -143,6 +154,7 @@ var no_find_dom_node_default = createRule({
|
|
|
143
154
|
},
|
|
144
155
|
name: RULE_NAME3,
|
|
145
156
|
create(context) {
|
|
157
|
+
if (!context.sourceCode.text.includes("findDOMNode")) return {};
|
|
146
158
|
return {
|
|
147
159
|
CallExpression(node) {
|
|
148
160
|
const { callee } = node;
|
|
@@ -182,26 +194,38 @@ var no_missing_button_type_default = createRule({
|
|
|
182
194
|
name: RULE_NAME4,
|
|
183
195
|
create(context) {
|
|
184
196
|
const settings = shared.getSettingsFromContext(context);
|
|
197
|
+
const polymorphicPropName = settings.polymorphicPropName;
|
|
185
198
|
const additionalComponents = settings.additionalComponents.filter((c) => c.as === "button");
|
|
186
199
|
return {
|
|
187
200
|
JSXElement(node) {
|
|
188
|
-
const [
|
|
189
|
-
node
|
|
201
|
+
const [elementNameOnJsx, elementNameOnDom] = getElementNameOnJsxAndDom(
|
|
202
|
+
node,
|
|
190
203
|
context,
|
|
191
|
-
|
|
192
|
-
|
|
204
|
+
polymorphicPropName,
|
|
205
|
+
additionalComponents
|
|
193
206
|
);
|
|
194
|
-
if (
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if (
|
|
207
|
+
if (elementNameOnDom !== "button") return;
|
|
208
|
+
const elementScope = context.sourceCode.getScope(node);
|
|
209
|
+
const customComponent = findCustomComponent(elementNameOnJsx, additionalComponents);
|
|
210
|
+
const customComponentProp = findCustomComponentProp("type", customComponent?.attributes ?? []);
|
|
211
|
+
const propNameOnJsx = customComponentProp?.name ?? "type";
|
|
212
|
+
const attributeNode = JSX__namespace.getAttribute(
|
|
213
|
+
propNameOnJsx,
|
|
214
|
+
elementScope,
|
|
215
|
+
node.openingElement.attributes
|
|
216
|
+
);
|
|
217
|
+
if (attributeNode != null) {
|
|
218
|
+
const attributeScope = context.sourceCode.getScope(attributeNode);
|
|
219
|
+
const attributeValue = JSX__namespace.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
|
|
220
|
+
if (attributeValue.kind === "some" && typeof attributeValue.value !== "string") {
|
|
221
|
+
context.report({
|
|
222
|
+
messageId: "noMissingButtonType",
|
|
223
|
+
node: attributeNode
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (typeof customComponentProp?.defaultValue !== "string") {
|
|
205
229
|
context.report({
|
|
206
230
|
messageId: "noMissingButtonType",
|
|
207
231
|
node
|
|
@@ -234,6 +258,9 @@ var validTypes = [
|
|
|
234
258
|
"allow-top-navigation-by-user-activation",
|
|
235
259
|
"allow-top-navigation-to-custom-protocols"
|
|
236
260
|
];
|
|
261
|
+
function hasValidSandBox(value) {
|
|
262
|
+
return typeof value === "string" && value.split(" ").every((value2) => validTypes.some((valid) => valid === value2));
|
|
263
|
+
}
|
|
237
264
|
var no_missing_iframe_sandbox_default = createRule({
|
|
238
265
|
meta: {
|
|
239
266
|
type: "problem",
|
|
@@ -249,37 +276,40 @@ var no_missing_iframe_sandbox_default = createRule({
|
|
|
249
276
|
name: RULE_NAME5,
|
|
250
277
|
create(context) {
|
|
251
278
|
const settings = shared.getSettingsFromContext(context);
|
|
279
|
+
const polymorphicPropName = settings.polymorphicPropName;
|
|
252
280
|
const additionalComponents = settings.additionalComponents.filter((c) => c.as === "iframe");
|
|
253
281
|
return {
|
|
254
282
|
JSXElement(node) {
|
|
255
|
-
const [
|
|
256
|
-
node
|
|
283
|
+
const [elementNameOnJsx, elementNameOnDom] = getElementNameOnJsxAndDom(
|
|
284
|
+
node,
|
|
257
285
|
context,
|
|
258
|
-
|
|
259
|
-
|
|
286
|
+
polymorphicPropName,
|
|
287
|
+
additionalComponents
|
|
260
288
|
);
|
|
261
|
-
if (
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
if (
|
|
289
|
+
if (elementNameOnDom !== "iframe") return;
|
|
290
|
+
const elementScope = context.sourceCode.getScope(node);
|
|
291
|
+
const customComponent = findCustomComponent(elementNameOnJsx, additionalComponents);
|
|
292
|
+
const customComponentProp = findCustomComponentProp("sandbox", customComponent?.attributes ?? []);
|
|
293
|
+
const propNameOnJsx = customComponentProp?.name ?? "sandbox";
|
|
294
|
+
const attributeNode = JSX__namespace.getAttribute(
|
|
295
|
+
propNameOnJsx,
|
|
296
|
+
elementScope,
|
|
297
|
+
node.openingElement.attributes
|
|
298
|
+
);
|
|
299
|
+
if (attributeNode != null) {
|
|
300
|
+
const attributeScope = context.sourceCode.getScope(attributeNode);
|
|
301
|
+
const attributeValue = JSX__namespace.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
|
|
302
|
+
if (attributeValue.kind === "some" && hasValidSandBox(attributeValue.value)) return;
|
|
272
303
|
context.report({
|
|
273
304
|
messageId: "noMissingIframeSandbox",
|
|
274
|
-
node:
|
|
305
|
+
node: attributeNode
|
|
275
306
|
});
|
|
276
307
|
return;
|
|
277
308
|
}
|
|
278
|
-
|
|
279
|
-
if (!values.every((value) => validTypes.some((validType) => validType === value))) {
|
|
309
|
+
if (!hasValidSandBox(customComponentProp?.defaultValue)) {
|
|
280
310
|
context.report({
|
|
281
311
|
messageId: "noMissingIframeSandbox",
|
|
282
|
-
node
|
|
312
|
+
node
|
|
283
313
|
});
|
|
284
314
|
}
|
|
285
315
|
}
|
|
@@ -306,14 +336,14 @@ var no_namespace_default = createRule({
|
|
|
306
336
|
name: RULE_NAME6,
|
|
307
337
|
create(context) {
|
|
308
338
|
return {
|
|
309
|
-
|
|
310
|
-
const name2 =
|
|
339
|
+
JSXElement(node) {
|
|
340
|
+
const name2 = JSX__namespace.getElementName(node);
|
|
311
341
|
if (typeof name2 !== "string" || !name2.includes(":")) {
|
|
312
342
|
return;
|
|
313
343
|
}
|
|
314
344
|
context.report({
|
|
315
345
|
messageId: "noNamespace",
|
|
316
|
-
node,
|
|
346
|
+
node: node.openingElement.name,
|
|
317
347
|
data: {
|
|
318
348
|
name: name2
|
|
319
349
|
}
|
|
@@ -399,11 +429,10 @@ var no_script_url_default = createRule({
|
|
|
399
429
|
if (node.name.type !== types.AST_NODE_TYPES.JSXIdentifier || node.value == null) {
|
|
400
430
|
return;
|
|
401
431
|
}
|
|
402
|
-
const
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
if (
|
|
406
|
-
if (shared.RE_JAVASCRIPT_PROTOCOL.test(propValueResolved)) {
|
|
432
|
+
const attributeScope = context.sourceCode.getScope(node);
|
|
433
|
+
const attributeValue = JSX__namespace.getAttributeValue(JSX__namespace.toString(node.name), node, attributeScope);
|
|
434
|
+
if (attributeValue.kind === "none" || typeof attributeValue.value !== "string") return;
|
|
435
|
+
if (shared.RE_JAVASCRIPT_PROTOCOL.test(attributeValue.value)) {
|
|
407
436
|
context.report({
|
|
408
437
|
messageId: "noScriptUrl",
|
|
409
438
|
node: node.value
|
|
@@ -1475,9 +1504,15 @@ var RULE_NAME10 = "no-unsafe-iframe-sandbox";
|
|
|
1475
1504
|
var RULE_FEATURES9 = [
|
|
1476
1505
|
"CHK"
|
|
1477
1506
|
];
|
|
1478
|
-
var
|
|
1507
|
+
var unsafeSandboxValues = [
|
|
1479
1508
|
["allow-scripts", "allow-same-origin"]
|
|
1480
1509
|
];
|
|
1510
|
+
function hasSafeSandbox(value) {
|
|
1511
|
+
if (typeof value !== "string") return false;
|
|
1512
|
+
return !unsafeSandboxValues.some((values) => {
|
|
1513
|
+
return values.every((v) => value.includes(v));
|
|
1514
|
+
});
|
|
1515
|
+
}
|
|
1481
1516
|
var no_unsafe_iframe_sandbox_default = createRule({
|
|
1482
1517
|
meta: {
|
|
1483
1518
|
type: "problem",
|
|
@@ -1493,31 +1528,42 @@ var no_unsafe_iframe_sandbox_default = createRule({
|
|
|
1493
1528
|
name: RULE_NAME10,
|
|
1494
1529
|
create(context) {
|
|
1495
1530
|
const settings = shared.getSettingsFromContext(context);
|
|
1531
|
+
const polymorphicPropName = settings.polymorphicPropName;
|
|
1496
1532
|
const additionalComponents = settings.additionalComponents.filter((c) => c.as === "iframe");
|
|
1497
1533
|
return {
|
|
1498
1534
|
JSXElement(node) {
|
|
1499
|
-
const [
|
|
1500
|
-
node
|
|
1535
|
+
const [elementNameOnJsx, elementNameOnDom] = getElementNameOnJsxAndDom(
|
|
1536
|
+
node,
|
|
1501
1537
|
context,
|
|
1502
|
-
|
|
1503
|
-
|
|
1538
|
+
polymorphicPropName,
|
|
1539
|
+
additionalComponents
|
|
1504
1540
|
);
|
|
1505
|
-
if (
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
if (
|
|
1516
|
-
|
|
1517
|
-
|
|
1541
|
+
if (elementNameOnDom !== "iframe") return;
|
|
1542
|
+
const elementScope = context.sourceCode.getScope(node);
|
|
1543
|
+
const customComponent = findCustomComponent(elementNameOnJsx, additionalComponents);
|
|
1544
|
+
const customComponentProp = findCustomComponentProp("sandbox", customComponent?.attributes ?? []);
|
|
1545
|
+
const propNameOnJsx = customComponentProp?.name ?? "sandbox";
|
|
1546
|
+
const attributeNode = JSX__namespace.getAttribute(
|
|
1547
|
+
propNameOnJsx,
|
|
1548
|
+
elementScope,
|
|
1549
|
+
node.openingElement.attributes
|
|
1550
|
+
);
|
|
1551
|
+
if (attributeNode != null) {
|
|
1552
|
+
const attributeScope = context.sourceCode.getScope(attributeNode);
|
|
1553
|
+
const attributeValue = JSX__namespace.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
|
|
1554
|
+
if (attributeValue.kind === "some" && !hasSafeSandbox(attributeValue.value)) {
|
|
1555
|
+
context.report({
|
|
1556
|
+
messageId: "noUnsafeIframeSandbox",
|
|
1557
|
+
node: attributeNode
|
|
1558
|
+
});
|
|
1559
|
+
return;
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
if (customComponentProp?.defaultValue == null) return;
|
|
1563
|
+
if (!hasSafeSandbox(customComponentProp.defaultValue)) {
|
|
1518
1564
|
context.report({
|
|
1519
1565
|
messageId: "noUnsafeIframeSandbox",
|
|
1520
|
-
node
|
|
1566
|
+
node
|
|
1521
1567
|
});
|
|
1522
1568
|
}
|
|
1523
1569
|
}
|
|
@@ -1552,36 +1598,48 @@ var no_unsafe_target_blank_default = createRule({
|
|
|
1552
1598
|
name: RULE_NAME11,
|
|
1553
1599
|
create(context) {
|
|
1554
1600
|
const settings = shared.getSettingsFromContext(context);
|
|
1601
|
+
const polymorphicPropName = settings.polymorphicPropName;
|
|
1555
1602
|
const additionalComponents = settings.additionalComponents.filter((c) => c.as === "a");
|
|
1556
1603
|
return {
|
|
1557
1604
|
JSXElement(node) {
|
|
1558
|
-
const [
|
|
1559
|
-
node
|
|
1605
|
+
const [elementNameOnJsx, elementNameOnDom] = getElementNameOnJsxAndDom(
|
|
1606
|
+
node,
|
|
1560
1607
|
context,
|
|
1561
|
-
|
|
1562
|
-
|
|
1608
|
+
polymorphicPropName,
|
|
1609
|
+
additionalComponents
|
|
1563
1610
|
);
|
|
1564
|
-
if (
|
|
1565
|
-
const
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1611
|
+
if (elementNameOnDom !== "a") return;
|
|
1612
|
+
const elementScope = context.sourceCode.getScope(node);
|
|
1613
|
+
const customComponent = findCustomComponent(elementNameOnJsx, additionalComponents);
|
|
1614
|
+
const getAttributeStringValue = (name2) => {
|
|
1615
|
+
const customComponentProp = findCustomComponentProp(name2, customComponent?.attributes ?? []);
|
|
1616
|
+
const propNameOnJsx = customComponentProp?.name ?? name2;
|
|
1617
|
+
const attributeNode = JSX__namespace.getAttribute(
|
|
1618
|
+
propNameOnJsx,
|
|
1619
|
+
elementScope,
|
|
1620
|
+
node.openingElement.attributes
|
|
1571
1621
|
);
|
|
1622
|
+
if (attributeNode == null) return customComponentProp?.defaultValue;
|
|
1623
|
+
const attributeScope = context.sourceCode.getScope(attributeNode);
|
|
1624
|
+
const attributeValue = JSX__namespace.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
|
|
1625
|
+
if (attributeValue.kind === "some" && typeof attributeValue.value === "string") {
|
|
1626
|
+
return attributeValue.value;
|
|
1627
|
+
}
|
|
1628
|
+
return eff._;
|
|
1572
1629
|
};
|
|
1573
|
-
if (
|
|
1630
|
+
if (getAttributeStringValue("target") !== "_blank") {
|
|
1574
1631
|
return;
|
|
1575
1632
|
}
|
|
1576
|
-
if (!isExternalLinkLike(
|
|
1633
|
+
if (!isExternalLinkLike(getAttributeStringValue("href"))) {
|
|
1577
1634
|
return;
|
|
1578
1635
|
}
|
|
1579
|
-
if (
|
|
1580
|
-
|
|
1581
|
-
messageId: "noUnsafeTargetBlank",
|
|
1582
|
-
node
|
|
1583
|
-
});
|
|
1636
|
+
if (isSafeRel(getAttributeStringValue("rel"))) {
|
|
1637
|
+
return;
|
|
1584
1638
|
}
|
|
1639
|
+
context.report({
|
|
1640
|
+
messageId: "noUnsafeTargetBlank",
|
|
1641
|
+
node
|
|
1642
|
+
});
|
|
1585
1643
|
}
|
|
1586
1644
|
};
|
|
1587
1645
|
},
|
|
@@ -1625,7 +1683,7 @@ var no_void_elements_with_children_default = createRule({
|
|
|
1625
1683
|
create(context) {
|
|
1626
1684
|
return {
|
|
1627
1685
|
JSXElement(node) {
|
|
1628
|
-
const elementName =
|
|
1686
|
+
const elementName = JSX__namespace.getElementName(node);
|
|
1629
1687
|
if (elementName.length === 0 || !voidElements.has(elementName)) {
|
|
1630
1688
|
return;
|
|
1631
1689
|
}
|
|
@@ -1640,8 +1698,8 @@ var no_void_elements_with_children_default = createRule({
|
|
|
1640
1698
|
}
|
|
1641
1699
|
const { attributes } = node.openingElement;
|
|
1642
1700
|
const initialScope = context.sourceCode.getScope(node);
|
|
1643
|
-
const
|
|
1644
|
-
if (
|
|
1701
|
+
const hasAttribute3 = (name2) => JSX__namespace.hasAttribute(name2, initialScope, attributes);
|
|
1702
|
+
if (hasAttribute3("children") || hasAttribute3("dangerouslySetInnerHTML")) {
|
|
1645
1703
|
context.report({
|
|
1646
1704
|
messageId: "noVoidElementsWithChildren",
|
|
1647
1705
|
node,
|
package/dist/index.mjs
CHANGED
|
@@ -1,34 +1,41 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { identity, _ } from '@eslint-react/eff';
|
|
3
|
-
import * as VAR from '@eslint-react/var';
|
|
4
|
-
import { match, P } from 'ts-pattern';
|
|
1
|
+
import * as JSX from '@eslint-react/jsx';
|
|
5
2
|
import { createRuleForPlugin, getSettingsFromContext, RE_JAVASCRIPT_PROTOCOL } from '@eslint-react/shared';
|
|
6
3
|
import { AST_NODE_TYPES } from '@typescript-eslint/types';
|
|
7
|
-
import { getElementNameAndRepresentName } from '@eslint-react/core';
|
|
8
4
|
import * as AST from '@eslint-react/ast';
|
|
9
5
|
import { compare } from 'compare-versions';
|
|
6
|
+
import { _ } from '@eslint-react/eff';
|
|
10
7
|
|
|
11
8
|
// package.json
|
|
12
9
|
var name = "eslint-plugin-react-dom";
|
|
13
|
-
var version = "1.24.0-next.
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
var version = "1.24.0-next.12";
|
|
11
|
+
var createRule = createRuleForPlugin("dom");
|
|
12
|
+
|
|
13
|
+
// src/utils/find-custom-component.ts
|
|
14
|
+
function findCustomComponent(name2, components) {
|
|
15
|
+
return components.findLast((c) => c.name === name2 || c.re.test(name2));
|
|
16
|
+
}
|
|
17
|
+
function findCustomComponentProp(name2, props) {
|
|
18
|
+
return props.findLast((a) => a.as === name2);
|
|
16
19
|
}
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
function getElementNameOnJsxAndDom(node, context, polymorphicPropName, additionalComponents = []) {
|
|
21
|
+
const name2 = JSX.getElementName(node);
|
|
22
|
+
if (name2 === name2.toLowerCase()) return [name2, name2];
|
|
23
|
+
const component = additionalComponents.findLast((c) => c.name === name2 || c.re.test(name2));
|
|
24
|
+
if (component != null) return [name2, component.as];
|
|
25
|
+
if (polymorphicPropName == null) return [name2, name2];
|
|
26
|
+
const initialScope = context.sourceCode.getScope(node);
|
|
27
|
+
const attributeNode = JSX.getAttribute(
|
|
28
|
+
polymorphicPropName,
|
|
29
|
+
initialScope,
|
|
30
|
+
node.openingElement.attributes
|
|
24
31
|
);
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
if (attributeNode == null) return [name2, name2];
|
|
33
|
+
const polymorphicPropValue = JSX.getAttributeValue(polymorphicPropName, attributeNode, initialScope);
|
|
34
|
+
if (polymorphicPropValue.kind === "some" && typeof polymorphicPropValue.value === "string") {
|
|
35
|
+
return [name2, polymorphicPropValue.value];
|
|
36
|
+
}
|
|
37
|
+
return [name2, name2];
|
|
30
38
|
}
|
|
31
|
-
var createRule = createRuleForPlugin("dom");
|
|
32
39
|
|
|
33
40
|
// src/rules/no-dangerously-set-innerhtml.ts
|
|
34
41
|
var RULE_NAME = "no-dangerously-set-innerhtml";
|
|
@@ -49,14 +56,19 @@ var no_dangerously_set_innerhtml_default = createRule({
|
|
|
49
56
|
},
|
|
50
57
|
name: RULE_NAME,
|
|
51
58
|
create(context) {
|
|
59
|
+
if (!context.sourceCode.text.includes("dangerouslySetInnerHTML")) return {};
|
|
52
60
|
return {
|
|
53
61
|
JSXElement(node) {
|
|
54
62
|
const attributes = node.openingElement.attributes;
|
|
55
|
-
const
|
|
56
|
-
|
|
63
|
+
const attribute = JSX.getAttribute(
|
|
64
|
+
"dangerouslySetInnerHTML",
|
|
65
|
+
context.sourceCode.getScope(node),
|
|
66
|
+
attributes
|
|
67
|
+
);
|
|
68
|
+
if (attribute == null) return;
|
|
57
69
|
context.report({
|
|
58
70
|
messageId: "noDangerouslySetInnerhtml",
|
|
59
|
-
node:
|
|
71
|
+
node: attribute
|
|
60
72
|
});
|
|
61
73
|
}
|
|
62
74
|
};
|
|
@@ -81,13 +93,13 @@ var no_dangerously_set_innerhtml_with_children_default = createRule({
|
|
|
81
93
|
},
|
|
82
94
|
name: RULE_NAME2,
|
|
83
95
|
create(context) {
|
|
96
|
+
if (!context.sourceCode.text.includes("dangerouslySetInnerHTML")) return {};
|
|
84
97
|
return {
|
|
85
98
|
JSXElement(node) {
|
|
86
99
|
const attributes = node.openingElement.attributes;
|
|
87
100
|
const initialScope = context.sourceCode.getScope(node);
|
|
88
|
-
const hasChildren = hasChildrenWithin(node) ||
|
|
89
|
-
|
|
90
|
-
if (hasChildren && hasDangerouslySetInnerHTML) {
|
|
101
|
+
const hasChildren = hasChildrenWithin(node) || JSX.hasAttribute("children", initialScope, attributes);
|
|
102
|
+
if (hasChildren && JSX.hasAttribute("dangerouslySetInnerHTML", initialScope, attributes)) {
|
|
91
103
|
context.report({
|
|
92
104
|
messageId: "noDangerouslySetInnerhtmlWithChildren",
|
|
93
105
|
node
|
|
@@ -99,7 +111,7 @@ var no_dangerously_set_innerhtml_with_children_default = createRule({
|
|
|
99
111
|
defaultOptions: []
|
|
100
112
|
});
|
|
101
113
|
function hasChildrenWithin(node) {
|
|
102
|
-
return node.children.length > 0 && node.children[0] != null && !
|
|
114
|
+
return node.children.length > 0 && node.children[0] != null && !JSX.isLineBreak(node.children[0]);
|
|
103
115
|
}
|
|
104
116
|
var RULE_NAME3 = "no-find-dom-node";
|
|
105
117
|
var RULE_FEATURES3 = [
|
|
@@ -119,6 +131,7 @@ var no_find_dom_node_default = createRule({
|
|
|
119
131
|
},
|
|
120
132
|
name: RULE_NAME3,
|
|
121
133
|
create(context) {
|
|
134
|
+
if (!context.sourceCode.text.includes("findDOMNode")) return {};
|
|
122
135
|
return {
|
|
123
136
|
CallExpression(node) {
|
|
124
137
|
const { callee } = node;
|
|
@@ -158,26 +171,38 @@ var no_missing_button_type_default = createRule({
|
|
|
158
171
|
name: RULE_NAME4,
|
|
159
172
|
create(context) {
|
|
160
173
|
const settings = getSettingsFromContext(context);
|
|
174
|
+
const polymorphicPropName = settings.polymorphicPropName;
|
|
161
175
|
const additionalComponents = settings.additionalComponents.filter((c) => c.as === "button");
|
|
162
176
|
return {
|
|
163
177
|
JSXElement(node) {
|
|
164
|
-
const [
|
|
165
|
-
node
|
|
178
|
+
const [elementNameOnJsx, elementNameOnDom] = getElementNameOnJsxAndDom(
|
|
179
|
+
node,
|
|
166
180
|
context,
|
|
167
|
-
|
|
168
|
-
|
|
181
|
+
polymorphicPropName,
|
|
182
|
+
additionalComponents
|
|
169
183
|
);
|
|
170
|
-
if (
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
if (
|
|
184
|
+
if (elementNameOnDom !== "button") return;
|
|
185
|
+
const elementScope = context.sourceCode.getScope(node);
|
|
186
|
+
const customComponent = findCustomComponent(elementNameOnJsx, additionalComponents);
|
|
187
|
+
const customComponentProp = findCustomComponentProp("type", customComponent?.attributes ?? []);
|
|
188
|
+
const propNameOnJsx = customComponentProp?.name ?? "type";
|
|
189
|
+
const attributeNode = JSX.getAttribute(
|
|
190
|
+
propNameOnJsx,
|
|
191
|
+
elementScope,
|
|
192
|
+
node.openingElement.attributes
|
|
193
|
+
);
|
|
194
|
+
if (attributeNode != null) {
|
|
195
|
+
const attributeScope = context.sourceCode.getScope(attributeNode);
|
|
196
|
+
const attributeValue = JSX.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
|
|
197
|
+
if (attributeValue.kind === "some" && typeof attributeValue.value !== "string") {
|
|
198
|
+
context.report({
|
|
199
|
+
messageId: "noMissingButtonType",
|
|
200
|
+
node: attributeNode
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
if (typeof customComponentProp?.defaultValue !== "string") {
|
|
181
206
|
context.report({
|
|
182
207
|
messageId: "noMissingButtonType",
|
|
183
208
|
node
|
|
@@ -210,6 +235,9 @@ var validTypes = [
|
|
|
210
235
|
"allow-top-navigation-by-user-activation",
|
|
211
236
|
"allow-top-navigation-to-custom-protocols"
|
|
212
237
|
];
|
|
238
|
+
function hasValidSandBox(value) {
|
|
239
|
+
return typeof value === "string" && value.split(" ").every((value2) => validTypes.some((valid) => valid === value2));
|
|
240
|
+
}
|
|
213
241
|
var no_missing_iframe_sandbox_default = createRule({
|
|
214
242
|
meta: {
|
|
215
243
|
type: "problem",
|
|
@@ -225,37 +253,40 @@ var no_missing_iframe_sandbox_default = createRule({
|
|
|
225
253
|
name: RULE_NAME5,
|
|
226
254
|
create(context) {
|
|
227
255
|
const settings = getSettingsFromContext(context);
|
|
256
|
+
const polymorphicPropName = settings.polymorphicPropName;
|
|
228
257
|
const additionalComponents = settings.additionalComponents.filter((c) => c.as === "iframe");
|
|
229
258
|
return {
|
|
230
259
|
JSXElement(node) {
|
|
231
|
-
const [
|
|
232
|
-
node
|
|
260
|
+
const [elementNameOnJsx, elementNameOnDom] = getElementNameOnJsxAndDom(
|
|
261
|
+
node,
|
|
233
262
|
context,
|
|
234
|
-
|
|
235
|
-
|
|
263
|
+
polymorphicPropName,
|
|
264
|
+
additionalComponents
|
|
236
265
|
);
|
|
237
|
-
if (
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
if (
|
|
266
|
+
if (elementNameOnDom !== "iframe") return;
|
|
267
|
+
const elementScope = context.sourceCode.getScope(node);
|
|
268
|
+
const customComponent = findCustomComponent(elementNameOnJsx, additionalComponents);
|
|
269
|
+
const customComponentProp = findCustomComponentProp("sandbox", customComponent?.attributes ?? []);
|
|
270
|
+
const propNameOnJsx = customComponentProp?.name ?? "sandbox";
|
|
271
|
+
const attributeNode = JSX.getAttribute(
|
|
272
|
+
propNameOnJsx,
|
|
273
|
+
elementScope,
|
|
274
|
+
node.openingElement.attributes
|
|
275
|
+
);
|
|
276
|
+
if (attributeNode != null) {
|
|
277
|
+
const attributeScope = context.sourceCode.getScope(attributeNode);
|
|
278
|
+
const attributeValue = JSX.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
|
|
279
|
+
if (attributeValue.kind === "some" && hasValidSandBox(attributeValue.value)) return;
|
|
248
280
|
context.report({
|
|
249
281
|
messageId: "noMissingIframeSandbox",
|
|
250
|
-
node:
|
|
282
|
+
node: attributeNode
|
|
251
283
|
});
|
|
252
284
|
return;
|
|
253
285
|
}
|
|
254
|
-
|
|
255
|
-
if (!values.every((value) => validTypes.some((validType) => validType === value))) {
|
|
286
|
+
if (!hasValidSandBox(customComponentProp?.defaultValue)) {
|
|
256
287
|
context.report({
|
|
257
288
|
messageId: "noMissingIframeSandbox",
|
|
258
|
-
node
|
|
289
|
+
node
|
|
259
290
|
});
|
|
260
291
|
}
|
|
261
292
|
}
|
|
@@ -282,14 +313,14 @@ var no_namespace_default = createRule({
|
|
|
282
313
|
name: RULE_NAME6,
|
|
283
314
|
create(context) {
|
|
284
315
|
return {
|
|
285
|
-
|
|
286
|
-
const name2 =
|
|
316
|
+
JSXElement(node) {
|
|
317
|
+
const name2 = JSX.getElementName(node);
|
|
287
318
|
if (typeof name2 !== "string" || !name2.includes(":")) {
|
|
288
319
|
return;
|
|
289
320
|
}
|
|
290
321
|
context.report({
|
|
291
322
|
messageId: "noNamespace",
|
|
292
|
-
node,
|
|
323
|
+
node: node.openingElement.name,
|
|
293
324
|
data: {
|
|
294
325
|
name: name2
|
|
295
326
|
}
|
|
@@ -375,11 +406,10 @@ var no_script_url_default = createRule({
|
|
|
375
406
|
if (node.name.type !== AST_NODE_TYPES.JSXIdentifier || node.value == null) {
|
|
376
407
|
return;
|
|
377
408
|
}
|
|
378
|
-
const
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
if (
|
|
382
|
-
if (RE_JAVASCRIPT_PROTOCOL.test(propValueResolved)) {
|
|
409
|
+
const attributeScope = context.sourceCode.getScope(node);
|
|
410
|
+
const attributeValue = JSX.getAttributeValue(JSX.toString(node.name), node, attributeScope);
|
|
411
|
+
if (attributeValue.kind === "none" || typeof attributeValue.value !== "string") return;
|
|
412
|
+
if (RE_JAVASCRIPT_PROTOCOL.test(attributeValue.value)) {
|
|
383
413
|
context.report({
|
|
384
414
|
messageId: "noScriptUrl",
|
|
385
415
|
node: node.value
|
|
@@ -1451,9 +1481,15 @@ var RULE_NAME10 = "no-unsafe-iframe-sandbox";
|
|
|
1451
1481
|
var RULE_FEATURES9 = [
|
|
1452
1482
|
"CHK"
|
|
1453
1483
|
];
|
|
1454
|
-
var
|
|
1484
|
+
var unsafeSandboxValues = [
|
|
1455
1485
|
["allow-scripts", "allow-same-origin"]
|
|
1456
1486
|
];
|
|
1487
|
+
function hasSafeSandbox(value) {
|
|
1488
|
+
if (typeof value !== "string") return false;
|
|
1489
|
+
return !unsafeSandboxValues.some((values) => {
|
|
1490
|
+
return values.every((v) => value.includes(v));
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1457
1493
|
var no_unsafe_iframe_sandbox_default = createRule({
|
|
1458
1494
|
meta: {
|
|
1459
1495
|
type: "problem",
|
|
@@ -1469,31 +1505,42 @@ var no_unsafe_iframe_sandbox_default = createRule({
|
|
|
1469
1505
|
name: RULE_NAME10,
|
|
1470
1506
|
create(context) {
|
|
1471
1507
|
const settings = getSettingsFromContext(context);
|
|
1508
|
+
const polymorphicPropName = settings.polymorphicPropName;
|
|
1472
1509
|
const additionalComponents = settings.additionalComponents.filter((c) => c.as === "iframe");
|
|
1473
1510
|
return {
|
|
1474
1511
|
JSXElement(node) {
|
|
1475
|
-
const [
|
|
1476
|
-
node
|
|
1512
|
+
const [elementNameOnJsx, elementNameOnDom] = getElementNameOnJsxAndDom(
|
|
1513
|
+
node,
|
|
1477
1514
|
context,
|
|
1478
|
-
|
|
1479
|
-
|
|
1515
|
+
polymorphicPropName,
|
|
1516
|
+
additionalComponents
|
|
1480
1517
|
);
|
|
1481
|
-
if (
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
if (
|
|
1492
|
-
|
|
1493
|
-
|
|
1518
|
+
if (elementNameOnDom !== "iframe") return;
|
|
1519
|
+
const elementScope = context.sourceCode.getScope(node);
|
|
1520
|
+
const customComponent = findCustomComponent(elementNameOnJsx, additionalComponents);
|
|
1521
|
+
const customComponentProp = findCustomComponentProp("sandbox", customComponent?.attributes ?? []);
|
|
1522
|
+
const propNameOnJsx = customComponentProp?.name ?? "sandbox";
|
|
1523
|
+
const attributeNode = JSX.getAttribute(
|
|
1524
|
+
propNameOnJsx,
|
|
1525
|
+
elementScope,
|
|
1526
|
+
node.openingElement.attributes
|
|
1527
|
+
);
|
|
1528
|
+
if (attributeNode != null) {
|
|
1529
|
+
const attributeScope = context.sourceCode.getScope(attributeNode);
|
|
1530
|
+
const attributeValue = JSX.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
|
|
1531
|
+
if (attributeValue.kind === "some" && !hasSafeSandbox(attributeValue.value)) {
|
|
1532
|
+
context.report({
|
|
1533
|
+
messageId: "noUnsafeIframeSandbox",
|
|
1534
|
+
node: attributeNode
|
|
1535
|
+
});
|
|
1536
|
+
return;
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
if (customComponentProp?.defaultValue == null) return;
|
|
1540
|
+
if (!hasSafeSandbox(customComponentProp.defaultValue)) {
|
|
1494
1541
|
context.report({
|
|
1495
1542
|
messageId: "noUnsafeIframeSandbox",
|
|
1496
|
-
node
|
|
1543
|
+
node
|
|
1497
1544
|
});
|
|
1498
1545
|
}
|
|
1499
1546
|
}
|
|
@@ -1528,36 +1575,48 @@ var no_unsafe_target_blank_default = createRule({
|
|
|
1528
1575
|
name: RULE_NAME11,
|
|
1529
1576
|
create(context) {
|
|
1530
1577
|
const settings = getSettingsFromContext(context);
|
|
1578
|
+
const polymorphicPropName = settings.polymorphicPropName;
|
|
1531
1579
|
const additionalComponents = settings.additionalComponents.filter((c) => c.as === "a");
|
|
1532
1580
|
return {
|
|
1533
1581
|
JSXElement(node) {
|
|
1534
|
-
const [
|
|
1535
|
-
node
|
|
1582
|
+
const [elementNameOnJsx, elementNameOnDom] = getElementNameOnJsxAndDom(
|
|
1583
|
+
node,
|
|
1536
1584
|
context,
|
|
1537
|
-
|
|
1538
|
-
|
|
1585
|
+
polymorphicPropName,
|
|
1586
|
+
additionalComponents
|
|
1539
1587
|
);
|
|
1540
|
-
if (
|
|
1541
|
-
const
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1588
|
+
if (elementNameOnDom !== "a") return;
|
|
1589
|
+
const elementScope = context.sourceCode.getScope(node);
|
|
1590
|
+
const customComponent = findCustomComponent(elementNameOnJsx, additionalComponents);
|
|
1591
|
+
const getAttributeStringValue = (name2) => {
|
|
1592
|
+
const customComponentProp = findCustomComponentProp(name2, customComponent?.attributes ?? []);
|
|
1593
|
+
const propNameOnJsx = customComponentProp?.name ?? name2;
|
|
1594
|
+
const attributeNode = JSX.getAttribute(
|
|
1595
|
+
propNameOnJsx,
|
|
1596
|
+
elementScope,
|
|
1597
|
+
node.openingElement.attributes
|
|
1547
1598
|
);
|
|
1599
|
+
if (attributeNode == null) return customComponentProp?.defaultValue;
|
|
1600
|
+
const attributeScope = context.sourceCode.getScope(attributeNode);
|
|
1601
|
+
const attributeValue = JSX.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
|
|
1602
|
+
if (attributeValue.kind === "some" && typeof attributeValue.value === "string") {
|
|
1603
|
+
return attributeValue.value;
|
|
1604
|
+
}
|
|
1605
|
+
return _;
|
|
1548
1606
|
};
|
|
1549
|
-
if (
|
|
1607
|
+
if (getAttributeStringValue("target") !== "_blank") {
|
|
1550
1608
|
return;
|
|
1551
1609
|
}
|
|
1552
|
-
if (!isExternalLinkLike(
|
|
1610
|
+
if (!isExternalLinkLike(getAttributeStringValue("href"))) {
|
|
1553
1611
|
return;
|
|
1554
1612
|
}
|
|
1555
|
-
if (
|
|
1556
|
-
|
|
1557
|
-
messageId: "noUnsafeTargetBlank",
|
|
1558
|
-
node
|
|
1559
|
-
});
|
|
1613
|
+
if (isSafeRel(getAttributeStringValue("rel"))) {
|
|
1614
|
+
return;
|
|
1560
1615
|
}
|
|
1616
|
+
context.report({
|
|
1617
|
+
messageId: "noUnsafeTargetBlank",
|
|
1618
|
+
node
|
|
1619
|
+
});
|
|
1561
1620
|
}
|
|
1562
1621
|
};
|
|
1563
1622
|
},
|
|
@@ -1601,7 +1660,7 @@ var no_void_elements_with_children_default = createRule({
|
|
|
1601
1660
|
create(context) {
|
|
1602
1661
|
return {
|
|
1603
1662
|
JSXElement(node) {
|
|
1604
|
-
const elementName =
|
|
1663
|
+
const elementName = JSX.getElementName(node);
|
|
1605
1664
|
if (elementName.length === 0 || !voidElements.has(elementName)) {
|
|
1606
1665
|
return;
|
|
1607
1666
|
}
|
|
@@ -1616,8 +1675,8 @@ var no_void_elements_with_children_default = createRule({
|
|
|
1616
1675
|
}
|
|
1617
1676
|
const { attributes } = node.openingElement;
|
|
1618
1677
|
const initialScope = context.sourceCode.getScope(node);
|
|
1619
|
-
const
|
|
1620
|
-
if (
|
|
1678
|
+
const hasAttribute3 = (name2) => JSX.hasAttribute(name2, initialScope, attributes);
|
|
1679
|
+
if (hasAttribute3("children") || hasAttribute3("dangerouslySetInnerHTML")) {
|
|
1621
1680
|
context.report({
|
|
1622
1681
|
messageId: "noVoidElementsWithChildren",
|
|
1623
1682
|
node,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-dom",
|
|
3
|
-
"version": "1.24.0-next.
|
|
3
|
+
"version": "1.24.0-next.12",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React DOM related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -41,22 +41,21 @@
|
|
|
41
41
|
"./package.json"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@typescript-eslint/scope-manager": "^8.
|
|
45
|
-
"@typescript-eslint/types": "^8.
|
|
46
|
-
"@typescript-eslint/utils": "^8.
|
|
44
|
+
"@typescript-eslint/scope-manager": "^8.20.0",
|
|
45
|
+
"@typescript-eslint/types": "^8.20.0",
|
|
46
|
+
"@typescript-eslint/utils": "^8.20.0",
|
|
47
47
|
"compare-versions": "^6.1.1",
|
|
48
48
|
"string-ts": "^2.2.0",
|
|
49
49
|
"ts-pattern": "^5.6.0",
|
|
50
|
-
"@eslint-react/ast": "1.24.0-next.
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/
|
|
53
|
-
"@eslint-react/
|
|
54
|
-
"@eslint-react/
|
|
55
|
-
"@eslint-react/
|
|
56
|
-
"@eslint-react/var": "1.24.0-next.1"
|
|
50
|
+
"@eslint-react/ast": "1.24.0-next.12",
|
|
51
|
+
"@eslint-react/core": "1.24.0-next.12",
|
|
52
|
+
"@eslint-react/eff": "1.24.0-next.12",
|
|
53
|
+
"@eslint-react/jsx": "1.24.0-next.12",
|
|
54
|
+
"@eslint-react/shared": "1.24.0-next.12",
|
|
55
|
+
"@eslint-react/var": "1.24.0-next.12"
|
|
57
56
|
},
|
|
58
57
|
"devDependencies": {
|
|
59
|
-
"@types/react": "^19.0.
|
|
58
|
+
"@types/react": "^19.0.7",
|
|
60
59
|
"@types/react-dom": "^19.0.3",
|
|
61
60
|
"tsup": "^8.3.5",
|
|
62
61
|
"@workspace/configs": "0.0.0"
|