pre-commit hook with lint
Asked Answered
L

0

2

I'm trying to add precommit-hook to my project, this is my script section on package.json:

"scripts": {
    ...
    "lint": "npm run lint:sass && npm run lint:js",
    "lint:js": "ng lint",
    "lint:sass": "sass-lint src/**/*.scss -v -q"
}...
"pre-commit": [
    "lint"
],

If I only execute this line:

npm run lint:sass && npm run lint:js

Everything works great, but when I'm trying to add precommit my terminal just freeze on:

git commit -m "Testing"

running lint...

Labradorite answered 11/12, 2017 at 21:16 Comment(2)
perhaps you could use 'husky': npmjs.com/package/huskyLanni
@Lanni is not even take the 'precommit' :( I've uninstall 'precommit-hook' without any luck :(Labradorite

© 2022 - 2024 — McMap. All rights reserved.