We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8091768 commit bbb1ffaCopy full SHA for bbb1ffa
src/command/eslint-fix.ts
@@ -39,7 +39,17 @@ export const eslintFix = async (
39
"--name-only",
40
"--cached",
41
]);
42
- files = result?.split("\n").map((path) => `${cwd}/${path}`) || [];
+ files =
43
+ result
44
+ ?.split("\n")
45
+ .map((path) => `${cwd}/${path}`)
46
+ .filter(
47
+ (path) =>
48
+ path.endsWith(".js") ||
49
+ path.endsWith(".jsx") ||
50
+ path.endsWith(".ts") ||
51
+ path.endsWith(".tsx")
52
+ ) || [];
53
} else {
54
files = paths.map((path) => `${cwd}/${path}`);
55
}
@@ -55,6 +65,7 @@ export const eslintFix = async (
65
}, "eslint checking...")();
56
66
if (resultText) {
57
67
loggerError(`💥eslint check fail! ${resultText}`);
68
+ process.exit(1);
58
69
59
70
loggerSuccess("🎉 eslint check success!");
60
71
0 commit comments