Matchu
589c48beda
Tweaked some of the default Next.js rules, fixed lint-staged for `next lint`, made a few small easy lint fixes. Feels good! Note that using the `dirs` option in `next.config.js` was causing `lint-staged` to lint _everything_. That's why I edited `yarn lint` to specify the dirs instead: that way, that command will lint all those dirs, but they won't get included in invocations with `--file`. There are still a few lint errors left after this commit, because our <img> tags aren't working (@next/next/no-img-element). I'll fix those when we figure out what's wrong with images!
6 lines
191 B
JavaScript
6 lines
191 B
JavaScript
module.exports = {
|
|
"*.{js,ts,tsx}": (filenames) =>
|
|
`next lint --max-warnings=0 --fix --file ${filenames
|
|
.map((file) => file.split(process.cwd())[1])
|
|
.join(" --file ")}`,
|
|
};
|