eslint-plugin-react-jsx 5.23.4 → 5.24.0-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 +11 -11
- package/package.json +7 -6
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.
|
|
29
|
+
var version = "5.24.0-beta.0";
|
|
30
30
|
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/utils/create-rule.ts
|
|
@@ -61,8 +61,8 @@ var no_children_prop_with_children_default = createRule({
|
|
|
61
61
|
hasSuggestions: true,
|
|
62
62
|
messages: {
|
|
63
63
|
default: "Do not pass 'children' as a prop when the element already has children content.",
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
"remove-children-content": "Remove the nested children content.",
|
|
65
|
+
"remove-children-prop": "Remove the 'children' prop."
|
|
66
66
|
},
|
|
67
67
|
schema: []
|
|
68
68
|
},
|
|
@@ -98,7 +98,7 @@ function create$7(context) {
|
|
|
98
98
|
fix(fixer) {
|
|
99
99
|
return removeJsxAttribute(context, fixer, prop);
|
|
100
100
|
},
|
|
101
|
-
messageId: "
|
|
101
|
+
messageId: "remove-children-prop"
|
|
102
102
|
}, {
|
|
103
103
|
fix(fixer) {
|
|
104
104
|
const first = node.children.at(0);
|
|
@@ -106,7 +106,7 @@ function create$7(context) {
|
|
|
106
106
|
if (first == null || last == null) return [];
|
|
107
107
|
return fixer.removeRange([first.range[0], last.range[1]]);
|
|
108
108
|
},
|
|
109
|
-
messageId: "
|
|
109
|
+
messageId: "remove-children-content"
|
|
110
110
|
}]
|
|
111
111
|
});
|
|
112
112
|
}
|
|
@@ -124,7 +124,7 @@ var no_children_prop_default = createRule({
|
|
|
124
124
|
hasSuggestions: true,
|
|
125
125
|
messages: {
|
|
126
126
|
default: "Do not pass 'children' as props.",
|
|
127
|
-
|
|
127
|
+
"move-children-to-content": "Move 'children' to element content."
|
|
128
128
|
},
|
|
129
129
|
schema: []
|
|
130
130
|
},
|
|
@@ -165,7 +165,7 @@ function create$6(context) {
|
|
|
165
165
|
node: prop,
|
|
166
166
|
suggest: [{
|
|
167
167
|
fix: buildFix$1(context, node, prop, childrenText),
|
|
168
|
-
messageId: "
|
|
168
|
+
messageId: "move-children-to-content"
|
|
169
169
|
}]
|
|
170
170
|
});
|
|
171
171
|
}
|
|
@@ -758,7 +758,7 @@ var no_leaked_dollar_default = createRule({
|
|
|
758
758
|
hasSuggestions: true,
|
|
759
759
|
messages: {
|
|
760
760
|
default: "Leaked '$' in JSX. This '$' will be rendered as text nodes.",
|
|
761
|
-
|
|
761
|
+
"remove-dollar-sign": "Remove the text node '$'."
|
|
762
762
|
},
|
|
763
763
|
schema: []
|
|
764
764
|
},
|
|
@@ -787,7 +787,7 @@ function create$3(context) {
|
|
|
787
787
|
fix(fixer) {
|
|
788
788
|
return fixer.removeRange([dollarStart, dollarEnd]);
|
|
789
789
|
},
|
|
790
|
-
messageId: "
|
|
790
|
+
messageId: "remove-dollar-sign"
|
|
791
791
|
}]
|
|
792
792
|
});
|
|
793
793
|
}
|
|
@@ -818,7 +818,7 @@ var no_leaked_semicolon_default = createRule({
|
|
|
818
818
|
hasSuggestions: true,
|
|
819
819
|
messages: {
|
|
820
820
|
default: "Leaked ';' in JSX. This ';' will be rendered as text nodes.",
|
|
821
|
-
|
|
821
|
+
"remove-semicolon": "Remove the text node ';'."
|
|
822
822
|
},
|
|
823
823
|
schema: []
|
|
824
824
|
},
|
|
@@ -837,7 +837,7 @@ function create$2(context) {
|
|
|
837
837
|
fix(fixer) {
|
|
838
838
|
return fixer.removeRange([node.range[0], node.range[0] + 1]);
|
|
839
839
|
},
|
|
840
|
-
messageId: "
|
|
840
|
+
messageId: "remove-semicolon"
|
|
841
841
|
}]
|
|
842
842
|
});
|
|
843
843
|
} };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-jsx",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.24.0-beta.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React Flavored JSX rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -37,17 +37,18 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@eslint-react/ast": "5.
|
|
41
|
-
"@eslint-react/core": "5.
|
|
42
|
-
"@eslint-react/eslint": "5.
|
|
43
|
-
"@eslint-react/jsx": "5.
|
|
44
|
-
"@eslint-react/shared": "5.
|
|
40
|
+
"@eslint-react/ast": "5.24.0-beta.0",
|
|
41
|
+
"@eslint-react/core": "5.24.0-beta.0",
|
|
42
|
+
"@eslint-react/eslint": "5.24.0-beta.0",
|
|
43
|
+
"@eslint-react/jsx": "5.24.0-beta.0",
|
|
44
|
+
"@eslint-react/shared": "5.24.0-beta.0",
|
|
45
45
|
"@typescript-eslint/types": "^8.71.0",
|
|
46
46
|
"@typescript-eslint/utils": "^8.71.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@local/configs": "0.0.0",
|
|
50
50
|
"@local/eff": "0.0.0",
|
|
51
|
+
"@local/testkit": "0.0.0",
|
|
51
52
|
"@types/react": "^19.3.0",
|
|
52
53
|
"@types/react-dom": "^19.3.0",
|
|
53
54
|
"dedent": "^1.7.2",
|