eslint-plugin-react-jsx 4.0.2-beta.6 → 4.0.3-beta.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 +4 -3
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region package.json
|
|
25
25
|
var name$2 = "eslint-plugin-react-jsx";
|
|
26
|
-
var version = "4.0.
|
|
26
|
+
var version = "4.0.3-beta.0";
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/utils/create-rule.ts
|
|
@@ -111,7 +111,8 @@ function getChildrenSourceText(context, node) {
|
|
|
111
111
|
const opener = node.type === AST_NODE_TYPES.JSXFragment ? node.openingFragment : node.openingElement;
|
|
112
112
|
const closer = node.type === AST_NODE_TYPES.JSXFragment ? node.closingFragment : node.closingElement;
|
|
113
113
|
if (opener.type === AST_NODE_TYPES.JSXOpeningElement && opener.selfClosing) return "";
|
|
114
|
-
|
|
114
|
+
if (closer == null) return "";
|
|
115
|
+
return sourceCode.text.slice(opener.range[1], closer.range[0]);
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
//#endregion
|
|
@@ -288,7 +289,7 @@ function create$2(context) {
|
|
|
288
289
|
continue;
|
|
289
290
|
}
|
|
290
291
|
if (firstSpreadPropIndex == null) continue;
|
|
291
|
-
if (prop.name.name === "key" && index > firstSpreadPropIndex) context.report({
|
|
292
|
+
if (prop.name.type === AST_NODE_TYPES.JSXIdentifier && prop.name.name === "key" && index > firstSpreadPropIndex) context.report({
|
|
292
293
|
messageId: "noKeyAfterSpread",
|
|
293
294
|
node: prop
|
|
294
295
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-jsx",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3-beta.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React Flavored JSX rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"@typescript-eslint/utils": "^8.57.2",
|
|
44
44
|
"compare-versions": "^6.1.1",
|
|
45
45
|
"ts-pattern": "^5.9.0",
|
|
46
|
-
"@eslint-react/ast": "4.0.
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/
|
|
49
|
-
"@eslint-react/var": "4.0.
|
|
50
|
-
"@eslint-react/
|
|
46
|
+
"@eslint-react/ast": "4.0.3-beta.0",
|
|
47
|
+
"@eslint-react/core": "4.0.3-beta.0",
|
|
48
|
+
"@eslint-react/jsx": "4.0.3-beta.0",
|
|
49
|
+
"@eslint-react/var": "4.0.3-beta.0",
|
|
50
|
+
"@eslint-react/shared": "4.0.3-beta.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/react": "^19.2.14",
|