eslint-plugin-react-x 3.0.0-next.2 → 3.0.0-next.6

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 +6 -4
  2. package/package.json +10 -10
package/dist/index.js CHANGED
@@ -66,7 +66,7 @@ const rules$7 = {
66
66
  //#endregion
67
67
  //#region package.json
68
68
  var name$6 = "eslint-plugin-react-x";
69
- var version = "3.0.0-next.2";
69
+ var version = "3.0.0-next.6";
70
70
 
71
71
  //#endregion
72
72
  //#region src/utils/create-rule.ts
@@ -136,7 +136,6 @@ function getFullyQualifiedNameEx(checker, symbol) {
136
136
  let name = symbol.name;
137
137
  let parent = symbol.declarations?.at(0)?.parent;
138
138
  if (parent == null) return checker.getFullyQualifiedName(symbol);
139
- const namespace = parent.getSourceFile().statements.find((n) => ts.isNamespaceExportDeclaration(n));
140
139
  while (parent.kind !== ts.SyntaxKind.SourceFile) {
141
140
  switch (true) {
142
141
  case ts.isInterfaceDeclaration(parent):
@@ -168,11 +167,14 @@ function getFullyQualifiedNameEx(checker, symbol) {
168
167
  case ts.isObjectLiteralExpression(parent):
169
168
  case ts.isIntersectionTypeNode(parent):
170
169
  case ts.isUnionTypeNode(parent): break;
170
+ default: break;
171
171
  }
172
172
  parent = parent.parent;
173
173
  }
174
- if (namespace != null) return `${namespace.name.text}.${name}`;
175
- return name;
174
+ const namespace = parent.getSourceFile().statements.find((n) => ts.isNamespaceExportDeclaration(n))?.name.text;
175
+ if (namespace == null) return name;
176
+ if (name.startsWith(`${namespace}.`)) return name;
177
+ return `${namespace}.${name}`;
176
178
  }
177
179
 
178
180
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "3.0.0-next.2",
3
+ "version": "3.0.0-next.6",
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
  "react",
@@ -37,19 +37,19 @@
37
37
  "./package.json"
38
38
  ],
39
39
  "dependencies": {
40
- "@typescript-eslint/scope-manager": "^8.56.0",
41
- "@typescript-eslint/type-utils": "^8.56.0",
42
- "@typescript-eslint/types": "^8.56.0",
43
- "@typescript-eslint/utils": "^8.56.0",
40
+ "@typescript-eslint/scope-manager": "canary",
41
+ "@typescript-eslint/type-utils": "canary",
42
+ "@typescript-eslint/types": "canary",
43
+ "@typescript-eslint/utils": "canary",
44
44
  "compare-versions": "^6.1.1",
45
45
  "is-immutable-type": "^5.0.1",
46
46
  "ts-api-utils": "^2.4.0",
47
47
  "ts-pattern": "^5.9.0",
48
- "@eslint-react/ast": "3.0.0-next.2",
49
- "@eslint-react/core": "3.0.0-next.2",
50
- "@eslint-react/eff": "3.0.0-next.2",
51
- "@eslint-react/shared": "3.0.0-next.2",
52
- "@eslint-react/var": "3.0.0-next.2"
48
+ "@eslint-react/ast": "3.0.0-next.6",
49
+ "@eslint-react/core": "3.0.0-next.6",
50
+ "@eslint-react/shared": "3.0.0-next.6",
51
+ "@eslint-react/var": "3.0.0-next.6",
52
+ "@eslint-react/eff": "3.0.0-next.6"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/react": "^19.2.14",