js-conventions
Installation
SKILL.md
JavaScript and TypeScript Conventions
Apply these conventions in JavaScript and TypeScript projects. These rules are written for any coding agent, including Claude Code, Codex, Cursor, and Copilot.
Package Manager
- Use
pnpm, notnpmoryarn.
Format and Lint Toolchain
A project has exactly one authoritative formatter/linter setup. Detect it before writing or reformatting code, and never run a second one over the same files.
Detection order — first match wins:
- Biome —
biome.json,biome.jsonc, or@biomejs/biomeindevDependencies. See Biome (when present). - XO —
xo.config.ts,xo.config.js, anxofield inpackage.json, orxoindevDependencies. See XO (when present). - ESLint —
eslint.config.{js,mjs,ts}(flat config) or a legacy.eslintrc*. - Nothing configured — for a new project prefer Biome: one binary covers formatting, linting, and import sorting, so no Prettier is needed. Ask before adding it to an existing project.