Skip to content

Commit f9a807c

Browse files
committed
perf: prevent rewriting the file to preserve eslint cache
1 parent c856577 commit f9a807c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/biome.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ const biomeLintFile = (biome: Biome, filePath: string, fix = true) => {
116116
filePath,
117117
});
118118

119-
writeFileSync(filePath, formatted.content);
119+
if (formatted.content !== result.content) {
120+
writeFileSync(filePath, formatted.content);
121+
}
120122
}
121123

122124
return convertBiomeResult(result, filePath, result.content);

0 commit comments

Comments
 (0)