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