Running npm run pre-commit
takes a lot of time even if only one file has been changed.
package.json script:
"pre-commit": "lint-staged",
and lint-staged commands:
"lint-staged": {
"src/**/*.{ts,js,json}": [
"eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
],
"src/**/*.{js,ts,json}": [
"prettier --write \"src/**/*.ts\" \"test/**/*.ts\""
]
},
It feels like eslint runs in the entire project How can I make it run only in the changed files?