--- title: Code Styleguide — JavaScript last_modified: 2026-02-22 --- 1. Use `const` for everything. If you need to reassign, use `let`. Never use `var`. 1. Use yarn for package management, avoid using npm. 1. Use LTS node versions. 1. Use `prettier` for code formatting, with four spaces for indentation. 1. At a minimum, both `yarn run test`/`yarn run build` and `npm run test`/`npm run build` should work (complete the appropriate scripts in `package.json`). However, prefer `make test` and `make build` instead — the Makefile is authoritative on how to interact with the repo. See [Repository Policies](https://git.eeqj.de/sneak/prompts/raw/branch/main/prompts/REPO_POLICIES.md) for details. # Author [@sneak](https://sneak.berlin) <[sneak@sneak.berlin](mailto:sneak@sneak.berlin)> # License MIT. See [LICENSE](../LICENSE).