Skip to content

Commit

Permalink
cleanup(linter): remove unused basePath parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
MJez29 committed Oct 21, 2024
1 parent e57b851 commit 71745f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions packages/eslint-plugin/src/rules/enforce-module-boundaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,7 @@ export default ESLintUtils.RuleCreator(
for (const importMember of imports) {
const importPath = getRelativeImportPath(
importMember,
join(workspaceRoot, entryPointPath.path),
sourceProject.data.sourceRoot
join(workspaceRoot, entryPointPath.path)
);
// we cannot remap, so leave it as is
if (importPath) {
Expand Down Expand Up @@ -444,8 +443,7 @@ export default ESLintUtils.RuleCreator(
for (const importMember of imports) {
const importPath = getRelativeImportPath(
importMember,
join(workspaceRoot, entryPointPath),
sourceProject.data.sourceRoot
join(workspaceRoot, entryPointPath)
);
if (importPath) {
// resolve the import path
Expand Down
5 changes: 2 additions & 3 deletions packages/eslint-plugin/src/utils/ast-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function hasMemberExport(exportedMember, filePath) {
);
}

export function getRelativeImportPath(exportedMember, filePath, basePath) {
export function getRelativeImportPath(exportedMember, filePath) {
const status = lstatSync(filePath, {
throwIfNoEntry: false,
});
Expand Down Expand Up @@ -273,8 +273,7 @@ export function getRelativeImportPath(exportedMember, filePath, basePath) {
if (hasMemberExport(exportedMember, moduleFilePath)) {
const foundFilePath = getRelativeImportPath(
exportedMember,
moduleFilePath,
basePath
moduleFilePath
);
if (foundFilePath) {
return foundFilePath;
Expand Down

0 comments on commit 71745f7

Please sign in to comment.