Files
web/apps/scandic-web/lint-staged.config.js
Anton Gunnarsson 5da3e457cb Merged in chore/migrate-from-next-lint (pull request #3263)
chore: Migrate from next lint to eslint

* Migrate scandic-web

* Migrate partner-sas

* Enable any rule in partner-sas


Approved-by: Joakim Jäderberg
Approved-by: Linus Flood
2025-12-02 10:08:56 +00:00

19 lines
482 B
JavaScript

import path from "node:path"
const WEB_ROOT = path.join(process.cwd(), "apps/scandic-web/")
const buildEslintCommand = (filenames) => {
const files = filenames
.map((f) => `'${path.relative(WEB_ROOT, f)}'`)
.join(" ")
return `eslint --fix --no-warn-ignored --max-warnings 0 ${files}`
}
const config = {
"*.{js,jsx,ts,tsx}": [buildEslintCommand],
"*.{ts,tsx}": () => "yarn check-types",
"*.{js,jsx,ts,tsx,json,css}": "prettier --write",
}
export default config