Skip to content

Commit

Permalink
Fix an issue where multiple eslintrc files in the same process aren't…
Browse files Browse the repository at this point in the history
… handled correctly.
  • Loading branch information
iclanton committed Mar 20, 2024
1 parent 9b6af8a commit b7ab99e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function findEslintrcFolderPathForNormalizedFileAbsolutePath(normalizedFilePath:

const pathsToCache: string[] = [normalizedFilePath];
let eslintrcFolderPath: string | undefined;
for (
findEslintrcFileLoop: for (
let currentFolder: string = normalizedFileFolderPath;
currentFolder; // 'something'.substring(0, -1) is ''
currentFolder = currentFolder.substring(0, currentFolder.lastIndexOf('/'))
Expand All @@ -122,7 +122,7 @@ function findEslintrcFolderPathForNormalizedFileAbsolutePath(normalizedFilePath:
for (const eslintrcFilename of ESLINTRC_FILENAMES) {
if (fs.existsSync(`${currentFolder}/${eslintrcFilename}`)) {
eslintrcFolderPath = currentFolder;
break;
break findEslintrcFileLoop;
}
}
}
Expand Down

0 comments on commit b7ab99e

Please sign in to comment.