I have old project and I want to highlight eslint errors in new files.
I added pre-commit hook and all works, but terminal gets me old errors from whole project :(
Hot to fix it?
"lint": "eslint ./src",
"lint-fix": "eslint ./src --fix --color",
"lint-staged": {
"*.{js,jsx}": "npm run lint"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
}
I tried pre-commit hook and eslint config fixes.