Setup
Everything on this page runs from the repository root. The frontend is not in a subdirectory.
Node and Yarn
Section titled “Node and Yarn”Yarn 4 is activated through Corepack, so make sure to install it or yarn will not work:
npm install -g corepack --ignore-scriptscorepack enablecorepack installOnce Corepack is set up, install the dependencies:
yarnCI uses yarn install --immutable --mode=skip-build, which fails rather than updating yarn.lock. If your local install
modifies the lockfile, commit that change deliberately, otherwise CI will reject it.
Scripts
Section titled “Scripts”package.json defines six scripts. There is no typecheck, no stylelint and no cypress script.
yarn start
Section titled “yarn start”Starts the Vite dev server on http://localhost:5173 with hot module replacement. Type and lint errors are not reported here — Vite only surfaces module resolution and runtime errors, as an overlay in the browser.
yarn build
Section titled “yarn build”Runs tsc -b && vite build and writes to build/. Because tsc runs first, this is the only command that typechecks
the project. Run it before pushing; a type error that never shows up in the dev server will fail CI here.
yarn test
Section titled “yarn test”Runs Vitest in watch mode. For a single run:
yarn test --runSee Testing for fixtures, render helpers and the Cypress setup.
yarn lint / yarn lint:fix
Section titled “yarn lint / yarn lint:fix”Runs ESLint over src/. The config (eslint.config.mjs) loads eslint-plugin-only-warn, which downgrades every rule
to a warning. That means yarn lint reports problems and still exits with code 0, so a passing local lint tells you
nothing. CI runs:
yarn lint --max-warnings 0Use that form locally too. It is the single most common cause of a first red pipeline.
yarn format
Section titled “yarn format”Runs Prettier over src/**/*.{ts,tsx}.
yarn prepare
Section titled “yarn prepare”Installs the Husky git hooks. Yarn runs it automatically after yarn install.
Git hooks
Section titled “Git hooks”.husky/pre-commit runs lint-staged, which is configured in package.json:
| Files | Action |
|---|---|
src/**/*.{ts,tsx} |
eslint --fix |
src/**/*.{ts,tsx,json,css,scss,md} |
prettier --write |
So your staged changes are formatted and auto-fixed on every commit. git commit --no-verify skips the hook; if you use
it, run yarn format and yarn lint --max-warnings 0 yourself before pushing.
Editor setup
Section titled “Editor setup”The repository root has an .editorconfig, so make sure
your editor honours it (LF line endings, UTF-8, 2-space indent, trailing whitespace trimmed, final newline).
VS Code
Section titled “VS Code”Install the ESLint and Prettier extensions, then add to .vscode/settings.json:
{ "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" }, "typescript.tsdk": "node_modules/typescript/lib", "typescript.enablePromptUseWorkspaceTsdk": true}Pointing at the workspace TypeScript matters: the project is on TypeScript 6, and VS Code’s bundled version may be older.
WebStorm / IntelliJ
Section titled “WebStorm / IntelliJ”- Languages & Frameworks → JavaScript → Code Quality Tools → ESLint: choose Automatic ESLint configuration.
- Prettier: enable On save, with the file pattern
{**/*,*}.{ts,tsx,json,css,scss,md}. - Project Structure: mark
srcas a Resources root, otherwise the IDE will not resolve the bare imports described below even though the build does.