references/javascript.md
JavaScript/TypeScript Release Practices
Supported versions
Support the active and maintenance Node.js LTS lines, and declare the floor
in engines.node. Dropping an EOL Node version is routine maintenance.
Package metadata
- Set
license(SPDX identifier),repository, andenginesinpackage.json; registries and tooling surface these directly. - Commit the lockfile (
package-lock.json,pnpm-lock.yaml, oryarn.lock) so fresh clones build reproducibly. - Publish under an npm organization scope (
@org/package) rather than a personal account so ownership survives maintainer turnover.
Formatting, linting, and type checking
Keep an existing ESLint + Prettier or Biome setup; if none exists, add
Biome (a single tool) or ESLint + Prettier, and enforce them in CI. For
TypeScript, run tsc --noEmit in CI even when a bundler performs the
builds — bundlers typically skip type checking.
Documentation
TypeDoc generates API documentation from TypeScript sources; publish it to GitHub Pages from CI and link it from the README.
Publishing to npm
- Use npm trusted publishing (OIDC from GitHub Actions or GitLab CI, generally available since July 2025) instead of long-lived tokens.
- Under trusted publishing, the npm CLI publishes provenance attestations
by default — no
--provenanceflag needed. - Run
npm audit(or the equivalent for pnpm/yarn) in CI to flag dependencies with known advisories.