Merged in feat/sw-2781-partner-sas-site-setup (pull request #2432)
feat(SW-2781): Setup SAS partner site * Add boilerplate for SAS partner site * Fonts * netlify.toml Approved-by: Linus Flood
This commit is contained in:
21
apps/partner-sas/lint-staged.config.js
Normal file
21
apps/partner-sas/lint-staged.config.js
Normal file
@@ -0,0 +1,21 @@
|
||||
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}": () => "tsc -p tsconfig.json --noEmit",
|
||||
"*.{js,jsx,ts,tsx,json,css}": "prettier --write",
|
||||
"i18n/dictionaries/*.json": "jsonsort",
|
||||
}
|
||||
|
||||
export default config
|
||||
Reference in New Issue
Block a user