eslint-plugin-react-naming-convention 5.2.1-next.1 → 5.2.2-beta.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.
Files changed (2) hide show
  1. package/dist/index.js +7 -7
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as core from "@eslint-react/core";
2
2
  import { merge } from "@eslint-react/eslint";
3
- import { findEnclosingAssignmentTarget } from "@eslint-react/var";
3
+ import { resolveEnclosingAssignmentTarget } from "@eslint-react/var";
4
4
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
5
5
  import { P, match } from "ts-pattern";
6
6
  import { ESLintUtils } from "@typescript-eslint/utils";
7
- import * as ast from "@eslint-react/ast";
7
+ import { Extract } from "@eslint-react/ast";
8
8
 
9
9
  //#region \0rolldown/runtime.js
10
10
  var __defProp = Object.defineProperty;
@@ -25,7 +25,7 @@ var __exportAll = (all, no_symbols) => {
25
25
  //#endregion
26
26
  //#region package.json
27
27
  var name$1 = "eslint-plugin-react-naming-convention";
28
- var version = "5.2.1-next.1";
28
+ var version = "5.2.2-beta.0";
29
29
 
30
30
  //#endregion
31
31
  //#region src/utils/create-rule.ts
@@ -52,7 +52,7 @@ function create$2(context) {
52
52
  if (!context.sourceCode.text.includes("createContext")) return {};
53
53
  return merge({ CallExpression(node) {
54
54
  if (!core.isCreateContextCall(context, node)) return;
55
- const [id, name] = match(findEnclosingAssignmentTarget(node)).with({
55
+ const [id, name] = match(resolveEnclosingAssignmentTarget(node)).with({
56
56
  type: AST_NODE_TYPES.Identifier,
57
57
  name: P.string
58
58
  }, (id) => [id, id.name]).with({
@@ -86,7 +86,7 @@ function create$1(context) {
86
86
  if (!context.sourceCode.text.includes("useId")) return {};
87
87
  return merge({ CallExpression(node) {
88
88
  if (!core.isUseIdCall(context, node)) return;
89
- const [id, name] = match(findEnclosingAssignmentTarget(node)).with({
89
+ const [id, name] = match(resolveEnclosingAssignmentTarget(node)).with({
90
90
  type: AST_NODE_TYPES.Identifier,
91
91
  name: P.string
92
92
  }, (id) => [id, id.name]).with({
@@ -120,8 +120,8 @@ function create(context) {
120
120
  if (!context.sourceCode.text.includes("useRef")) return {};
121
121
  return merge({ CallExpression(node) {
122
122
  if (!core.isUseRefCall(context, node)) return;
123
- if (ast.getUnderlyingExpression(node.parent).type === AST_NODE_TYPES.MemberExpression) return;
124
- const [id, name] = match(findEnclosingAssignmentTarget(node)).with({
123
+ if (Extract.unwrapped(node.parent).type === AST_NODE_TYPES.MemberExpression) return;
124
+ const [id, name] = match(resolveEnclosingAssignmentTarget(node)).with({
125
125
  type: AST_NODE_TYPES.Identifier,
126
126
  name: P.string
127
127
  }, (id) => [id, id.name]).with({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-naming-convention",
3
- "version": "5.2.1-next.1",
3
+ "version": "5.2.2-beta.0",
4
4
  "description": "ESLint React's ESLint plugin for naming convention related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -45,19 +45,19 @@
45
45
  "compare-versions": "^6.1.1",
46
46
  "string-ts": "^2.3.1",
47
47
  "ts-pattern": "^5.9.0",
48
- "@eslint-react/ast": "5.2.1-next.1",
49
- "@eslint-react/core": "5.2.1-next.1",
50
- "@eslint-react/eslint": "5.2.1-next.1",
51
- "@eslint-react/shared": "5.2.1-next.1",
52
- "@eslint-react/var": "5.2.1-next.1"
48
+ "@eslint-react/ast": "5.2.2-beta.0",
49
+ "@eslint-react/shared": "5.2.2-beta.0",
50
+ "@eslint-react/core": "5.2.2-beta.0",
51
+ "@eslint-react/eslint": "5.2.2-beta.0",
52
+ "@eslint-react/var": "5.2.2-beta.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/react": "^19.2.14",
56
56
  "@types/react-dom": "^19.2.3",
57
57
  "eslint": "^10.2.0",
58
58
  "tsdown": "^0.21.7",
59
- "@local/eff": "3.0.0-beta.72",
60
- "@local/configs": "0.0.0"
59
+ "@local/configs": "0.0.0",
60
+ "@local/eff": "3.0.0-beta.72"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "eslint": "^10.2.0",