eslint-plugin-react-jsx 5.27.2 → 5.27.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 +4 -2
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region package.json
|
|
22
22
|
var name$2 = "eslint-plugin-react-jsx";
|
|
23
|
-
var version = "5.27.
|
|
23
|
+
var version = "5.27.4";
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/utils/create-rule.ts
|
|
26
26
|
function getDocsUrl(ruleName) {
|
|
@@ -112,6 +112,7 @@ function create$6(context) {
|
|
|
112
112
|
CallExpression(node) {
|
|
113
113
|
const prop = core.getCreateElementProp(context, node, "children");
|
|
114
114
|
if (prop == null) return;
|
|
115
|
+
if (core.getCreateElementChildrenArguments(context, node).length > 0) return;
|
|
115
116
|
context.report({
|
|
116
117
|
messageId: "default",
|
|
117
118
|
node: prop
|
|
@@ -120,6 +121,7 @@ function create$6(context) {
|
|
|
120
121
|
JSXElement(node) {
|
|
121
122
|
const prop = findAttribute(context, node, "children");
|
|
122
123
|
if (prop == null) return;
|
|
124
|
+
if (hasChildren(node)) return;
|
|
123
125
|
if (prop.type !== AST_NODE_TYPES.JSXAttribute) {
|
|
124
126
|
context.report({
|
|
125
127
|
messageId: "default",
|
|
@@ -300,7 +302,7 @@ var no_key_after_spread_default = createRule({
|
|
|
300
302
|
create: create$4
|
|
301
303
|
});
|
|
302
304
|
function create$4(context) {
|
|
303
|
-
if (
|
|
305
|
+
if (!/key\s*=/.test(context.sourceCode.text)) return {};
|
|
304
306
|
const { jsx } = core.getJsxConfig(context);
|
|
305
307
|
if (jsx !== ts.JsxEmit.ReactJSX && jsx !== ts.JsxEmit.ReactJSXDev) return {};
|
|
306
308
|
return { JSXOpeningElement(node) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-jsx",
|
|
3
|
-
"version": "5.27.
|
|
3
|
+
"version": "5.27.4",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React Flavored JSX rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@eslint-react/ast": "5.27.
|
|
41
|
-
"@eslint-react/core": "5.27.
|
|
42
|
-
"@eslint-react/eslint": "5.27.
|
|
43
|
-
"@eslint-react/jsx": "5.27.
|
|
44
|
-
"@eslint-react/shared": "5.27.
|
|
40
|
+
"@eslint-react/ast": "5.27.4",
|
|
41
|
+
"@eslint-react/core": "5.27.4",
|
|
42
|
+
"@eslint-react/eslint": "5.27.4",
|
|
43
|
+
"@eslint-react/jsx": "5.27.4",
|
|
44
|
+
"@eslint-react/shared": "5.27.4",
|
|
45
45
|
"@typescript-eslint/types": "^8.71.2",
|
|
46
46
|
"@typescript-eslint/utils": "^8.71.2"
|
|
47
47
|
},
|