eslint-plugin-react-x 1.28.0-next.2 → 1.28.0-next.4
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 +25 -25
- package/dist/index.mjs +25 -25
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -137,7 +137,7 @@ var settings3 = {
|
|
|
137
137
|
|
|
138
138
|
// package.json
|
|
139
139
|
var name4 = "eslint-plugin-react-x";
|
|
140
|
-
var version = "1.28.0-next.
|
|
140
|
+
var version = "1.28.0-next.4";
|
|
141
141
|
var createRule = shared.createRuleForPlugin("x");
|
|
142
142
|
|
|
143
143
|
// src/utils/get-associated-tokens.ts
|
|
@@ -244,7 +244,7 @@ var ensure_forward_ref_using_ref_default = createRule({
|
|
|
244
244
|
create(context) {
|
|
245
245
|
return {
|
|
246
246
|
CallExpression(node) {
|
|
247
|
-
if (!core.isForwardRefCall(
|
|
247
|
+
if (!core.isForwardRefCall(context, node)) {
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
250
250
|
const [component] = node.arguments;
|
|
@@ -411,7 +411,7 @@ var iteratorFunctionIndexParamPosition = /* @__PURE__ */ new Map([
|
|
|
411
411
|
function isReactChildrenMethod(name5) {
|
|
412
412
|
return reactChildrenMethod.some((method) => method === name5);
|
|
413
413
|
}
|
|
414
|
-
function isUsingReactChildren(
|
|
414
|
+
function isUsingReactChildren(context, node) {
|
|
415
415
|
const { importSource = "react" } = shared.unsafeDecodeSettings(context.settings);
|
|
416
416
|
const { callee } = node;
|
|
417
417
|
if (!("property" in callee) || !("object" in callee) || !("name" in callee.property)) {
|
|
@@ -429,7 +429,7 @@ function isUsingReactChildren(node, context) {
|
|
|
429
429
|
}
|
|
430
430
|
return false;
|
|
431
431
|
}
|
|
432
|
-
function getMapIndexParamName(
|
|
432
|
+
function getMapIndexParamName(context, node) {
|
|
433
433
|
const { callee } = node;
|
|
434
434
|
if (callee.type !== types.AST_NODE_TYPES.MemberExpression) {
|
|
435
435
|
return eff._;
|
|
@@ -441,7 +441,7 @@ function getMapIndexParamName(node, context) {
|
|
|
441
441
|
if (!iteratorFunctionIndexParamPosition.has(name5)) {
|
|
442
442
|
return eff._;
|
|
443
443
|
}
|
|
444
|
-
const callbackArg = node.arguments[isUsingReactChildren(
|
|
444
|
+
const callbackArg = node.arguments[isUsingReactChildren(context, node) ? 1 : 0];
|
|
445
445
|
if (callbackArg == null) {
|
|
446
446
|
return eff._;
|
|
447
447
|
}
|
|
@@ -478,7 +478,7 @@ var no_array_index_key_default = createRule({
|
|
|
478
478
|
return node.type === types.AST_NODE_TYPES.Identifier && indexParamNames.some((name5) => name5 != null && name5 === node.name);
|
|
479
479
|
}
|
|
480
480
|
function isCreateOrCloneElementCall(node) {
|
|
481
|
-
return core.isCreateElementCall(
|
|
481
|
+
return core.isCreateElementCall(context, node) || core.isCloneElementCall(context, node);
|
|
482
482
|
}
|
|
483
483
|
function getReportDescriptors(node) {
|
|
484
484
|
switch (node.type) {
|
|
@@ -531,7 +531,7 @@ var no_array_index_key_default = createRule({
|
|
|
531
531
|
}
|
|
532
532
|
return {
|
|
533
533
|
CallExpression(node) {
|
|
534
|
-
indexParamNames.push(getMapIndexParamName(
|
|
534
|
+
indexParamNames.push(getMapIndexParamName(context, node));
|
|
535
535
|
if (node.arguments.length === 0) {
|
|
536
536
|
return;
|
|
537
537
|
}
|
|
@@ -609,7 +609,7 @@ var no_children_count_default = createRule({
|
|
|
609
609
|
create(context) {
|
|
610
610
|
return {
|
|
611
611
|
MemberExpression(node) {
|
|
612
|
-
if (core.isChildrenCount(
|
|
612
|
+
if (core.isChildrenCount(context, node)) {
|
|
613
613
|
context.report({
|
|
614
614
|
messageId: "noChildrenCount",
|
|
615
615
|
node: node.property
|
|
@@ -640,7 +640,7 @@ var no_children_for_each_default = createRule({
|
|
|
640
640
|
create(context) {
|
|
641
641
|
return {
|
|
642
642
|
MemberExpression(node) {
|
|
643
|
-
if (core.isChildrenForEach(
|
|
643
|
+
if (core.isChildrenForEach(context, node)) {
|
|
644
644
|
context.report({
|
|
645
645
|
messageId: "noChildrenForEach",
|
|
646
646
|
node: node.property
|
|
@@ -671,7 +671,7 @@ var no_children_map_default = createRule({
|
|
|
671
671
|
create(context) {
|
|
672
672
|
return {
|
|
673
673
|
MemberExpression(node) {
|
|
674
|
-
if (core.isChildrenMap(
|
|
674
|
+
if (core.isChildrenMap(context, node)) {
|
|
675
675
|
context.report({
|
|
676
676
|
messageId: "noChildrenMap",
|
|
677
677
|
node: node.property
|
|
@@ -702,7 +702,7 @@ var no_children_only_default = createRule({
|
|
|
702
702
|
create(context) {
|
|
703
703
|
return {
|
|
704
704
|
MemberExpression(node) {
|
|
705
|
-
if (core.isChildrenOnly(
|
|
705
|
+
if (core.isChildrenOnly(context, node)) {
|
|
706
706
|
context.report({
|
|
707
707
|
messageId: "noChildrenOnly",
|
|
708
708
|
node: node.property
|
|
@@ -769,7 +769,7 @@ var no_children_to_array_default = createRule({
|
|
|
769
769
|
create(context) {
|
|
770
770
|
return {
|
|
771
771
|
MemberExpression(node) {
|
|
772
|
-
if (core.isChildrenToArray(
|
|
772
|
+
if (core.isChildrenToArray(context, node)) {
|
|
773
773
|
context.report({
|
|
774
774
|
messageId: "noChildrenToArray",
|
|
775
775
|
node: node.property
|
|
@@ -843,7 +843,7 @@ var no_clone_element_default = createRule({
|
|
|
843
843
|
create(context) {
|
|
844
844
|
return {
|
|
845
845
|
CallExpression(node) {
|
|
846
|
-
if (!core.isCloneElementCall(
|
|
846
|
+
if (!core.isCloneElementCall(context, node)) {
|
|
847
847
|
return;
|
|
848
848
|
}
|
|
849
849
|
context.report({
|
|
@@ -1178,7 +1178,7 @@ var no_create_ref_default = createRule({
|
|
|
1178
1178
|
create(context) {
|
|
1179
1179
|
return {
|
|
1180
1180
|
CallExpression(node) {
|
|
1181
|
-
if (core.isCreateRefCall(
|
|
1181
|
+
if (core.isCreateRefCall(context, node) && AST11__namespace.findParentNode(node, core.isClassComponent) == null) {
|
|
1182
1182
|
context.report({ messageId: "noCreateRef", node });
|
|
1183
1183
|
}
|
|
1184
1184
|
}
|
|
@@ -1460,20 +1460,20 @@ var no_forward_ref_default = createRule({
|
|
|
1460
1460
|
}
|
|
1461
1461
|
return {
|
|
1462
1462
|
CallExpression(node) {
|
|
1463
|
-
if (!core.isForwardRefCall(
|
|
1463
|
+
if (!core.isForwardRefCall(context, node)) {
|
|
1464
1464
|
return;
|
|
1465
1465
|
}
|
|
1466
1466
|
context.report({
|
|
1467
1467
|
messageId: "noForwardRef",
|
|
1468
1468
|
node,
|
|
1469
|
-
fix: getFix(
|
|
1469
|
+
fix: getFix(context, node)
|
|
1470
1470
|
});
|
|
1471
1471
|
}
|
|
1472
1472
|
};
|
|
1473
1473
|
},
|
|
1474
1474
|
defaultOptions: []
|
|
1475
1475
|
});
|
|
1476
|
-
function getFix(
|
|
1476
|
+
function getFix(context, node) {
|
|
1477
1477
|
return (fixer) => {
|
|
1478
1478
|
const [componentNode] = node.arguments;
|
|
1479
1479
|
if (componentNode == null || !AST11__namespace.isFunction(componentNode)) {
|
|
@@ -1813,7 +1813,7 @@ var no_missing_context_display_name_default = createRule({
|
|
|
1813
1813
|
const displayNameAssignments = [];
|
|
1814
1814
|
return {
|
|
1815
1815
|
CallExpression(node) {
|
|
1816
|
-
if (!core.isCreateContextCall(
|
|
1816
|
+
if (!core.isCreateContextCall(context, node)) return;
|
|
1817
1817
|
createCalls.push(node);
|
|
1818
1818
|
},
|
|
1819
1819
|
[core.DISPLAY_NAME_ASSIGNMENT_SELECTOR](node) {
|
|
@@ -1944,7 +1944,7 @@ var no_missing_key_default = createRule({
|
|
|
1944
1944
|
}
|
|
1945
1945
|
},
|
|
1946
1946
|
CallExpression(node) {
|
|
1947
|
-
state.isWithinChildrenToArray ||= core.isChildrenToArrayCall(
|
|
1947
|
+
state.isWithinChildrenToArray ||= core.isChildrenToArrayCall(context, node);
|
|
1948
1948
|
if (state.isWithinChildrenToArray) {
|
|
1949
1949
|
return;
|
|
1950
1950
|
}
|
|
@@ -1968,7 +1968,7 @@ var no_missing_key_default = createRule({
|
|
|
1968
1968
|
}
|
|
1969
1969
|
},
|
|
1970
1970
|
"CallExpression:exit"(node) {
|
|
1971
|
-
if (!core.isChildrenToArrayCall(
|
|
1971
|
+
if (!core.isChildrenToArrayCall(context, node)) {
|
|
1972
1972
|
return;
|
|
1973
1973
|
}
|
|
1974
1974
|
state.isWithinChildrenToArray = false;
|
|
@@ -2050,7 +2050,7 @@ var no_nested_components_default = createRule({
|
|
|
2050
2050
|
}
|
|
2051
2051
|
continue;
|
|
2052
2052
|
}
|
|
2053
|
-
if (core.isInsideCreateElementProps(
|
|
2053
|
+
if (core.isInsideCreateElementProps(context, component)) {
|
|
2054
2054
|
context.report({
|
|
2055
2055
|
messageId: "nestedComponentInProps",
|
|
2056
2056
|
node: component,
|
|
@@ -3028,7 +3028,7 @@ var no_use_context_default = createRule({
|
|
|
3028
3028
|
if (!core.isReactHookCall(node)) {
|
|
3029
3029
|
return;
|
|
3030
3030
|
}
|
|
3031
|
-
if (!core.isReactHookCallWithNameAlias("useContext",
|
|
3031
|
+
if (!core.isReactHookCallWithNameAlias(context, "useContext", [...useContextAlias])(node)) {
|
|
3032
3032
|
return;
|
|
3033
3033
|
}
|
|
3034
3034
|
context.report({
|
|
@@ -3093,7 +3093,7 @@ function trimLikeReact(text) {
|
|
|
3093
3093
|
const end = trailingSpaces.includes("\n") ? text.length - trailingSpaces.length : text.length;
|
|
3094
3094
|
return text.slice(start, end);
|
|
3095
3095
|
}
|
|
3096
|
-
function checkAndReport(
|
|
3096
|
+
function checkAndReport(context, node, allowExpressions) {
|
|
3097
3097
|
function fix(fixer) {
|
|
3098
3098
|
if (node.parent.type !== types.AST_NODE_TYPES.JSXElement && node.parent.type !== types.AST_NODE_TYPES.JSXFragment) {
|
|
3099
3099
|
if (node.children.length === 0) {
|
|
@@ -3214,10 +3214,10 @@ var no_useless_fragment_default = createRule({
|
|
|
3214
3214
|
return {
|
|
3215
3215
|
JSXElement(node) {
|
|
3216
3216
|
if (!JSX7__namespace.isFragmentElement(node)) return;
|
|
3217
|
-
checkAndReport(
|
|
3217
|
+
checkAndReport(context, node, allowExpressions);
|
|
3218
3218
|
},
|
|
3219
3219
|
JSXFragment(node) {
|
|
3220
|
-
checkAndReport(
|
|
3220
|
+
checkAndReport(context, node, allowExpressions);
|
|
3221
3221
|
}
|
|
3222
3222
|
};
|
|
3223
3223
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -110,7 +110,7 @@ var settings3 = {
|
|
|
110
110
|
|
|
111
111
|
// package.json
|
|
112
112
|
var name4 = "eslint-plugin-react-x";
|
|
113
|
-
var version = "1.28.0-next.
|
|
113
|
+
var version = "1.28.0-next.4";
|
|
114
114
|
var createRule = createRuleForPlugin("x");
|
|
115
115
|
|
|
116
116
|
// src/utils/get-associated-tokens.ts
|
|
@@ -217,7 +217,7 @@ var ensure_forward_ref_using_ref_default = createRule({
|
|
|
217
217
|
create(context) {
|
|
218
218
|
return {
|
|
219
219
|
CallExpression(node) {
|
|
220
|
-
if (!isForwardRefCall(
|
|
220
|
+
if (!isForwardRefCall(context, node)) {
|
|
221
221
|
return;
|
|
222
222
|
}
|
|
223
223
|
const [component] = node.arguments;
|
|
@@ -384,7 +384,7 @@ var iteratorFunctionIndexParamPosition = /* @__PURE__ */ new Map([
|
|
|
384
384
|
function isReactChildrenMethod(name5) {
|
|
385
385
|
return reactChildrenMethod.some((method) => method === name5);
|
|
386
386
|
}
|
|
387
|
-
function isUsingReactChildren(
|
|
387
|
+
function isUsingReactChildren(context, node) {
|
|
388
388
|
const { importSource = "react" } = unsafeDecodeSettings(context.settings);
|
|
389
389
|
const { callee } = node;
|
|
390
390
|
if (!("property" in callee) || !("object" in callee) || !("name" in callee.property)) {
|
|
@@ -402,7 +402,7 @@ function isUsingReactChildren(node, context) {
|
|
|
402
402
|
}
|
|
403
403
|
return false;
|
|
404
404
|
}
|
|
405
|
-
function getMapIndexParamName(
|
|
405
|
+
function getMapIndexParamName(context, node) {
|
|
406
406
|
const { callee } = node;
|
|
407
407
|
if (callee.type !== AST_NODE_TYPES.MemberExpression) {
|
|
408
408
|
return _;
|
|
@@ -414,7 +414,7 @@ function getMapIndexParamName(node, context) {
|
|
|
414
414
|
if (!iteratorFunctionIndexParamPosition.has(name5)) {
|
|
415
415
|
return _;
|
|
416
416
|
}
|
|
417
|
-
const callbackArg = node.arguments[isUsingReactChildren(
|
|
417
|
+
const callbackArg = node.arguments[isUsingReactChildren(context, node) ? 1 : 0];
|
|
418
418
|
if (callbackArg == null) {
|
|
419
419
|
return _;
|
|
420
420
|
}
|
|
@@ -451,7 +451,7 @@ var no_array_index_key_default = createRule({
|
|
|
451
451
|
return node.type === AST_NODE_TYPES.Identifier && indexParamNames.some((name5) => name5 != null && name5 === node.name);
|
|
452
452
|
}
|
|
453
453
|
function isCreateOrCloneElementCall(node) {
|
|
454
|
-
return isCreateElementCall(
|
|
454
|
+
return isCreateElementCall(context, node) || isCloneElementCall(context, node);
|
|
455
455
|
}
|
|
456
456
|
function getReportDescriptors(node) {
|
|
457
457
|
switch (node.type) {
|
|
@@ -504,7 +504,7 @@ var no_array_index_key_default = createRule({
|
|
|
504
504
|
}
|
|
505
505
|
return {
|
|
506
506
|
CallExpression(node) {
|
|
507
|
-
indexParamNames.push(getMapIndexParamName(
|
|
507
|
+
indexParamNames.push(getMapIndexParamName(context, node));
|
|
508
508
|
if (node.arguments.length === 0) {
|
|
509
509
|
return;
|
|
510
510
|
}
|
|
@@ -582,7 +582,7 @@ var no_children_count_default = createRule({
|
|
|
582
582
|
create(context) {
|
|
583
583
|
return {
|
|
584
584
|
MemberExpression(node) {
|
|
585
|
-
if (isChildrenCount(
|
|
585
|
+
if (isChildrenCount(context, node)) {
|
|
586
586
|
context.report({
|
|
587
587
|
messageId: "noChildrenCount",
|
|
588
588
|
node: node.property
|
|
@@ -613,7 +613,7 @@ var no_children_for_each_default = createRule({
|
|
|
613
613
|
create(context) {
|
|
614
614
|
return {
|
|
615
615
|
MemberExpression(node) {
|
|
616
|
-
if (isChildrenForEach(
|
|
616
|
+
if (isChildrenForEach(context, node)) {
|
|
617
617
|
context.report({
|
|
618
618
|
messageId: "noChildrenForEach",
|
|
619
619
|
node: node.property
|
|
@@ -644,7 +644,7 @@ var no_children_map_default = createRule({
|
|
|
644
644
|
create(context) {
|
|
645
645
|
return {
|
|
646
646
|
MemberExpression(node) {
|
|
647
|
-
if (isChildrenMap(
|
|
647
|
+
if (isChildrenMap(context, node)) {
|
|
648
648
|
context.report({
|
|
649
649
|
messageId: "noChildrenMap",
|
|
650
650
|
node: node.property
|
|
@@ -675,7 +675,7 @@ var no_children_only_default = createRule({
|
|
|
675
675
|
create(context) {
|
|
676
676
|
return {
|
|
677
677
|
MemberExpression(node) {
|
|
678
|
-
if (isChildrenOnly(
|
|
678
|
+
if (isChildrenOnly(context, node)) {
|
|
679
679
|
context.report({
|
|
680
680
|
messageId: "noChildrenOnly",
|
|
681
681
|
node: node.property
|
|
@@ -742,7 +742,7 @@ var no_children_to_array_default = createRule({
|
|
|
742
742
|
create(context) {
|
|
743
743
|
return {
|
|
744
744
|
MemberExpression(node) {
|
|
745
|
-
if (isChildrenToArray(
|
|
745
|
+
if (isChildrenToArray(context, node)) {
|
|
746
746
|
context.report({
|
|
747
747
|
messageId: "noChildrenToArray",
|
|
748
748
|
node: node.property
|
|
@@ -816,7 +816,7 @@ var no_clone_element_default = createRule({
|
|
|
816
816
|
create(context) {
|
|
817
817
|
return {
|
|
818
818
|
CallExpression(node) {
|
|
819
|
-
if (!isCloneElementCall(
|
|
819
|
+
if (!isCloneElementCall(context, node)) {
|
|
820
820
|
return;
|
|
821
821
|
}
|
|
822
822
|
context.report({
|
|
@@ -1151,7 +1151,7 @@ var no_create_ref_default = createRule({
|
|
|
1151
1151
|
create(context) {
|
|
1152
1152
|
return {
|
|
1153
1153
|
CallExpression(node) {
|
|
1154
|
-
if (isCreateRefCall(
|
|
1154
|
+
if (isCreateRefCall(context, node) && AST11.findParentNode(node, isClassComponent) == null) {
|
|
1155
1155
|
context.report({ messageId: "noCreateRef", node });
|
|
1156
1156
|
}
|
|
1157
1157
|
}
|
|
@@ -1433,20 +1433,20 @@ var no_forward_ref_default = createRule({
|
|
|
1433
1433
|
}
|
|
1434
1434
|
return {
|
|
1435
1435
|
CallExpression(node) {
|
|
1436
|
-
if (!isForwardRefCall(
|
|
1436
|
+
if (!isForwardRefCall(context, node)) {
|
|
1437
1437
|
return;
|
|
1438
1438
|
}
|
|
1439
1439
|
context.report({
|
|
1440
1440
|
messageId: "noForwardRef",
|
|
1441
1441
|
node,
|
|
1442
|
-
fix: getFix(
|
|
1442
|
+
fix: getFix(context, node)
|
|
1443
1443
|
});
|
|
1444
1444
|
}
|
|
1445
1445
|
};
|
|
1446
1446
|
},
|
|
1447
1447
|
defaultOptions: []
|
|
1448
1448
|
});
|
|
1449
|
-
function getFix(
|
|
1449
|
+
function getFix(context, node) {
|
|
1450
1450
|
return (fixer) => {
|
|
1451
1451
|
const [componentNode] = node.arguments;
|
|
1452
1452
|
if (componentNode == null || !AST11.isFunction(componentNode)) {
|
|
@@ -1786,7 +1786,7 @@ var no_missing_context_display_name_default = createRule({
|
|
|
1786
1786
|
const displayNameAssignments = [];
|
|
1787
1787
|
return {
|
|
1788
1788
|
CallExpression(node) {
|
|
1789
|
-
if (!isCreateContextCall(
|
|
1789
|
+
if (!isCreateContextCall(context, node)) return;
|
|
1790
1790
|
createCalls.push(node);
|
|
1791
1791
|
},
|
|
1792
1792
|
[DISPLAY_NAME_ASSIGNMENT_SELECTOR](node) {
|
|
@@ -1917,7 +1917,7 @@ var no_missing_key_default = createRule({
|
|
|
1917
1917
|
}
|
|
1918
1918
|
},
|
|
1919
1919
|
CallExpression(node) {
|
|
1920
|
-
state.isWithinChildrenToArray ||= isChildrenToArrayCall(
|
|
1920
|
+
state.isWithinChildrenToArray ||= isChildrenToArrayCall(context, node);
|
|
1921
1921
|
if (state.isWithinChildrenToArray) {
|
|
1922
1922
|
return;
|
|
1923
1923
|
}
|
|
@@ -1941,7 +1941,7 @@ var no_missing_key_default = createRule({
|
|
|
1941
1941
|
}
|
|
1942
1942
|
},
|
|
1943
1943
|
"CallExpression:exit"(node) {
|
|
1944
|
-
if (!isChildrenToArrayCall(
|
|
1944
|
+
if (!isChildrenToArrayCall(context, node)) {
|
|
1945
1945
|
return;
|
|
1946
1946
|
}
|
|
1947
1947
|
state.isWithinChildrenToArray = false;
|
|
@@ -2023,7 +2023,7 @@ var no_nested_components_default = createRule({
|
|
|
2023
2023
|
}
|
|
2024
2024
|
continue;
|
|
2025
2025
|
}
|
|
2026
|
-
if (isInsideCreateElementProps(
|
|
2026
|
+
if (isInsideCreateElementProps(context, component)) {
|
|
2027
2027
|
context.report({
|
|
2028
2028
|
messageId: "nestedComponentInProps",
|
|
2029
2029
|
node: component,
|
|
@@ -3001,7 +3001,7 @@ var no_use_context_default = createRule({
|
|
|
3001
3001
|
if (!isReactHookCall(node)) {
|
|
3002
3002
|
return;
|
|
3003
3003
|
}
|
|
3004
|
-
if (!isReactHookCallWithNameAlias("useContext",
|
|
3004
|
+
if (!isReactHookCallWithNameAlias(context, "useContext", [...useContextAlias])(node)) {
|
|
3005
3005
|
return;
|
|
3006
3006
|
}
|
|
3007
3007
|
context.report({
|
|
@@ -3066,7 +3066,7 @@ function trimLikeReact(text) {
|
|
|
3066
3066
|
const end = trailingSpaces.includes("\n") ? text.length - trailingSpaces.length : text.length;
|
|
3067
3067
|
return text.slice(start, end);
|
|
3068
3068
|
}
|
|
3069
|
-
function checkAndReport(
|
|
3069
|
+
function checkAndReport(context, node, allowExpressions) {
|
|
3070
3070
|
function fix(fixer) {
|
|
3071
3071
|
if (node.parent.type !== AST_NODE_TYPES.JSXElement && node.parent.type !== AST_NODE_TYPES.JSXFragment) {
|
|
3072
3072
|
if (node.children.length === 0) {
|
|
@@ -3187,10 +3187,10 @@ var no_useless_fragment_default = createRule({
|
|
|
3187
3187
|
return {
|
|
3188
3188
|
JSXElement(node) {
|
|
3189
3189
|
if (!JSX7.isFragmentElement(node)) return;
|
|
3190
|
-
checkAndReport(
|
|
3190
|
+
checkAndReport(context, node, allowExpressions);
|
|
3191
3191
|
},
|
|
3192
3192
|
JSXFragment(node) {
|
|
3193
|
-
checkAndReport(
|
|
3193
|
+
checkAndReport(context, node, allowExpressions);
|
|
3194
3194
|
}
|
|
3195
3195
|
};
|
|
3196
3196
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "1.28.0-next.
|
|
3
|
+
"version": "1.28.0-next.4",
|
|
4
4
|
"description": "A set of composable linting rules for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"is-immutable-type": "^5.0.1",
|
|
51
51
|
"string-ts": "^2.2.1",
|
|
52
52
|
"ts-pattern": "^5.6.2",
|
|
53
|
-
"@eslint-react/
|
|
54
|
-
"@eslint-react/
|
|
55
|
-
"@eslint-react/
|
|
56
|
-
"@eslint-react/
|
|
57
|
-
"@eslint-react/
|
|
58
|
-
"@eslint-react/
|
|
53
|
+
"@eslint-react/core": "1.28.0-next.4",
|
|
54
|
+
"@eslint-react/jsx": "1.28.0-next.4",
|
|
55
|
+
"@eslint-react/var": "1.28.0-next.4",
|
|
56
|
+
"@eslint-react/shared": "1.28.0-next.4",
|
|
57
|
+
"@eslint-react/eff": "1.28.0-next.4",
|
|
58
|
+
"@eslint-react/ast": "1.28.0-next.4"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/react": "^19.0.10",
|