javascript · git:20260731.adfd4fb · 2026-07-31 · sha256 8c15f295cb7f0b91
javascript git:20260731.adfd4fbA
Immutable. This exact content never changes and is served at /api/v1/blob/8c15f295cb7f0b91.
--- description: 'Plain JavaScript conventions.' applyTo: '**/*.js,**/*.mjs,**/*.cjs' --- <!-- Managed by ai-badger. Source of truth: .ai-badger/instructions/javascript.instructions.md. Do not edit this copy by hand; edit the source and re-run welcome-ai-badger. --> # JavaScript - Prefer ES modules (`import`/`export`) over CommonJS in new code unless the runtime/tooling requires otherwise. - Use `const`/`let`, never `var`. Prefer strict equality (`===`/`!==`). - Keep async code in `async`/`await` form over raw `.then()` chains for anything beyond a single call. - If the project has TypeScript available, prefer adding a new module in TypeScript over plain JavaScript; treat plain JS as legacy-compatible, not the default for new code. - Avoid global mutable state; pass dependencies explicitly.