eslint-plugin-react-jsx 5.17.1 → 5.17.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.js +4 -2
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region package.json
|
|
28
28
|
var name$2 = "eslint-plugin-react-jsx";
|
|
29
|
-
var version = "5.17.
|
|
29
|
+
var version = "5.17.2";
|
|
30
30
|
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/utils/create-rule.ts
|
|
@@ -753,10 +753,12 @@ var no_key_after_spread_default = createRule({
|
|
|
753
753
|
defaultOptions: []
|
|
754
754
|
});
|
|
755
755
|
function create$4(context) {
|
|
756
|
+
if (!context.sourceCode.text.includes("key=")) return {};
|
|
756
757
|
const { jsx } = core.getJsxConfig(context);
|
|
757
758
|
if (jsx !== ts.JsxEmit.ReactJSX && jsx !== ts.JsxEmit.ReactJSXDev) return {};
|
|
759
|
+
const isJsxSpreadAttribute = Check.is(AST_NODE_TYPES.JSXSpreadAttribute);
|
|
758
760
|
return { JSXOpeningElement(node) {
|
|
759
|
-
for (const n of dropWhile(node.attributes, not(
|
|
761
|
+
for (const n of dropWhile(node.attributes, not(isJsxSpreadAttribute)).filter(isAttribute("key"))) context.report({
|
|
760
762
|
messageId: "default",
|
|
761
763
|
node: n
|
|
762
764
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-jsx",
|
|
3
|
-
"version": "5.17.
|
|
3
|
+
"version": "5.17.2",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React Flavored JSX rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -39,21 +39,21 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@typescript-eslint/types": "^8.64.0",
|
|
41
41
|
"@typescript-eslint/utils": "^8.64.0",
|
|
42
|
-
"@eslint-react/ast": "5.17.
|
|
43
|
-
"@eslint-react/
|
|
44
|
-
"@eslint-react/
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/
|
|
42
|
+
"@eslint-react/ast": "5.17.2",
|
|
43
|
+
"@eslint-react/core": "5.17.2",
|
|
44
|
+
"@eslint-react/jsx": "5.17.2",
|
|
45
|
+
"@eslint-react/shared": "5.17.2",
|
|
46
|
+
"@eslint-react/eslint": "5.17.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/react": "^19.2.17",
|
|
50
50
|
"@types/react-dom": "^19.2.3",
|
|
51
51
|
"dedent": "^1.7.2",
|
|
52
52
|
"eslint": "^10.7.0",
|
|
53
|
-
"tsdown": "^0.22.
|
|
53
|
+
"tsdown": "^0.22.9",
|
|
54
54
|
"typescript": "6.0.3",
|
|
55
|
-
"@local/
|
|
56
|
-
"@local/
|
|
55
|
+
"@local/eff": "0.0.0",
|
|
56
|
+
"@local/configs": "0.0.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"eslint": "*",
|