add agent rules

This commit is contained in:
Benjamin Palko 2026-08-11 15:39:16 -04:00
parent 9b9ae5c7f5
commit c37955c51b
4 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,15 @@
# Linting
## Command
- Run `pnpm lint` (Prettier check + ESLint) before finishing any work.
- If `pnpm lint` reports errors, fix them and re-run until clean.
- Never leave the repo in a state where `pnpm lint` fails.
## ESLint
- The flat config in `eslint.config.js` is the source of truth for enabled rules. Read it before making lint-related assumptions.
- `.svelte` files are handled by `eslint-plugin-svelte` with the TypeScript parser.
- `eslint.config.js` respects `.gitignore` — don't lint `build/`, `.svelte-kit/`, or `node_modules/`.
- Prefer fixing the root cause over suppressing: avoid `eslint-disable` comments unless truly necessary, and never disable an entire file.
- Run `pnpm lint` for the whole project after edits that touch Svelte, TypeScript, or configuration files.