Files
web/apps/partner-sas/lint-staged.config.js
Joakim Jäderberg ec511e2c8b Merged in feature/tsgo (pull request #3069)
Use tsgo for typechecking

* switch to tsgo for type-checking

* Merged in chore/remove-cypress (pull request #3066)

chore: remove unused dependencies

* chore: remove cypress

* remove unused deps

* update yarn.lock after removing unused deps


Approved-by: Anton Gunnarsson

* use tsgo for typechecking

* use tsgo for type-checking

* yarn install

* fix(BOOK-496): Slowed down the MarqueeText component animation

Approved-by: Matilda Landström

* switch to tsgo for type-checking

* use tsgo for typechecking

* use tsgo for type-checking

* yarn install

* Merge branch 'feature/tsgo' of bitbucket.org:scandic-swap/web into feature/tsgo

* switch to use yarn check-types in lint-staged

* Merge branch 'master' of bitbucket.org:scandic-swap/web into feature/tsgo


Approved-by: Linus Flood
2025-11-06 12:34:23 +00:00

22 lines
608 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",
"i18n/dictionaries/*.json": "jsonsort",
}
export default config