When using husky and lint-staged is it possible to check what is staged builds in the pre-commit?
Kind of like this?
"lint-staged": {
"**/*.{js,jsx,ts,tsx,css,md}": [
"prettier --write",
"yarn build"
]
}
If I try this I get a build error even if what is being committed should build, it says it could not find a 'pages' directory. Is this because it's trying to build literally only the staged files?
Maybe I'm trying to do something not possible. I'd just like to prevent code from being checked in which will fail on the CI build pipeline.
Thanks :)