eslint-plugin-react-naming-convention 4.2.4-beta.0 → 5.0.0-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.
package/README.md CHANGED
@@ -36,4 +36,4 @@ export default defineConfig(
36
36
 
37
37
  ## Rules
38
38
 
39
- <https://eslint-react.xyz/docs/rules/overview#naming-convention-rules>
39
+ <https://eslint-react.xyz/docs/rules#naming-convention-rules>
package/dist/index.js CHANGED
@@ -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 = "4.2.4-beta.0";
28
+ var version = "5.0.0-beta.0";
29
29
 
30
30
  //#endregion
31
31
  //#region src/utils/create-rule.ts
@@ -60,7 +60,7 @@ function create$2(context) {
60
60
  property: { name: P.string }
61
61
  }, (id) => [id, id.property.name]).otherwise(() => [null, null]);
62
62
  if (id == null) return;
63
- if (core.isComponentName(name) && name.endsWith("Context")) return;
63
+ if (core.isFunctionComponentName(name) && name.endsWith("Context")) return;
64
64
  context.report({
65
65
  messageId: "invalidContextName",
66
66
  node: id
@@ -85,7 +85,7 @@ var id_name_default = createRule({
85
85
  function create$1(context) {
86
86
  if (!context.sourceCode.text.includes("useId")) return {};
87
87
  return defineRuleListener({ CallExpression(node) {
88
- if (!core.isUseIdCall(node)) return;
88
+ if (!core.isUseIdCall(context, node)) return;
89
89
  const [id, name] = match(findEnclosingAssignmentTarget(node)).with({
90
90
  type: AST_NODE_TYPES.Identifier,
91
91
  name: P.string
@@ -119,7 +119,7 @@ var ref_name_default = createRule({
119
119
  function create(context) {
120
120
  if (!context.sourceCode.text.includes("useRef")) return {};
121
121
  return defineRuleListener({ CallExpression(node) {
122
- if (!core.isUseRefCall(node)) return;
122
+ if (!core.isUseRefCall(context, node)) return;
123
123
  if (ast.getUnderlyingExpression(node.parent).type === AST_NODE_TYPES.MemberExpression) return;
124
124
  const [id, name] = match(findEnclosingAssignmentTarget(node)).with({
125
125
  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": "4.2.4-beta.0",
3
+ "version": "5.0.0-beta.0",
4
4
  "description": "ESLint React's ESLint plugin for naming convention related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -45,15 +45,15 @@
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": "4.2.4-beta.0",
49
- "@eslint-react/core": "4.2.4-beta.0",
50
- "@eslint-react/shared": "4.2.4-beta.0",
51
- "@eslint-react/var": "4.2.4-beta.0"
48
+ "@eslint-react/ast": "5.0.0-beta.0",
49
+ "@eslint-react/core": "5.0.0-beta.0",
50
+ "@eslint-react/var": "5.0.0-beta.0",
51
+ "@eslint-react/shared": "5.0.0-beta.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/react": "^19.2.14",
55
55
  "@types/react-dom": "^19.2.3",
56
- "eslint": "^10.1.0",
56
+ "eslint": "^10.2.0",
57
57
  "tsdown": "^0.21.7",
58
58
  "@local/configs": "0.0.0",
59
59
  "@local/eff": "3.0.0-beta.72"