Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eslint-bulk] Fix caching during eslintrc lookup #5065

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

dmichon-msft
Copy link
Contributor

Summary

Fixes an issue where a number of results of probing for .eslintrc.cjs and .eslintrc.js files weren't being cached.

Details

In a folder structure like:

src/
 a/
  1/
 b/
  c/
  d/

Searching for the .eslintrc.cjs file from a/1/ wrote cache records for src/, src/a/, and src/a/1/. However, a subsequent lookup in src/b/c/ would find the cache record for src/, but not write cache records to src/b/ or src/b/c/, resulting in duplicative searches for all subsequent files in these folders.

How it was tested

Under fstrace to observe the disk probes.

Impacted documentation

None. This is the expected behavior.

@dmichon-msft dmichon-msft merged commit 4cf55de into microsoft:main Jan 7, 2025
5 checks passed
@dmichon-msft dmichon-msft deleted the eslint-cache-bug branch January 7, 2025 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

3 participants