Files
web/apps/partner-sas/lint-staged.config.js
Joakim Jäderberg 07ef6d96d6 Merged in chore/remove-jsonsort-dictionaries (pull request #3084)
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
2025-11-06 14:18:50 +00:00

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