You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I cannot use husky, it keeps showing husky - pre-commit hook exited with code 1 (error). I use lint-staged for pre-commit checking. Suddenly yarn lint-staged failed in slience with no error message displayed in terminal. After spending a lot of time, I found that someone updated .eslintrc.yml and add a new plugin, then yarn install solved the problem.
However, when the task eslint failed with some reason, it's error should be handled in lint-staged and error message should not be masked. I checked the code of runAll() function, here in generateTasks, all the makeCmdTasks call doesn't catch error. It seems makeCmdTasks do fail at some time, please show the error messages in some way. Thank you! https://github.com/okonet/lint-staged/blob/5cead2d4c1fc79171f41dd269402a8ee46d442cc/lib/runAll.js#L178-L226
The text was updated successfully, but these errors were encountered:
kqhasaki
changed the title
please show error messages if makeCmdTasks fails
Please show error messages if makeCmdTasks fails
Aug 3, 2023
Today I cannot use husky, it keeps showing
husky - pre-commit hook exited with code 1 (error)
. I uselint-staged
for pre-commit checking. Suddenlyyarn lint-staged
failed in slience with no error message displayed in terminal. After spending a lot of time, I found that someone updated.eslintrc.yml
and add a new plugin, thenyarn install
solved the problem.However, when the task
eslint
failed with some reason, it's error should be handled inlint-staged
and error message should not be masked. I checked the code ofrunAll()
function, here ingenerateTasks
, all themakeCmdTasks
call doesn't catch error. It seemsmakeCmdTasks
do fail at some time, please show the error messages in some way. Thank you!https://github.com/okonet/lint-staged/blob/5cead2d4c1fc79171f41dd269402a8ee46d442cc/lib/runAll.js#L178-L226
The text was updated successfully, but these errors were encountered: