Fix cache not invalidated when files are ignored or restored (#18029)

This commit is contained in:
Konv Suu authored and GitHub committed 2026-06-27 17:45:39 +08:00
1 parent ae594b849f
commit fe040aeef9
2 files changed
+54 -1

No files matched your search

+4
View File
@@ -321,6 +321,10 @@ async function formatFiles(context) {
context.argv.check ||
context.argv.listDifferent)
) {
// If the file is ignored remove it from the cache
// - it won't be formatted anymore
// - if it has been restored, we shouldn't keep the old cache entry
formatResultsCache?.removeFormatResultsCache(filename);
continue;
}