## Pre-commit hook
- Add .husky/pre-commit at repo root: runs `cd frontend && npm run lint`
- Update prepare script in package.json to auto-configure git hooks path
on npm install (git -C .. config core.hooksPath .husky)
- Add lint step to CI unit-tests job so it catches issues before tests run
- Add generated dirs to .prettierignore (paraglide_bak*, test-results, .auth)
- Add src/lib/paraglide_bak* to .gitignore so ESLint can ignore them
## ESLint fixes (all pre-existing)
- Disable svelte/no-navigation-without-resolve: false positive in SvelteKit
(rule targets Svelte 5 standalone routing, not SvelteKit <a href>)
- Fix svelte/require-each-key: add (item.id)/(item) keys to all {#each} blocks
across 10 files — improves Svelte reconciliation performance
- Fix svelte/prefer-writable-derived in PersonTypeahead: $state+$effect → $derived
- Fix svelte/prefer-svelte-reactivity: URLSearchParams → SvelteURLSearchParams,
Map → SvelteMap (enables Svelte reactive tracking)
- Fix @typescript-eslint/no-unused-vars: remove dead imports/variables
## Prettier
- Run npm run format to bring all source files in line with .prettierrc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
58 lines
1.8 KiB
JSON
58 lines
1.8 KiB
JSON
{
|
|
"name": "frontend",
|
|
"private": true,
|
|
"version": "0.0.1",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite dev",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"prepare": "svelte-kit sync || true && git -C .. config core.hooksPath .husky 2>/dev/null || true",
|
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
"format": "prettier --write .",
|
|
"lint": "prettier --check . && eslint .",
|
|
"test:unit": "vitest",
|
|
"test": "npm run test:unit -- --run",
|
|
"test:e2e": "playwright test",
|
|
"test:e2e:headed": "playwright test --headed",
|
|
"test:e2e:ui": "playwright test --ui",
|
|
"generate:api": "openapi-typescript http://localhost:8080/v3/api-docs -o ./src/lib/generated/api.ts"
|
|
},
|
|
"dependencies": {
|
|
"openapi-fetch": "^0.13.5"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/compat": "^1.4.0",
|
|
"@eslint/js": "^9.39.1",
|
|
"@inlang/paraglide-js": "^2.5.0",
|
|
"@playwright/test": "^1.58.2",
|
|
"@sveltejs/adapter-node": "^5.4.0",
|
|
"@sveltejs/kit": "^2.48.5",
|
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
"@tailwindcss/forms": "^0.5.10",
|
|
"@tailwindcss/typography": "^0.5.19",
|
|
"@tailwindcss/vite": "^4.1.17",
|
|
"@types/node": "^24",
|
|
"@vitest/browser-playwright": "^4.0.10",
|
|
"eslint": "^9.39.1",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-svelte": "^3.13.0",
|
|
"globals": "^16.5.0",
|
|
"openapi-typescript": "^7.8.0",
|
|
"playwright": "^1.56.1",
|
|
"prettier": "^3.6.2",
|
|
"prettier-plugin-svelte": "^3.4.0",
|
|
"prettier-plugin-tailwindcss": "^0.7.1",
|
|
"svelte": "^5.43.8",
|
|
"svelte-check": "^4.3.4",
|
|
"tailwindcss": "^4.1.17",
|
|
"typescript": "^5.9.3",
|
|
"typescript-eslint": "^8.47.0",
|
|
"vite": "^7.2.2",
|
|
"vite-plugin-devtools-json": "^1.0.0",
|
|
"vitest": "^4.0.10",
|
|
"vitest-browser-svelte": "^2.0.1"
|
|
}
|
|
}
|