eslint-plugin-react-naming-convention 5.17.2 → 5.18.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 +4 -3
  2. package/package.json +9 -8
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ import { resolveEnclosingAssignmentTarget } from "@eslint-react/var";
5
5
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
6
6
  import { P, match } from "ts-pattern";
7
7
  import { Extract } from "@eslint-react/ast";
8
+ import { getSettingsFromContext } from "@eslint-react/shared";
8
9
 
9
10
  //#region \0rolldown/runtime.js
10
11
  var __defProp = Object.defineProperty;
@@ -25,7 +26,7 @@ var __exportAll = (all, no_symbols) => {
25
26
  //#endregion
26
27
  //#region package.json
27
28
  var name$1 = "eslint-plugin-react-naming-convention";
28
- var version = "5.17.2";
29
+ var version = "5.18.0";
29
30
 
30
31
  //#endregion
31
32
  //#region src/utils/create-rule.ts
@@ -117,9 +118,9 @@ var ref_name_default = createRule({
117
118
  defaultOptions: []
118
119
  });
119
120
  function create(context) {
120
- if (!context.sourceCode.text.includes("useRef")) return {};
121
+ const { additionalRefHooks } = getSettingsFromContext(context);
121
122
  return { CallExpression(node) {
122
- if (!core.isUseRefCall(context, node)) return;
123
+ if (!core.isUseRefLikeCall(node, additionalRefHooks)) return;
123
124
  if (Extract.unwrap(node.parent).type === AST_NODE_TYPES.MemberExpression) return;
124
125
  const [id, name] = match(resolveEnclosingAssignmentTarget(node)).with({
125
126
  type: AST_NODE_TYPES.Identifier,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-naming-convention",
3
- "version": "5.17.2",
3
+ "version": "5.18.0",
4
4
  "description": "ESLint React's ESLint plugin for naming convention related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -37,20 +37,21 @@
37
37
  "dist"
38
38
  ],
39
39
  "dependencies": {
40
- "@typescript-eslint/types": "^8.64.0",
41
- "@typescript-eslint/utils": "^8.64.0",
40
+ "@typescript-eslint/types": "^8.65.0",
41
+ "@typescript-eslint/utils": "^8.65.0",
42
42
  "ts-pattern": "^5.9.0",
43
- "@eslint-react/ast": "5.17.2",
44
- "@eslint-react/core": "5.17.2",
45
- "@eslint-react/eslint": "5.17.2",
46
- "@eslint-react/var": "5.17.2"
43
+ "@eslint-react/ast": "5.18.0",
44
+ "@eslint-react/eslint": "5.18.0",
45
+ "@eslint-react/shared": "5.18.0",
46
+ "@eslint-react/var": "5.18.0",
47
+ "@eslint-react/core": "5.18.0"
47
48
  },
48
49
  "devDependencies": {
49
50
  "@types/react": "^19.2.17",
50
51
  "@types/react-dom": "^19.2.3",
51
52
  "dedent": "^1.7.2",
52
53
  "eslint": "^10.7.0",
53
- "tsdown": "^0.22.9",
54
+ "tsdown": "^0.22.13",
54
55
  "typescript": "6.0.3",
55
56
  "@local/configs": "0.0.0",
56
57
  "@local/eff": "0.0.0"