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)
npm install husky lint-staged --save-dev
put the lint-staged.config.js file into the root folder, near your package.json file
lint-staged.config.js
package.json
In your package.json add the following: "husky": { "hooks": { "pre-commit": "lint-staged" } }
"husky": { "hooks": { "pre-commit": "lint-staged" } }
I hope it helps! :)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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! :)