Files
bw-copilot-resources/resources/instructions/javascript.instructions.md
T
fragginwagon 71e89ca5c0 Add shared instruction files and copilot history maintenance scripts
- Add 12 cross-project instruction files to resources/instructions/
- Add cleanup-copilot-history.mjs/.sh: quarantine-based history cleanup with dry-run and aggressive scope
- Add restore-copilot-history.mjs/.sh: restore from quarantine by run, path, or filter
- Add purge-copilot-history-quarantine.mjs/.sh: purge old quarantine runs with keep-latest guard
- Add copilot-history-maintenance.test.mjs: 3 passing unit tests covering all three scripts
2026-06-30 17:18:11 -04:00

16 lines
743 B
Markdown

---
name: "JavaScript Standards"
description: "Cross-project JavaScript and MJS standards for clarity, maintainability, and performance-aware code."
applyTo: "**/*.js,**/*.mjs"
---
- Prefer `const` over `let`, and avoid `var`.
- Use async/await for asynchronous flows.
- Keep modules focused and avoid monolithic files.
- Remove dead code and unused imports during related edits.
- Use early returns to reduce branching complexity.
- Keep behavior explicit; avoid implicit coercion and hidden side effects.
- Favor composition and reusable utilities over duplicated logic.
- Avoid deep nesting, callback-heavy control flow, and blocking sync work in user-facing paths.
- Validate with the project's JavaScript lint, test, and build commands.