eslint-plugin-react-x 1.42.1 → 1.42.2-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -6
- package/dist/index.mjs +3 -6
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -141,7 +141,7 @@ var settings3 = {
|
|
|
141
141
|
|
|
142
142
|
// package.json
|
|
143
143
|
var name4 = "eslint-plugin-react-x";
|
|
144
|
-
var version = "1.42.
|
|
144
|
+
var version = "1.42.2-next.0";
|
|
145
145
|
var createRule = utils.ESLintUtils.RuleCreator(shared.getDocsUrl("x"));
|
|
146
146
|
|
|
147
147
|
// src/rules/avoid-shorthand-boolean.ts
|
|
@@ -521,7 +521,7 @@ function getMapIndexParamName(context, node) {
|
|
|
521
521
|
return eff._;
|
|
522
522
|
}
|
|
523
523
|
const { name: name5 } = callee.property;
|
|
524
|
-
const indexPosition = AST8__namespace.
|
|
524
|
+
const indexPosition = AST8__namespace.getArrayMethodCallbackIndexParamPosition(name5);
|
|
525
525
|
if (indexPosition === -1) {
|
|
526
526
|
return eff._;
|
|
527
527
|
}
|
|
@@ -1916,7 +1916,7 @@ function create32(context) {
|
|
|
1916
1916
|
return;
|
|
1917
1917
|
}
|
|
1918
1918
|
const isMapCall = AST8__namespace.isArrayMapCall(node);
|
|
1919
|
-
if (!isMapCall && !isArrayFromCall(node)) {
|
|
1919
|
+
if (!isMapCall && !AST8__namespace.isArrayFromCall(node)) {
|
|
1920
1920
|
return;
|
|
1921
1921
|
}
|
|
1922
1922
|
const fn = node.arguments[isMapCall ? 0 : 1];
|
|
@@ -1948,9 +1948,6 @@ function create32(context) {
|
|
|
1948
1948
|
}
|
|
1949
1949
|
};
|
|
1950
1950
|
}
|
|
1951
|
-
function isArrayFromCall(node) {
|
|
1952
|
-
return node.type === types.AST_NODE_TYPES.CallExpression && node.callee.type === types.AST_NODE_TYPES.MemberExpression && node.callee.property.type === types.AST_NODE_TYPES.Identifier && node.callee.property.name === "from";
|
|
1953
|
-
}
|
|
1954
1951
|
var RULE_NAME33 = "no-nested-component-definitions";
|
|
1955
1952
|
var RULE_FEATURES33 = [];
|
|
1956
1953
|
var no_nested_component_definitions_default = createRule({
|
package/dist/index.mjs
CHANGED
|
@@ -113,7 +113,7 @@ var settings3 = {
|
|
|
113
113
|
|
|
114
114
|
// package.json
|
|
115
115
|
var name4 = "eslint-plugin-react-x";
|
|
116
|
-
var version = "1.42.
|
|
116
|
+
var version = "1.42.2-next.0";
|
|
117
117
|
var createRule = ESLintUtils.RuleCreator(getDocsUrl("x"));
|
|
118
118
|
|
|
119
119
|
// src/rules/avoid-shorthand-boolean.ts
|
|
@@ -493,7 +493,7 @@ function getMapIndexParamName(context, node) {
|
|
|
493
493
|
return _;
|
|
494
494
|
}
|
|
495
495
|
const { name: name5 } = callee.property;
|
|
496
|
-
const indexPosition = AST8.
|
|
496
|
+
const indexPosition = AST8.getArrayMethodCallbackIndexParamPosition(name5);
|
|
497
497
|
if (indexPosition === -1) {
|
|
498
498
|
return _;
|
|
499
499
|
}
|
|
@@ -1888,7 +1888,7 @@ function create32(context) {
|
|
|
1888
1888
|
return;
|
|
1889
1889
|
}
|
|
1890
1890
|
const isMapCall = AST8.isArrayMapCall(node);
|
|
1891
|
-
if (!isMapCall && !isArrayFromCall(node)) {
|
|
1891
|
+
if (!isMapCall && !AST8.isArrayFromCall(node)) {
|
|
1892
1892
|
return;
|
|
1893
1893
|
}
|
|
1894
1894
|
const fn = node.arguments[isMapCall ? 0 : 1];
|
|
@@ -1920,9 +1920,6 @@ function create32(context) {
|
|
|
1920
1920
|
}
|
|
1921
1921
|
};
|
|
1922
1922
|
}
|
|
1923
|
-
function isArrayFromCall(node) {
|
|
1924
|
-
return node.type === AST_NODE_TYPES.CallExpression && node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.property.type === AST_NODE_TYPES.Identifier && node.callee.property.name === "from";
|
|
1925
|
-
}
|
|
1926
1923
|
var RULE_NAME33 = "no-nested-component-definitions";
|
|
1927
1924
|
var RULE_FEATURES33 = [];
|
|
1928
1925
|
var no_nested_component_definitions_default = createRule({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.2-next.0",
|
|
4
4
|
"description": "A series of composable ESLint rules for for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"is-immutable-type": "^5.0.1",
|
|
51
51
|
"string-ts": "^2.2.1",
|
|
52
52
|
"ts-pattern": "^5.7.0",
|
|
53
|
-
"@eslint-react/core": "1.42.
|
|
54
|
-
"@eslint-react/ast": "1.42.
|
|
55
|
-
"@eslint-react/eff": "1.42.
|
|
56
|
-
"@eslint-react/jsx": "1.42.
|
|
57
|
-
"@eslint-react/kit": "1.42.
|
|
58
|
-
"@eslint-react/
|
|
59
|
-
"@eslint-react/
|
|
53
|
+
"@eslint-react/core": "1.42.2-next.0",
|
|
54
|
+
"@eslint-react/ast": "1.42.2-next.0",
|
|
55
|
+
"@eslint-react/eff": "1.42.2-next.0",
|
|
56
|
+
"@eslint-react/jsx": "1.42.2-next.0",
|
|
57
|
+
"@eslint-react/kit": "1.42.2-next.0",
|
|
58
|
+
"@eslint-react/var": "1.42.2-next.0",
|
|
59
|
+
"@eslint-react/shared": "1.42.2-next.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/react": "^19.1.0",
|