Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commiting deleted files breaks lint-staged #12

Closed
mxstbr opened this issue May 26, 2016 · 5 comments · Fixed by #14
Closed

Commiting deleted files breaks lint-staged #12

mxstbr opened this issue May 26, 2016 · 5 comments · Fixed by #14
Labels

Comments

@mxstbr
Copy link
Contributor

mxstbr commented May 26, 2016

If I delete a file, and then I try to commit the deletion. The linter throws an error in the pre-commit hook, because it tries to lint the deleted file that doesn't exists anymore.

Running eslint on git staged files: **/*.@(js|jsx)
Running jscs on git staged files: **/*.@(js|jsx)
Error: Path internals/scripts/clean.js was not found.
    at .<anonymous> (node_modules/jscs/lib/checker.js:188:19)
    at Array.<anonymous> (node_modules/vow/lib/vow.js:712:39)
    at Immediate.callFns [as _onImmediate] (node_modules/vow/lib/vow.js:23:35)
    at tryOnImmediate (timers.js:543:15)
    at processImmediate [as _immediateCallback] (timers.js:523:5)
pre-commit: 
pre-commit: We've failed to pass the specified git pre-commit hooks as the `lint:staged`
pre-commit: hook returned an exit code (1). If you're feeling adventurous you can
pre-commit: skip the git pre-commit hooks by adding the following flags to your commit:
pre-commit: 
pre-commit:   git commit -n (or --no-verify)
pre-commit: 
pre-commit: This is ill-advised since the commit is broken.
pre-commit: 

From: react-boilerplate/react-boilerplate#397

@okonet
Copy link
Collaborator

okonet commented May 26, 2016

Thanks @mxstbr. I'm already started working on #8 in a 1.0 branch. Hopefully, this one should be also resolved when I'm done.

@FezVrasta
Copy link
Contributor

Is there any ETA? It's a critical bug that prevent us from linting files on pre-commit...

@okonet okonet added the bug label May 27, 2016
@okonet
Copy link
Collaborator

okonet commented May 27, 2016

I'm working on an experimental branch that should help solving this. Can't give any ETA yet.

@okonet okonet mentioned this issue Jun 6, 2016
Merged
@okonet okonet closed this as completed in #14 Jun 7, 2016
@JustinJKlein
Copy link

Just dittoing my anticipation for a solution. And, wondering if this was merged into the master because if it did I am still running into an issue with it as well. Thanks for all the hardwork okonet!

@okonet
Copy link
Collaborator

okonet commented Oct 8, 2016

What version are you using? It was fixed and released 4 months ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

4 participants