Hey, with that special config file, how would it be used with the pre-commit hook? Looks exactly like what I need. Just need to know how to implement. Thank you
I believe in quality software development. I make software to make people's lives better. A well written and well-tested codebase helps future-you and other developers who come after you. :)
Hey, with that special config file, how would it be used with the pre-commit hook? Looks exactly like what I need. Just need to know how to implement. Thank you
Hi!
The lint-staged package allows configuration using different file types in the root folder, see: github.com/okonet/lint-staged#conf...
To set it up in your workspace, do the following:
run
npm install husky lint-staged --save-dev
(this will install husky and lint-staged as dev dependencies)put the
lint-staged.config.js
file into the root folder, near yourpackage.json
fileIn your
package.json
add the following:"husky": { "hooks": { "pre-commit": "lint-staged" } }
I hope it helps! :)