Skip to content

Commit

Permalink
[eslint-bulk] Fix caching during eslintrc lookup (#5065)
Browse files Browse the repository at this point in the history
Co-authored-by: David Michon <[email protected]>
  • Loading branch information
dmichon-msft and dmichon-msft authored Jan 7, 2025
1 parent b2465b0 commit 4cf55de
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/eslint-patch",
"comment": "Fix a performance issue when locating \".eslint-bulk-suppressions.json\".",
"type": "patch"
}
],
"packageName": "@rushstack/eslint-patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ function findEslintrcFolderPathForNormalizedFileAbsolutePath(normalizedFilePath:
) {
const cachedEslintrcFolderPath: string | undefined = eslintrcPathByFileOrFolderPath.get(currentFolder);
if (cachedEslintrcFolderPath) {
return cachedEslintrcFolderPath;
// Need to cache this result into the intermediate paths
eslintrcFolderPath = cachedEslintrcFolderPath;
break;
}

pathsToCache.push(currentFolder);
Expand Down

0 comments on commit 4cf55de

Please sign in to comment.