eslint-plugin-react-x 1.15.1-next.9 → 1.15.2-next.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 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.9";
44
+ var version = "1.15.2-next.0";
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 {
@@ -2310,7 +2312,8 @@ var no_useless_fragment_default = createRule({
2310
2312
  additionalProperties: false,
2311
2313
  properties: {
2312
2314
  allowExpressions: {
2313
- type: "boolean"
2315
+ type: "boolean",
2316
+ description: "Allow fragments with a single expression child"
2314
2317
  }
2315
2318
  }
2316
2319
  }]
@@ -2498,6 +2501,7 @@ var prefer_shorthand_boolean_default = createRule({
2498
2501
  docs: {
2499
2502
  description: "enforce using shorthand boolean attributes"
2500
2503
  },
2504
+ fixable: "code",
2501
2505
  messages: {
2502
2506
  preferShorthandBoolean: "Use shorthand boolean attribute '{{propName}}'."
2503
2507
  },
@@ -2515,7 +2519,8 @@ var prefer_shorthand_boolean_default = createRule({
2515
2519
  node,
2516
2520
  data: {
2517
2521
  propName
2518
- }
2522
+ },
2523
+ fix: (fixer) => fixer.removeRange([node.name.range[1], value.range[1]])
2519
2524
  });
2520
2525
  }
2521
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.9";
17
+ var version = "1.15.2-next.0";
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 {
@@ -2283,7 +2285,8 @@ var no_useless_fragment_default = createRule({
2283
2285
  additionalProperties: false,
2284
2286
  properties: {
2285
2287
  allowExpressions: {
2286
- type: "boolean"
2288
+ type: "boolean",
2289
+ description: "Allow fragments with a single expression child"
2287
2290
  }
2288
2291
  }
2289
2292
  }]
@@ -2471,6 +2474,7 @@ var prefer_shorthand_boolean_default = createRule({
2471
2474
  docs: {
2472
2475
  description: "enforce using shorthand boolean attributes"
2473
2476
  },
2477
+ fixable: "code",
2474
2478
  messages: {
2475
2479
  preferShorthandBoolean: "Use shorthand boolean attribute '{{propName}}'."
2476
2480
  },
@@ -2488,7 +2492,8 @@ var prefer_shorthand_boolean_default = createRule({
2488
2492
  node,
2489
2493
  data: {
2490
2494
  propName
2491
- }
2495
+ },
2496
+ fix: (fixer) => fixer.removeRange([node.name.range[1], value.range[1]])
2492
2497
  });
2493
2498
  }
2494
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.9",
3
+ "version": "1.15.2-next.0",
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,20 +48,20 @@
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/ast": "1.15.1-next.9",
52
- "@eslint-react/shared": "1.15.1-next.9",
53
- "@eslint-react/jsx": "1.15.1-next.9",
54
- "@eslint-react/core": "1.15.1-next.9",
55
- "@eslint-react/tools": "1.15.1-next.9",
56
- "@eslint-react/types": "1.15.1-next.9",
57
- "@eslint-react/var": "1.15.1-next.9"
51
+ "@eslint-react/core": "1.15.2-next.0",
52
+ "@eslint-react/jsx": "1.15.2-next.0",
53
+ "@eslint-react/shared": "1.15.2-next.0",
54
+ "@eslint-react/tools": "1.15.2-next.0",
55
+ "@eslint-react/types": "1.15.2-next.0",
56
+ "@eslint-react/var": "1.15.2-next.0",
57
+ "@eslint-react/ast": "1.15.2-next.0"
58
58
  },
59
59
  "devDependencies": {
60
- "@types/react": "^18.3.11",
60
+ "@types/react": "^18.3.12",
61
61
  "@types/react-dom": "^18.3.1",
62
62
  "string-ts": "^2.2.0",
63
63
  "ts-api-utils": "^1.3.0",
64
- "tsup": "^8.3.0"
64
+ "tsup": "^8.3.5"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "eslint": "^8.57.0 || ^9.0.0",