nrwl / precise-commits

:sparkles: Painlessly apply Prettier by only formatting lines you have modified anyway!
MIT License
471 stars 20 forks source link

VSCode: Hook is triggered after commit #20

Open uloco opened 6 years ago

uloco commented 6 years ago

When committing files within visual studio code (through the gui) the commit is made and after that, the pre-commit hook is triggered, causing a dirty repository. This does not happen with other tools such as pretty-quick.

I configured it like it is described in the repository. Working on the command line only works fine though.

SleeplessByte commented 6 years ago

Same as: https://github.com/nrwl/precise-commits/issues/7

rahulbhadhoriya commented 4 years ago

for future googlers yarn add lint-staged --dev

"lint-staged": { "*.{js,jsx,ts,tsx,md,html,css,scss}": "precise-commits" }, "husky": { "hooks": { "pre-commit": "lint-staged" } }