我正在使用带有Lint-staged和Stylelint的Husky
"scripts": {
"precommit": "lint-staged",
},
"lint-staged": {
"*.scss": ["stylelint --syntax scss"
]
},
操作系统 - 最新的 OSX
节点 -6.10.0
新PM -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'