I've set up lint-staged and husky with NextJS. When we run yarn lint, it calls yarn next lint under the hood and it works. When we call yarn lint-staged, we receive an error:
ā yarn lint:
> Couldn't find a `pages` directory. Please create one under the project root
The point is that pages directory exists under src and it should work. What is going on?
package.json:
{
"scripts": {
"lint": "next lint"
},
"lint-staged": {
"src/**/*.{ts,tsx}": [
"yarn lint"
]
}
}