Files
accounted/eslint.config.mjs
T
Jakob WennbergandClaude Fable 5 100a4d1291 feat(ux): create salary runs, employees & recurring schedules in modals (#883)
* feat(ux): create salary runs, employees & recurring schedules in modals

The last three full-page create flows move to ?new=1 URL-driven dialogs,
matching the verifikat/invoice pattern (#861):

- Salary run: 4-field form on /salary — creation was pure interruption
  before landing on the run-detail workspace.
- Employee: the last register entity still page-based after customers,
  suppliers, and articles.
- Recurring schedule: consistency with the invoice modal it feeds.

Old /new routes survive as redirects so bookmarks and agent intents keep
working. Dialogs close explicitly (header X / Avbryt) so half-typed forms
survive stray Escape or backdrop clicks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: move DECISIONS.md to repo root

dev_docs/ is gitignored, so the decision log was invisible to other
developers. Root matches the existing convention (CONTRIBUTING.md,
SECURITY.md). CLAUDE.md pointer updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(lint): ignore Claude Code worktrees in eslint walk

.claude/worktrees/ holds full repo copies; without the ignore, local
npm run lint / check:lint walks them until the ratchet's 64 MB JSON
parse buffer overflows. CI is unaffected (no worktrees there).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 15:18:20 +02:00

51 lines
1.6 KiB
JavaScript

import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript";
const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
{
rules: {
"@typescript-eslint/no-unused-vars": ["warn", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
}],
},
},
// No raw console.* in lib/ or app/api/. Use createLogger from @/lib/logger
// so log lines carry requestId + structured context. lib/logger.ts and
// app/api/log/route.ts are the two intentional exemptions because they ARE
// the logger plumbing.
{
files: ["lib/**/*.ts", "lib/**/*.tsx", "app/api/**/*.ts", "app/api/**/*.tsx"],
ignores: [
"lib/logger.ts",
"app/api/log/route.ts",
// Test files have legitimate console use for assertions / debugging.
"**/__tests__/**",
"**/*.test.ts",
"**/*.bench.test.ts",
"**/*.pg.test.ts",
],
rules: {
// warn (not error) until the remaining ~20 routes/lib files migrate.
// Flip to "error" once the count drops to zero so the floor is enforced.
"no-console": "warn",
},
},
globalIgnores([
".next/**",
"out/**",
"build/**",
"next-env.d.ts",
// Claude Code session worktrees are full repo copies — without this,
// local `npm run lint` / `check:lint` walks them (and their node_modules
// siblings), inflating the report until the ratchet's JSON parse fails.
".claude/worktrees/**",
]),
]);
export default eslintConfig;