eslint-plugin-react-x 1.16.2 → 1.17.0-beta.1
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 +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -41,7 +41,7 @@ var ts25__default = /*#__PURE__*/_interopDefault(ts25);
|
|
|
41
41
|
|
|
42
42
|
// package.json
|
|
43
43
|
var name = "eslint-plugin-react-x";
|
|
44
|
-
var version = "1.
|
|
44
|
+
var version = "1.17.0-beta.1";
|
|
45
45
|
var createRule = shared.createRuleForPlugin("x");
|
|
46
46
|
|
|
47
47
|
// src/rules/avoid-shorthand-boolean.ts
|
|
@@ -4114,6 +4114,7 @@ function check(node, context, allowExpressions) {
|
|
|
4114
4114
|
if (JSX7__namespace.isKeyedElement(node, initialScope)) return;
|
|
4115
4115
|
if (JSX7__namespace.isBuiltInElement(node.parent)) context.report({ messageId: "noUselessFragmentInBuiltIn", node });
|
|
4116
4116
|
if (node.children.length === 0) return context.report({ messageId: "noUselessFragment", node });
|
|
4117
|
+
if (node.children.some((child) => JSX7__namespace.isLiteral(child) && child.value !== child.raw)) return;
|
|
4117
4118
|
const isChildren = AST11__namespace.isOneOf([types.AST_NODE_TYPES.JSXElement, types.AST_NODE_TYPES.JSXFragment])(node.parent);
|
|
4118
4119
|
const [firstChildren] = node.children;
|
|
4119
4120
|
if (allowExpressions && node.children.length === 1 && JSX7__namespace.isLiteral(firstChildren) && !isChildren) return;
|
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { getTypeImmutability, isUnknown, isImmutable, isReadonlyShallow, isReado
|
|
|
14
14
|
|
|
15
15
|
// package.json
|
|
16
16
|
var name = "eslint-plugin-react-x";
|
|
17
|
-
var version = "1.
|
|
17
|
+
var version = "1.17.0-beta.1";
|
|
18
18
|
var createRule = createRuleForPlugin("x");
|
|
19
19
|
|
|
20
20
|
// src/rules/avoid-shorthand-boolean.ts
|
|
@@ -4087,6 +4087,7 @@ function check(node, context, allowExpressions) {
|
|
|
4087
4087
|
if (JSX7.isKeyedElement(node, initialScope)) return;
|
|
4088
4088
|
if (JSX7.isBuiltInElement(node.parent)) context.report({ messageId: "noUselessFragmentInBuiltIn", node });
|
|
4089
4089
|
if (node.children.length === 0) return context.report({ messageId: "noUselessFragment", node });
|
|
4090
|
+
if (node.children.some((child) => JSX7.isLiteral(child) && child.value !== child.raw)) return;
|
|
4090
4091
|
const isChildren = AST11.isOneOf([AST_NODE_TYPES.JSXElement, AST_NODE_TYPES.JSXFragment])(node.parent);
|
|
4091
4092
|
const [firstChildren] = node.children;
|
|
4092
4093
|
if (allowExpressions && node.children.length === 1 && JSX7.isLiteral(firstChildren) && !isChildren) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0-beta.1",
|
|
4
4
|
"description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"@typescript-eslint/utils": "^8.15.0",
|
|
49
49
|
"is-immutable-type": "5.0.0",
|
|
50
50
|
"ts-pattern": "^5.5.0",
|
|
51
|
-
"@eslint-react/ast": "1.
|
|
52
|
-
"@eslint-react/
|
|
53
|
-
"@eslint-react/jsx": "1.
|
|
54
|
-
"@eslint-react/tools": "1.
|
|
55
|
-
"@eslint-react/types": "1.
|
|
56
|
-
"@eslint-react/
|
|
57
|
-
"@eslint-react/
|
|
51
|
+
"@eslint-react/ast": "1.17.0-beta.1",
|
|
52
|
+
"@eslint-react/core": "1.17.0-beta.1",
|
|
53
|
+
"@eslint-react/jsx": "1.17.0-beta.1",
|
|
54
|
+
"@eslint-react/tools": "1.17.0-beta.1",
|
|
55
|
+
"@eslint-react/types": "1.17.0-beta.1",
|
|
56
|
+
"@eslint-react/shared": "1.17.0-beta.1",
|
|
57
|
+
"@eslint-react/var": "1.17.0-beta.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/react": "^18.3.12",
|