Tooling#
JavaScript’s tooling is decentralised; most teams assemble their own stack from npm packages.
Runtimes#
Package Managers#
npm, ships with Node.
pnpm, fast, disk-efficient (content-addressable store).
Yarn, alternative client; v2+ uses Plug’n’Play.
$ npm install lodash
$ pnpm add -D vitest
$ yarn add express
Bundlers / Build#
Linters#
ESLint, the standard linter.
$ npm install -D eslint
$ npx eslint --init
$ npx eslint src/
Formatter#
Prettier, opinionated formatter.
$ npm install -D prettier
$ npx prettier --write .
Testing#
Vitest, Vite-native, Jest-compatible.
Jest, the long-time standard.
Playwright / Cypress, end-to-end.
node:test, built into Node 20+.
$ npx vitest
$ npx jest --watch
Debugging#
node --inspect-brk script.js, attach Chrome DevTools or VS Code.Browser DevTools, step through, inspect heap, profile.
ndb, improved Node debugger.
Documentation#
JSDoc, generate HTML docs from doc comments.
TypeDoc, when paired with TypeScript.
documentation.js, modern alternative.
Editor Support#
TypeScript Language Server (works for plain JS too via
checkJs: true).eslintandprettierplugins for VS Code, Vim, Emacs, JetBrains.
Type Checking#
TypeScript, type-check
.jswith// @ts-checkand JSDoc, or commit to.ts.Flow, alternative type checker (less common today).