Я использую Husky с Lint-staged и Stylelint
"scripts": {
"precommit": "lint-staged",
},
"lint-staged": {
"*.scss": ["stylelint --syntax scss"
]
},
ОС - последний OSX
Node - 6.10.0
NPM - 3.10.00
Я получаю эту ошибку на git commit
> husky - npm run -s precommit
/Users/jitendravyas/app/node_modules/lint-staged/src/index.js:6
const path = require('path')
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/jitendravyas/app/node_modules/lint-staged/index.js:2:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
> husky - pre-commit hook failed (add --no-verify to bypass)
> husky - to debug, use 'npm run precommit'