Skip to content

Commit 84a60c6

Browse files
committed
fix: fail in case of fatal eslint error
1 parent 2ff9650 commit 84a60c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/utils/postprocess-files.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ export async function postprocessFiles({
2727
const [result] = await eslint.lintText(file.data, {
2828
filePath: path.resolve(outputDirPath, file.filename)
2929
});
30+
for (const message of result.messages) {
31+
if (message.fatal) {
32+
throw new Error(`Fatal ESLint error in ${file.filename}: ${message.message}`);
33+
}
34+
}
3035
return {
3136
...file,
3237
data: result.output ?? file.data

0 commit comments

Comments
 (0)