I have the following package.json
:
"scripts": {
"lint": "npm run v2:lint",
"v2:lint": "cd ./v2 && npm run lint && cd .."
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js, json}": "npm run lint"
}
However when I actually did a commit, I can see:
npm ERR! app@1.0.0 lint: `npm run v2:lint "C:/dev/codes/my-app/v2/app/index.js"`
As we can see, the file path is appended to the end but I didn't ask it to do so. Why is lint-staged do this?