eslint-plugin-react-x 1.19.0-next.2 → 1.19.0-next.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/README.md CHANGED
@@ -75,8 +75,6 @@ export default [
75
75
 
76
76
  | Rule | Description | 💼 | 💭 | |
77
77
  | :--------------------------------------- | :--------------------------------------------------------------------------------------------------- | :-: | :-: | :-: |
78
- | `avoid-shorthand-boolean` | Prevents using shorthand syntax for boolean attributes. | 🎨 | | 🔧 |
79
- | `avoid-shorthand-fragment` | Prevents using shorthand syntax for fragments. | 🎨 | | |
80
78
  | `ensure-forward-ref-using-ref` | Requires that components wrapped with `forwardRef` must have a `ref` parameter. | ✔️ | | |
81
79
  | `jsx-no-duplicate-props` | Prevents duplicate props in JSX. | ✔️ | | |
82
80
  | `jsx-uses-vars` | Prevents variables used in JSX to be marked as unused. | ✔️ | | |
package/dist/index.js CHANGED
@@ -41,7 +41,7 @@ var ts__default = /*#__PURE__*/_interopDefault(ts);
41
41
 
42
42
  // package.json
43
43
  var name = "eslint-plugin-react-x";
44
- var version = "1.19.0-next.2";
44
+ var version = "1.19.0-next.4";
45
45
  var createRule = shared.createRuleForPlugin("x");
46
46
 
47
47
  // src/rules/avoid-shorthand-boolean.ts
@@ -1195,8 +1195,10 @@ function getFix(node, context) {
1195
1195
  const [componentNode] = node.arguments;
1196
1196
  if (!componentNode || !AST11__namespace.isFunction(componentNode)) return [];
1197
1197
  return [
1198
+ // unwrap component from forwardRef call
1198
1199
  fixer.removeRange([node.range[0], componentNode.range[0]]),
1199
1200
  fixer.removeRange([componentNode.range[1], node.range[1]]),
1201
+ // update component props and ref arguments to match the new signature
1200
1202
  ...getComponentPropsFixes(
1201
1203
  componentNode,
1202
1204
  node.typeArguments?.params ?? [],
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.19.0-next.2";
17
+ var version = "1.19.0-next.4";
18
18
  var createRule = createRuleForPlugin("x");
19
19
 
20
20
  // src/rules/avoid-shorthand-boolean.ts
@@ -1168,8 +1168,10 @@ function getFix(node, context) {
1168
1168
  const [componentNode] = node.arguments;
1169
1169
  if (!componentNode || !AST11.isFunction(componentNode)) return [];
1170
1170
  return [
1171
+ // unwrap component from forwardRef call
1171
1172
  fixer.removeRange([node.range[0], componentNode.range[0]]),
1172
1173
  fixer.removeRange([componentNode.range[1], node.range[1]]),
1174
+ // update component props and ref arguments to match the new signature
1173
1175
  ...getComponentPropsFixes(
1174
1176
  componentNode,
1175
1177
  node.typeArguments?.params ?? [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "1.19.0-next.2",
3
+ "version": "1.19.0-next.4",
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",
@@ -42,24 +42,24 @@
42
42
  "./package.json"
43
43
  ],
44
44
  "dependencies": {
45
- "@typescript-eslint/scope-manager": "^8.17.0",
46
- "@typescript-eslint/type-utils": "^8.17.0",
47
- "@typescript-eslint/types": "^8.17.0",
48
- "@typescript-eslint/utils": "^8.17.0",
45
+ "@typescript-eslint/scope-manager": "^8.18.0",
46
+ "@typescript-eslint/type-utils": "^8.18.0",
47
+ "@typescript-eslint/types": "^8.18.0",
48
+ "@typescript-eslint/utils": "^8.18.0",
49
49
  "compare-versions": "^6.1.1",
50
50
  "is-immutable-type": "^5.0.0",
51
51
  "ts-pattern": "^5.5.0",
52
- "@eslint-react/ast": "1.19.0-next.2",
53
- "@eslint-react/jsx": "1.19.0-next.2",
54
- "@eslint-react/shared": "1.19.0-next.2",
55
- "@eslint-react/tools": "1.19.0-next.2",
56
- "@eslint-react/types": "1.19.0-next.2",
57
- "@eslint-react/var": "1.19.0-next.2",
58
- "@eslint-react/core": "1.19.0-next.2"
52
+ "@eslint-react/ast": "1.19.0-next.4",
53
+ "@eslint-react/core": "1.19.0-next.4",
54
+ "@eslint-react/jsx": "1.19.0-next.4",
55
+ "@eslint-react/types": "1.19.0-next.4",
56
+ "@eslint-react/shared": "1.19.0-next.4",
57
+ "@eslint-react/var": "1.19.0-next.4",
58
+ "@eslint-react/tools": "1.19.0-next.4"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/react": "^19.0.1",
62
- "@types/react-dom": "^19.0.1",
62
+ "@types/react-dom": "^19.0.2",
63
63
  "string-ts": "^2.2.0",
64
64
  "ts-api-utils": "^2.0.0",
65
65
  "tsup": "^8.3.5"