add agent rules
This commit is contained in:
parent
9b9ae5c7f5
commit
c37955c51b
4 changed files with 52 additions and 0 deletions
15
.opencode/rules/linting.md
Normal file
15
.opencode/rules/linting.md
Normal 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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue