eslint-plugin-react-x 1.15.1-next.13 → 1.15.1-next.14
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 +7 -3
- package/dist/index.mjs +7 -3
- 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.15.1-next.
|
|
44
|
+
var version = "1.15.1-next.14";
|
|
45
45
|
var createRule = shared.createRuleForPlugin("x");
|
|
46
46
|
|
|
47
47
|
// src/rules/avoid-shorthand-boolean.ts
|
|
@@ -52,6 +52,7 @@ var avoid_shorthand_boolean_default = createRule({
|
|
|
52
52
|
docs: {
|
|
53
53
|
description: "disallow using shorthand boolean attributes"
|
|
54
54
|
},
|
|
55
|
+
fixable: "code",
|
|
55
56
|
messages: {
|
|
56
57
|
avoidShorthandBoolean: "Avoid using shorthand boolean attribute '{{propName}}'. Use '{{propName}}={true}' instead."
|
|
57
58
|
},
|
|
@@ -65,7 +66,8 @@ var avoid_shorthand_boolean_default = createRule({
|
|
|
65
66
|
node,
|
|
66
67
|
data: {
|
|
67
68
|
propName: JSX7__namespace.getPropName(node)
|
|
68
|
-
}
|
|
69
|
+
},
|
|
70
|
+
fix: (fixer) => fixer.insertTextAfter(node.name, `={true}`)
|
|
69
71
|
});
|
|
70
72
|
}
|
|
71
73
|
return {
|
|
@@ -2499,6 +2501,7 @@ var prefer_shorthand_boolean_default = createRule({
|
|
|
2499
2501
|
docs: {
|
|
2500
2502
|
description: "enforce using shorthand boolean attributes"
|
|
2501
2503
|
},
|
|
2504
|
+
fixable: "code",
|
|
2502
2505
|
messages: {
|
|
2503
2506
|
preferShorthandBoolean: "Use shorthand boolean attribute '{{propName}}'."
|
|
2504
2507
|
},
|
|
@@ -2516,7 +2519,8 @@ var prefer_shorthand_boolean_default = createRule({
|
|
|
2516
2519
|
node,
|
|
2517
2520
|
data: {
|
|
2518
2521
|
propName
|
|
2519
|
-
}
|
|
2522
|
+
},
|
|
2523
|
+
fix: (fixer) => fixer.removeRange([node.name.range[1], value.range[1]])
|
|
2520
2524
|
});
|
|
2521
2525
|
}
|
|
2522
2526
|
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.15.1-next.
|
|
17
|
+
var version = "1.15.1-next.14";
|
|
18
18
|
var createRule = createRuleForPlugin("x");
|
|
19
19
|
|
|
20
20
|
// src/rules/avoid-shorthand-boolean.ts
|
|
@@ -25,6 +25,7 @@ var avoid_shorthand_boolean_default = createRule({
|
|
|
25
25
|
docs: {
|
|
26
26
|
description: "disallow using shorthand boolean attributes"
|
|
27
27
|
},
|
|
28
|
+
fixable: "code",
|
|
28
29
|
messages: {
|
|
29
30
|
avoidShorthandBoolean: "Avoid using shorthand boolean attribute '{{propName}}'. Use '{{propName}}={true}' instead."
|
|
30
31
|
},
|
|
@@ -38,7 +39,8 @@ var avoid_shorthand_boolean_default = createRule({
|
|
|
38
39
|
node,
|
|
39
40
|
data: {
|
|
40
41
|
propName: JSX7.getPropName(node)
|
|
41
|
-
}
|
|
42
|
+
},
|
|
43
|
+
fix: (fixer) => fixer.insertTextAfter(node.name, `={true}`)
|
|
42
44
|
});
|
|
43
45
|
}
|
|
44
46
|
return {
|
|
@@ -2472,6 +2474,7 @@ var prefer_shorthand_boolean_default = createRule({
|
|
|
2472
2474
|
docs: {
|
|
2473
2475
|
description: "enforce using shorthand boolean attributes"
|
|
2474
2476
|
},
|
|
2477
|
+
fixable: "code",
|
|
2475
2478
|
messages: {
|
|
2476
2479
|
preferShorthandBoolean: "Use shorthand boolean attribute '{{propName}}'."
|
|
2477
2480
|
},
|
|
@@ -2489,7 +2492,8 @@ var prefer_shorthand_boolean_default = createRule({
|
|
|
2489
2492
|
node,
|
|
2490
2493
|
data: {
|
|
2491
2494
|
propName
|
|
2492
|
-
}
|
|
2495
|
+
},
|
|
2496
|
+
fix: (fixer) => fixer.removeRange([node.name.range[1], value.range[1]])
|
|
2493
2497
|
});
|
|
2494
2498
|
}
|
|
2495
2499
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "1.15.1-next.
|
|
3
|
+
"version": "1.15.1-next.14",
|
|
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.11.0",
|
|
49
49
|
"is-immutable-type": "5.0.0",
|
|
50
50
|
"ts-pattern": "^5.5.0",
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/
|
|
53
|
-
"@eslint-react/
|
|
54
|
-
"@eslint-react/shared": "1.15.1-next.
|
|
55
|
-
"@eslint-react/types": "1.15.1-next.
|
|
56
|
-
"@eslint-react/tools": "1.15.1-next.
|
|
57
|
-
"@eslint-react/var": "1.15.1-next.
|
|
51
|
+
"@eslint-react/jsx": "1.15.1-next.14",
|
|
52
|
+
"@eslint-react/ast": "1.15.1-next.14",
|
|
53
|
+
"@eslint-react/core": "1.15.1-next.14",
|
|
54
|
+
"@eslint-react/shared": "1.15.1-next.14",
|
|
55
|
+
"@eslint-react/types": "1.15.1-next.14",
|
|
56
|
+
"@eslint-react/tools": "1.15.1-next.14",
|
|
57
|
+
"@eslint-react/var": "1.15.1-next.14"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/react": "^18.3.12",
|