eslint-plugin-react-jsx 5.8.2 → 5.8.4-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 +12 -12
- package/package.json +8 -8
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.8.
|
|
29
|
+
var version = "5.8.4-beta.0";
|
|
30
30
|
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/utils/create-rule.ts
|
|
@@ -221,6 +221,17 @@ var no_children_prop_default = createRule({
|
|
|
221
221
|
});
|
|
222
222
|
function create$6(context) {
|
|
223
223
|
return merge({
|
|
224
|
+
CallExpression(node) {
|
|
225
|
+
if (!core.isCreateElementCall(context, node)) return;
|
|
226
|
+
const [, propsArg] = node.arguments;
|
|
227
|
+
if (propsArg == null || propsArg.type !== AST_NODE_TYPES.ObjectExpression) return;
|
|
228
|
+
const childrenProp = findChildrenProperty(propsArg);
|
|
229
|
+
if (childrenProp == null) return;
|
|
230
|
+
context.report({
|
|
231
|
+
messageId: "default",
|
|
232
|
+
node: childrenProp
|
|
233
|
+
});
|
|
234
|
+
},
|
|
224
235
|
JSXElement(node) {
|
|
225
236
|
const childrenProp = findAttribute(context, node, "children");
|
|
226
237
|
if (childrenProp == null) return;
|
|
@@ -261,17 +272,6 @@ function create$6(context) {
|
|
|
261
272
|
messageId: "moveChildrenToContent"
|
|
262
273
|
}]
|
|
263
274
|
});
|
|
264
|
-
},
|
|
265
|
-
CallExpression(node) {
|
|
266
|
-
if (!core.isCreateElementCall(context, node)) return;
|
|
267
|
-
const [, propsArg] = node.arguments;
|
|
268
|
-
if (propsArg == null || propsArg.type !== AST_NODE_TYPES.ObjectExpression) return;
|
|
269
|
-
const childrenProp = findChildrenProperty(propsArg);
|
|
270
|
-
if (childrenProp == null) return;
|
|
271
|
-
context.report({
|
|
272
|
-
messageId: "default",
|
|
273
|
-
node: childrenProp
|
|
274
|
-
});
|
|
275
275
|
}
|
|
276
276
|
});
|
|
277
277
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-jsx",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.4-beta.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React Flavored JSX rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@typescript-eslint/types": "^8.59.3",
|
|
41
41
|
"@typescript-eslint/utils": "^8.59.3",
|
|
42
|
-
"@eslint-react/ast": "5.8.
|
|
43
|
-
"@eslint-react/core": "5.8.
|
|
44
|
-
"@eslint-react/eslint": "5.8.
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/
|
|
42
|
+
"@eslint-react/ast": "5.8.4-beta.0",
|
|
43
|
+
"@eslint-react/core": "5.8.4-beta.0",
|
|
44
|
+
"@eslint-react/eslint": "5.8.4-beta.0",
|
|
45
|
+
"@eslint-react/shared": "5.8.4-beta.0",
|
|
46
|
+
"@eslint-react/jsx": "5.8.4-beta.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/react": "^19.2.14",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"eslint": "^10.4.0",
|
|
54
54
|
"tsdown": "^0.22.0",
|
|
55
55
|
"typescript": "^6.0.3",
|
|
56
|
-
"@local/
|
|
57
|
-
"@local/
|
|
56
|
+
"@local/configs": "0.0.0",
|
|
57
|
+
"@local/eff": "3.0.0-beta.72"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"eslint": "^10.3.0",
|