chore: No need to sort dictionary files anymore now that we have man-made IDs * No need to sort dictionary files anymore now that we have man-made IDs Approved-by: Erik Tiekstra Approved-by: Linus Flood
21 lines
566 B
JavaScript
21 lines
566 B
JavaScript
import path from "node:path"
|
|
|
|
const WEB_ROOT = path.join(process.cwd(), "apps/partner-sas/")
|
|
|
|
// https://nextjs.org/docs/app/building-your-application/configuring/eslint#lint-staged
|
|
const buildEslintCommand = (filenames) => {
|
|
const cmd = `next lint --fix --max-warnings 0 --file ${filenames
|
|
.map((f) => `'${path.relative(WEB_ROOT, f)}'`)
|
|
.join(" --file ")}`
|
|
|
|
return cmd
|
|
}
|
|
|
|
const config = {
|
|
"*.{js,jsx,ts,tsx}": [buildEslintCommand],
|
|
"*.{ts,tsx}": () => "yarn check-types",
|
|
"*.{js,jsx,ts,tsx,json,css}": "prettier --write",
|
|
}
|
|
|
|
export default config
|