ca25ccd96e
- Wrap each text line with applyChalk(bgProps) after wrapText so background color is reapplied on every wrapped line (wrap-ansi doesn't carry ANSI state across line breaks) - Add wrapped-text backgroundColor regression test - Fix typo: color=" cyan" → color="cyan" in example - Add FORCE_COLOR=3 debugging tip to AGENTS.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.9 KiB
1.9 KiB
Common Pitfalls & Best Practices
- AGENTS.md is the source of truth. CLAUDE.md is a symlink to it.
- Always use Vue's
shallowRefoverrefby default. Usingrefrequires a solid justification and a code comment explaining why deep reactivity is needed. - Always use
defineComponent()to define components. Never use bare{ setup() {} }objects — they lack component scope, soinject,watch, andonScopeDisposewon't work correctly. - Vue SFCs must use
<script setup>unless there's an explicit reason not to. - Bug fixes must follow test-first: write a failing test that reproduces the bug, then fix the code and verify the test passes.
- When debugging color/ANSI output in non-TTY environments (e.g. Claude Code shell), use
FORCE_COLOR=3env var to force chalk to output ANSI codes. - After completing any task, run
vp run ready(orvpr ready) to verify: lint, type-check, test all packages, and build.
Using Vite+, the Unified Toolchain for the Web
This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called vp. Vite+ is distinct from Vite, and it invokes Vite through vp dev and vp build. Run vp help to print a list of commands and vp <command> --help for information about a specific command.
Docs are local at node_modules/vite-plus/docs or online at https://viteplus.dev/guide/.
Review Checklist
- Run
vp installafter pulling remote changes and before getting started. - Run
vp checkandvp testto format, lint, type check and test changes. - Check if there are
vite.config.tstasks orpackage.jsonscripts necessary for validation, run viavp run <script>. - If setup, runtime, or package-manager behavior looks wrong, run
vp env doctorand include its output when asking for help.