Open
Description
I just upgraded all of the deps of my project and precommit hook stops working.
yarn lint-staged
will exit with exit code 1 without printing anything
I changed my precommit hook from yarn lint-staged
to yarn lint-staged --debug
and it works again, which bunch debug info printed.
The root cause is likely coming from eslint or something else. But still, I don't expect lint-staged to exit with an error without printing anything. The the fact that add --debug
resolves it properbly means it is lint-staged
issue.
Using 15.1.0
here is the logs (that works)
[COMPLETED] Preparing lint-staged...
[STARTED] Running tasks for staged files...
[STARTED] package.json — 2 files
[STARTED] *.{js,ts} — 1 file
[STARTED] *.{js,ts,md} — 1 file
[STARTED] eslint --cache --fix
[STARTED] prettier --write
[COMPLETED] prettier --write
[COMPLETED] *.{js,ts,md} — 1 file
[COMPLETED] eslint --cache --fix
[COMPLETED] *.{js,ts} — 1 file
[COMPLETED] package.json — 2 files
[COMPLETED] Running tasks for staged files...
[STARTED] Applying modifications from tasks...
lint-staged:GitWorkflow Adding task modifications to index... +872ms
lint-staged:execGit Running git command [
'add',
'--',
'/Users/xiliangchen/projects/acala/node-cdk/lib/config.ts'
] +878ms
lint-staged:GitWorkflow Done adding task modifications to index! +4ms
lint-staged:execGit Running git command [ 'diff', '--name-only', '-z', '--diff-filter=ACMR', '--staged' ] +4ms
[COMPLETED] Applying modifications from tasks...
[STARTED] Cleaning up temporary files...
lint-staged:GitWorkflow Dropping backup stash... +5ms
lint-staged:execGit Running git command [ 'stash', 'list' ] +5ms
lint-staged:execGit Running git command [ 'stash', 'drop', '--quiet', '0' ] +8ms
lint-staged:GitWorkflow Done dropping backup stash! +13ms
[COMPLETED] Cleaning up temporary files...
lint-staged Tasks were executed successfully! +958ms
Metadata
Metadata
Assignees
Labels
No labels