- 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
16 lines
743 B
Markdown
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.
|