husky
husky copied to clipboard
Husky git hook with lint-staged not working
I have just added "npm run test" to git commit hook, its failing with below error (refer the snapshot) - seems the matching files are being passed as argument?
"husky": "^8.0.3", "lint-staged": "^15.2.2",
Config in .lintstagedrc file:
{
"src/**/*.{js,ts}": [
"npm run test"
]
}
yes, that is how lint-staged works in general. you can ignore them by providing a lambda in your config instead of a json-formatted config file, like in lint-staged's ts example