Blatantly ignores relevant dotfiles
Opened this issue · 4 comments
This pre-commit hook is a great idea, but sadly I can't reasonably use it in JS projects because it completely bypasses the relevant .jshintrc
files by reading from STDIN instead of from disk.
Is there any way to fix this problem or is it a limitation of git hooks in general?
How did you install ochtra? If it's a symlink, the current directory will not be your project's, and jshint will not be able to travel upwards until it finds your project's .jshintrc
It's not a symlink. I added the file to my git template and it's a regular file in .git/hooks/
. Even .jshintrc
in the gitroot is ignored, though.
Hm. and what if you point jshint to your rc file via --config
? Just to start ruling things out?
It's general problem. I try resolve for eslint
but didn't find why how get local config in hooks.
Whole check doesn't have access to to project folder and we check only files in commit, don't read everything.
Many users can used different settings for project and we can't cover all possibilities. I seen many project .jshintrc
or .eslintrc
or .eslintrc.js
. How we can decide? You can change CMD that is used for check in your template.
@kvz can we help project root directory as variable in ochtra?