0

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.

  • Does this answer your question? [Enable eslint only for edited files](https://stackoverflow.com/questions/54511168/enable-eslint-only-for-edited-files) Also https://stackoverflow.com/q/62425452/3784008 – anothermh May 09 '23 at 20:33

0 Answers0