@nx/eslint-plugin 0.0.0-pr-27786-e5e2109 → 0.0.0-pr-27696-37f7ce3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/eslint-plugin",
3
- "version": "0.0.0-pr-27786-e5e2109",
3
+ "version": "0.0.0-pr-27696-37f7ce3",
4
4
  "private": false,
5
5
  "description": "The eslint-plugin package is an ESLint plugin that contains a collection of recommended ESLint rule configurations which you can extend from in your own ESLint configs, as well as an Nx-specific lint rule called enforce-module-boundaries.",
6
6
  "repository": {
@@ -34,8 +34,8 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@nx/devkit": "0.0.0-pr-27786-e5e2109",
38
- "@nx/js": "0.0.0-pr-27786-e5e2109",
37
+ "@nx/devkit": "0.0.0-pr-27696-37f7ce3",
38
+ "@nx/js": "0.0.0-pr-27696-37f7ce3",
39
39
  "@typescript-eslint/type-utils": "^7.16.0",
40
40
  "@typescript-eslint/utils": "^7.16.0",
41
41
  "chalk": "^4.1.0",
@@ -43,7 +43,7 @@
43
43
  "jsonc-eslint-parser": "^2.1.0",
44
44
  "semver": "^7.5.3",
45
45
  "tslib": "^2.3.0",
46
- "@nrwl/eslint-plugin-nx": "0.0.0-pr-27786-e5e2109"
46
+ "@nrwl/eslint-plugin-nx": "0.0.0-pr-27696-37f7ce3"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
@@ -9,4 +9,4 @@ export declare function getBarrelEntryPointProjectNode(projectNode: ProjectGraph
9
9
  path: string;
10
10
  importScope: string;
11
11
  }[] | null;
12
- export declare function getRelativeImportPath(exportedMember: string, filePath: string, basePath: string, visitedPaths?: Set<string>): any;
12
+ export declare function getRelativeImportPath(exportedMember: any, filePath: any, basePath: any): any;
@@ -78,13 +78,7 @@ function hasMemberExport(exportedMember, filePath) {
78
78
  // search whether there is already an export with our node
79
79
  return ((0, js_1.findNodes)(sourceFile, ts.SyntaxKind.Identifier).filter((identifier) => identifier.text === exportedMember).length > 0);
80
80
  }
81
- function getRelativeImportPath(exportedMember, filePath, basePath, visitedPaths = new Set()) {
82
- if (visitedPaths.has(filePath)) {
83
- return null;
84
- }
85
- else {
86
- visitedPaths.add(filePath);
87
- }
81
+ function getRelativeImportPath(exportedMember, filePath, basePath) {
88
82
  const status = (0, fs_1.lstatSync)(filePath, {
89
83
  throwIfNoEntry: false,
90
84
  });
@@ -203,18 +197,6 @@ function getRelativeImportPath(exportedMember, filePath, basePath, visitedPaths
203
197
  moduleFilePath = (0, path_1.join)((0, path_1.dirname)(filePath), modulePath);
204
198
  }
205
199
  else {
206
- // check if it's an export from another package before assuming it's a TS(X) file
207
- const externalEntryPoints = getBarrelEntryPointByImportScope(modulePath);
208
- while (externalEntryPoints.length > 0) {
209
- const childFilePath = (0, path_1.join)(devkit_1.workspaceRoot, externalEntryPoints.pop());
210
- if (visitedPaths.has(childFilePath)) {
211
- continue;
212
- }
213
- const relativeImportPath = getRelativeImportPath(exportedMember, childFilePath, basePath, visitedPaths);
214
- if (relativeImportPath) {
215
- return relativeImportPath;
216
- }
217
- }
218
200
  moduleFilePath = (0, path_1.join)((0, path_1.dirname)(filePath), `${modulePath}.ts`);
219
201
  if (!(0, fs_1.existsSync)(moduleFilePath)) {
220
202
  // might be a tsx file