eslint-plugin-react-x 2.6.1-beta.0 → 2.6.1-beta.2

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.d.ts CHANGED
@@ -4,8 +4,8 @@ import * as _eslint_react_shared0 from "@eslint-react/shared";
4
4
  declare const _default: {
5
5
  configs: {
6
6
  /**
7
- * Enforce rules that are recommended by ESLint React for general purpose React + React DOM projects
8
- */
7
+ * Enforce rules that are recommended by ESLint React for general purpose React + React DOM projects
8
+ */
9
9
  recommended: {
10
10
  plugins: {};
11
11
  name?: string;
@@ -13,8 +13,8 @@ declare const _default: {
13
13
  settings?: _eslint_react_shared0.SettingsConfig;
14
14
  };
15
15
  /**
16
- * Same as the `recommended` preset but disables rules that can be enforced by TypeScript
17
- */
16
+ * Same as the `recommended` preset but disables rules that can be enforced by TypeScript
17
+ */
18
18
  "recommended-typescript": {
19
19
  plugins: {};
20
20
  name?: string;
@@ -22,8 +22,8 @@ declare const _default: {
22
22
  settings?: _eslint_react_shared0.SettingsConfig;
23
23
  };
24
24
  /**
25
- * Same as the `recommended-typescript` preset but enables additional rules that require type information
26
- */
25
+ * Same as the `recommended-typescript` preset but enables additional rules that require type information
26
+ */
27
27
  "recommended-type-checked": {
28
28
  plugins: {};
29
29
  name?: string;
@@ -31,8 +31,8 @@ declare const _default: {
31
31
  settings?: _eslint_react_shared0.SettingsConfig;
32
32
  };
33
33
  /**
34
- * More strict version of the `recommended` preset
35
- */
34
+ * More strict version of the `recommended` preset
35
+ */
36
36
  strict: {
37
37
  plugins: {};
38
38
  name?: string;
@@ -40,8 +40,8 @@ declare const _default: {
40
40
  settings?: _eslint_react_shared0.SettingsConfig;
41
41
  };
42
42
  /**
43
- * Same as the `strict` preset but enables additional rules that require type information
44
- */
43
+ * Same as the `strict` preset but enables additional rules that require type information
44
+ */
45
45
  "strict-typescript": {
46
46
  plugins: {};
47
47
  name?: string;
@@ -49,8 +49,8 @@ declare const _default: {
49
49
  settings?: _eslint_react_shared0.SettingsConfig;
50
50
  };
51
51
  /**
52
- * Same as the `strict-typescript` preset but enables additional rules that require type information
53
- */
52
+ * Same as the `strict-typescript` preset but enables additional rules that require type information
53
+ */
54
54
  "strict-type-checked": {
55
55
  plugins: {};
56
56
  name?: string;
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ var __exportAll = (all, symbols) => {
34
34
  //#endregion
35
35
  //#region package.json
36
36
  var name$6 = "eslint-plugin-react-x";
37
- var version = "2.6.1-beta.0";
37
+ var version = "2.6.1-beta.2";
38
38
 
39
39
  //#endregion
40
40
  //#region src/utils/create-rule.ts
@@ -2316,6 +2316,7 @@ var no_unnecessary_use_ref_default = createRule({
2316
2316
  defaultOptions: []
2317
2317
  });
2318
2318
  function create$16(context) {
2319
+ if (!context.sourceCode.text.includes("useRef")) return {};
2319
2320
  return { VariableDeclarator(node) {
2320
2321
  const { id, init } = node;
2321
2322
  if (id.type !== AST_NODE_TYPES.Identifier || init == null || !isUseRefCall(init)) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "2.6.1-beta.0",
3
+ "version": "2.6.1-beta.2",
4
4
  "description": "A set of composable ESLint rules for for libraries and frameworks that use React as a UI runtime.",
5
5
  "keywords": [
6
6
  "react",
@@ -46,16 +46,16 @@
46
46
  "string-ts": "^2.3.1",
47
47
  "ts-api-utils": "^2.4.0",
48
48
  "ts-pattern": "^5.9.0",
49
- "@eslint-react/ast": "2.6.1-beta.0",
50
- "@eslint-react/shared": "2.6.1-beta.0",
51
- "@eslint-react/var": "2.6.1-beta.0",
52
- "@eslint-react/core": "2.6.1-beta.0",
53
- "@eslint-react/eff": "2.6.1-beta.0"
49
+ "@eslint-react/ast": "2.6.1-beta.2",
50
+ "@eslint-react/shared": "2.6.1-beta.2",
51
+ "@eslint-react/core": "2.6.1-beta.2",
52
+ "@eslint-react/var": "2.6.1-beta.2",
53
+ "@eslint-react/eff": "2.6.1-beta.2"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/react": "^19.2.8",
57
57
  "@types/react-dom": "^19.2.3",
58
- "tsdown": "^0.20.0-beta.2",
58
+ "tsdown": "^0.20.0-beta.3",
59
59
  "@local/configs": "0.0.0"
60
60
  },
61
61
  "peerDependencies": {