@nx/eslint-plugin 20.2.0-beta.0 → 20.2.0-beta.2

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": "20.2.0-beta.0",
3
+ "version": "20.2.0-beta.2",
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": "20.2.0-beta.0",
38
- "@nx/js": "20.2.0-beta.0",
37
+ "@nx/devkit": "20.2.0-beta.2",
38
+ "@nx/js": "20.2.0-beta.2",
39
39
  "@typescript-eslint/type-utils": "^8.0.0",
40
40
  "@typescript-eslint/utils": "^8.0.0",
41
41
  "chalk": "^4.1.0",
@@ -196,7 +196,7 @@ exports.default = utils_1.ESLintUtils.RuleCreator(() => `https://github.com/nrwl
196
196
  const importsToRemap = [];
197
197
  for (const entryPointPath of indexTsPaths) {
198
198
  for (const importMember of imports) {
199
- const importPath = (0, ast_utils_1.getRelativeImportPath)(importMember, (0, path_1.join)(devkit_1.workspaceRoot, entryPointPath.path), sourceProject.data.sourceRoot);
199
+ const importPath = (0, ast_utils_1.getRelativeImportPath)(importMember, (0, path_1.join)(devkit_1.workspaceRoot, entryPointPath.path));
200
200
  // we cannot remap, so leave it as is
201
201
  if (importPath) {
202
202
  importsToRemap.push({
@@ -273,7 +273,7 @@ exports.default = utils_1.ESLintUtils.RuleCreator(() => `https://github.com/nrwl
273
273
  const importsToRemap = [];
274
274
  for (const entryPointPath of indexTsPaths) {
275
275
  for (const importMember of imports) {
276
- const importPath = (0, ast_utils_1.getRelativeImportPath)(importMember, (0, path_1.join)(devkit_1.workspaceRoot, entryPointPath), sourceProject.data.sourceRoot);
276
+ const importPath = (0, ast_utils_1.getRelativeImportPath)(importMember, (0, path_1.join)(devkit_1.workspaceRoot, entryPointPath));
277
277
  if (importPath) {
278
278
  // resolve the import path
279
279
  const relativePath = (0, path_1.relative)((0, path_1.dirname)(fileName), (0, path_1.dirname)(importPath));
@@ -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: any, filePath: any, basePath: any): any;
12
+ export declare function getRelativeImportPath(exportedMember: any, filePath: any): any;
@@ -78,7 +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) {
81
+ function getRelativeImportPath(exportedMember, filePath) {
82
82
  const status = (0, fs_1.lstatSync)(filePath, {
83
83
  throwIfNoEntry: false,
84
84
  });
@@ -208,7 +208,7 @@ function getRelativeImportPath(exportedMember, filePath, basePath) {
208
208
  moduleFilePath = (0, path_1.join)((0, path_1.dirname)(filePath), `${modulePath}/index.ts`);
209
209
  }
210
210
  if (hasMemberExport(exportedMember, moduleFilePath)) {
211
- const foundFilePath = getRelativeImportPath(exportedMember, moduleFilePath, basePath);
211
+ const foundFilePath = getRelativeImportPath(exportedMember, moduleFilePath);
212
212
  if (foundFilePath) {
213
213
  return foundFilePath;
214
214
  }