Open
Description
Description
I'm using lint-staged in my GitHub Actions and want to detect whether lint-staged has failed because of the failure of internal git diff
or because of linters.
For example, git diff
always throws an error if it is the first commit. (I can use the /dev/null
hash to avoid it, but it is complicated and cannot handle other errors.)
I suggest using another exit code for internal errors, including git diff
, like prettier.
I checked through the current behavior of lint-staged, and it always exits with 1, as defined here.
lint-staged/bin/lint-staged.js
Lines 124 to 129 in 26eee9d
Metadata
Metadata
Assignees
Labels
No labels
Activity