Appearance
Tooling
A project has one formatter, one package manager, and one Node major. People can use different editors and different Node installers. The committed files are what keep the output the same.
Copy from examples/, then delete the parts this project does not use. Install commands sit above each config.
Which setup
Read the repository before adding tools.
Existing project. Keep the formatter the scripts already run, and keep the Node installer the team already uses. Add the editor settings and the hook for that formatter if they are missing. A second formatter in the same repo will rewrite the same file on save.
New project. Follow Harbor, unless the product is a Sass codebase. Then use the Sass row below.
| Need | Use |
|---|---|
| Styling | Tailwind when utilities live in the template. Sass when the project is hand-written CSS with BEM. One of them per repo. |
| Language | TypeScript for an application more than one person will maintain. JavaScript when the repo is already JavaScript, or the work is a small script. |
| Format and lint | Biome on a new application. Prettier and ESLint when the repo already has them. |
| Sass | Stylelint, on top of either formatter. Tailwind projects with no hand-written CSS skip it. |
| Packages | pnpm. Commit pnpm-lock.yaml only. |
| Node installer | mise or nvm. Commit both pin files so either one works. |
Example: Harbor
Harbor is a fictional booking app. Several people will work on it. The UI is utilities in React. There is no Sass.
| Choice | Why |
|---|---|
| TypeScript | The app will be maintained, and types catch the breaks between files. |
| Tailwind | The styles are utilities. There is no BEM stylesheet to keep. |
| Biome | One tool formats, lints, and organizes imports. |
| pnpm | The lockfile and the install command stay the same everywhere. |
mise and .nvmrc | mise pins Node and pnpm. .nvmrc is the same Node major for nvm and for GitHub Actions. Each person runs the installer they already have. |
| Editor settings | Whichever editor the person uses, committed for the Biome column. |
Copy these into Harbor:
.editorconfigexamples/.nvmrcandexamples/mise.tomlexamples/biome.json- The
enginesandpackageManagerfields below - One editor folder:
examples/editors/vscode-biome/,examples/editors/zed-biome/, or the WebStorm steps - The Biome scripts and the Biome hook
Skip Stylelint. Skip Prettier, ESLint, and their extensions.
A Sass version of the same app would swap Tailwind for Sass, add Stylelint, and keep Biome for the TypeScript. An older app that already runs Prettier stays on Prettier. Copy examples/editors/vscode-prettier/ or examples/editors/zed-prettier/ and leave Biome out.
New project
- Copy
.editorconfig. - Pin Node, as in Node. Install with mise or with nvm.
- Add
packageManagerand install dependencies with pnpm. - Add Biome, or Prettier and ESLint. One of those.
- Add Stylelint only when the project has Sass.
- Copy the matching editor settings. Install the recommended extension, and disable the other formatter's extension.
- Add the matching scripts and the pre-commit hook.
Existing project
- Open
package.jsonand see which script formats the code. - Keep that formatter. Delete the other one's config and dependency if both are installed.
- Copy the editor settings for the formatter you kept. Format on save has to call that same tool.
- If Node is unpinned, add the pin files. If it is already pinned, leave the major as it is and write that same major into any pin file that is missing.
- Add the hook when commits are not already formatted.
EditorConfig
Two spaces. LF. UTF-8. A final newline. Trim trailing whitespace, except in Markdown, where two spaces are a line break. Every editor here reads this file.
ini
# https://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = falseNode
The standard is the version. mise and nvm are both fine. Commit the pin, and let each person use the installer they already have.
package.json carries the range and the pnpm version:
json
{
"engines": {
"node": ">=24 <25"
},
"packageManager": "pnpm@12.15.0"
}Node 24 is the LTS line as of October 2026. Pin the current LTS when a project starts. Check the line on nodejs.org.
.nvmrc is the major only. nvm reads it (nvm install then nvm use). mise reads it too. GitHub Actions setup-node takes node-version-file: '.nvmrc'.
24That file is examples/.nvmrc.
After nvm has switched to that major, enable Corepack so pnpm comes from packageManager:
bash
corepack enablemise also pins pnpm, so a machine using mise does not need a separate pnpm install. Copy examples/mise.toml.
toml
[tools]
node = "24"
pnpm = "12"bash
mise installBiome does not format TOML. A project that commits mise.toml can add the Even Better TOML extension (tamasfe.even-better-toml) in VS Code for that file alone.
Commit pnpm-lock.yaml only.
Biome
pnpm add -D @biomejs/biome
Biome formats, lints, and organizes imports. The options match the Prettier config: two spaces, single quotes, semicolons only where the grammar needs them, no trailing commas, line width 80.
json
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"jsxQuoteStyle": "single",
"semicolons": "asNeeded",
"trailingCommas": "none"
}
},
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}json
{
"scripts": {
"lint": "biome check .",
"format": "biome check --write ."
}
}biome check --write formats, applies safe fixes, and organizes imports.
Tailwind projects turn on class order. The rule is still in Biome's nursery, and its fix is unsafe, so it stays out of the hook. biome check still fails the build when the order is wrong.
json
{
"tailwind": {
"stylesheet": "./src/app.css"
},
"linter": {
"rules": {
"nursery": {
"useTailwindSortedClasses": "error"
}
}
}
}Point stylesheet at the CSS file that holds the theme. To apply the sort locally: biome check --write --unsafe. Read that diff. The flag applies every unsafe fix, not only class order.
Prettier and ESLint
Use this pair when the repository already has it. Prettier formats. ESLint lints. pnpm add lines are the first comment in each file.
js
/** @type {import('prettier').Config} */
export default {
semi: false,
singleQuote: true,
trailingComma: 'none',
printWidth: 80,
tabWidth: 2
}Tailwind projects add the class order plugin:
js
export default {
semi: false,
singleQuote: true,
trailingComma: 'none',
printWidth: 80,
tabWidth: 2,
plugins: ['prettier-plugin-tailwindcss']
}ESLint 9, flat config. The JSX block covers React hooks and jsx-a11y. Remove that block, and its imports, in a package with no React.
js
// pnpm add -D eslint @eslint/js globals typescript-eslint eslint-config-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y
//
// Projects without React: remove the react, react-hooks, and jsx-a11y imports,
// and remove the JSX config block.
import js from '@eslint/js'
import prettier from 'eslint-config-prettier'
import jsxA11y from 'eslint-plugin-jsx-a11y'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import globals from 'globals'
import tseslint from 'typescript-eslint'
export default tseslint.config(
{
ignores: [
'dist',
'build',
'coverage',
'node_modules',
'playwright-report',
'playwright-report-ci',
'blob-report',
'test-results'
]
},
js.configs.recommended,
tseslint.configs.recommended,
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
},
rules: {
eqeqeq: 'error',
curly: 'error',
'no-var': 'error',
'prefer-const': 'error',
'no-console': 'warn'
}
},
{
files: ['**/*.{jsx,tsx}'],
plugins: {
react,
'react-hooks': reactHooks,
'jsx-a11y': jsxA11y
},
settings: {
react: { version: 'detect' }
},
rules: {
...jsxA11y.configs.recommended.rules,
'react/jsx-uses-vars': 'error',
'react/react-in-jsx-scope': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn'
}
},
prettier
)json
{
"scripts": {
"lint": "eslint .",
"format": "prettier --write ."
}
}Stylelint
Sass projects only, with either formatter. The config allows BEM names, rejects !important and id selectors, and caps nesting at three levels. Declaration order comes from stylelint-config-recess-order (position, then box, then text).
js
// pnpm add -D stylelint stylelint-config-standard-scss stylelint-config-recess-order
/** @type {import('stylelint').Config} */
export default {
extends: ['stylelint-config-standard-scss', 'stylelint-config-recess-order'],
rules: {
'declaration-no-important': true,
'max-nesting-depth': 3,
'no-descending-specificity': null,
'selector-max-id': 0,
'selector-class-pattern': [
'^[a-z][a-z0-9]*(-[a-z0-9]+)*(__[a-z][a-z0-9]*(-[a-z0-9]+)*)?(--[a-z][a-z0-9]*(-[a-z0-9]+)*)?$',
{
message:
'Expected a BEM class: block, block__element, or block--modifier'
}
]
}
}Add it to the lint script:
json
{
"scripts": {
"lint": "biome check . && stylelint \"**/*.{css,scss}\""
}
}A Prettier project uses eslint . && stylelint "**/*.{css,scss}" instead.
Editors
Commit the settings for the formatter the project uses. Cursor reads the VS Code files. Install the extension the folder recommends, and disable Prettier or ESLint when the project uses Biome. Two formatters on save will fight over the file.
VS Code files are copied to .vscode/. Zed's file is copied to .zed/settings.json. Format on save is set per language for Biome, so YAML and Markdown are left to whatever that person uses for those files.
VS Code
Biome:
json
{
"recommendations": ["biomejs.biome"]
}json
{
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
},
"[javascriptreact]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
},
"[css]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
}
}source.fixAll.biome applies safe fixes. source.organizeImports.biome sorts imports. Format on save alone does neither.
Prettier and ESLint:
json
{
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}json
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}source.fixAll.eslint is the ESLint fix. source.organizeImports is the TypeScript language service putting imports in its own order. A Tailwind project also installs Tailwind CSS IntelliSense (bradlc.vscode-tailwindcss). Its class-regex settings belong to that repo, so they are not part of this example.
Zed
Install Biome from the extensions view (zed: extensions, search Biome). Prettier and ESLint come from the project's devDependencies. The prettier command has to be on PATH, or the external command will not run. pnpm exec prettier --stdin-filepath is the substitute when the binary is only in node_modules.
Biome. The same block is repeated per language because a global Biome formatter also claims languages Biome does not parse.
json
{
"languages": {
"JavaScript": {
"format_on_save": "on",
"formatter": { "language_server": { "name": "biome" } },
"code_actions_on_format": {
"source.fixAll.biome": true,
"source.organizeImports.biome": true
}
},
"JSX": {
"format_on_save": "on",
"formatter": { "language_server": { "name": "biome" } },
"code_actions_on_format": {
"source.fixAll.biome": true,
"source.organizeImports.biome": true
}
},
"TypeScript": {
"format_on_save": "on",
"formatter": { "language_server": { "name": "biome" } },
"code_actions_on_format": {
"source.fixAll.biome": true,
"source.organizeImports.biome": true
}
},
"TSX": {
"format_on_save": "on",
"formatter": { "language_server": { "name": "biome" } },
"code_actions_on_format": {
"source.fixAll.biome": true,
"source.organizeImports.biome": true
}
},
"JSON": {
"format_on_save": "on",
"formatter": { "language_server": { "name": "biome" } }
},
"JSONC": {
"format_on_save": "on",
"formatter": { "language_server": { "name": "biome" } }
},
"CSS": {
"format_on_save": "on",
"formatter": { "language_server": { "name": "biome" } }
}
}
}Prettier and ESLint:
json
{
"languages": {
"JavaScript": {
"format_on_save": "on",
"tab_size": 2,
"formatter": [
{ "code_action": "source.organizeImports" },
{ "code_action": "source.fixAll.eslint" },
{
"external": {
"command": "prettier",
"arguments": ["--stdin-filepath", "{buffer_path}"]
}
}
]
},
"JSX": {
"format_on_save": "on",
"tab_size": 2,
"formatter": [
{ "code_action": "source.organizeImports" },
{ "code_action": "source.fixAll.eslint" },
{
"external": {
"command": "prettier",
"arguments": ["--stdin-filepath", "{buffer_path}"]
}
}
]
},
"TypeScript": {
"format_on_save": "on",
"tab_size": 2,
"formatter": [
{ "code_action": "source.organizeImports" },
{ "code_action": "source.fixAll.eslint" },
{
"external": {
"command": "prettier",
"arguments": ["--stdin-filepath", "{buffer_path}"]
}
}
]
},
"TSX": {
"format_on_save": "on",
"tab_size": 2,
"formatter": [
{ "code_action": "source.organizeImports" },
{ "code_action": "source.fixAll.eslint" },
{
"external": {
"command": "prettier",
"arguments": ["--stdin-filepath", "{buffer_path}"]
}
}
]
},
"JSON": {
"format_on_save": "on",
"formatter": {
"external": {
"command": "prettier",
"arguments": ["--stdin-filepath", "{buffer_path}"]
}
}
},
"CSS": {
"format_on_save": "on",
"formatter": {
"external": {
"command": "prettier",
"arguments": ["--stdin-filepath", "{buffer_path}"]
}
}
}
}
}WebStorm
WebStorm has no small JSON file for this. The plugin is the Biome plugin from the JetBrains Marketplace, and it also runs in IntelliJ IDEA.
Biome:
- Install the Biome plugin and restart.
- Settings, Languages & Frameworks, Biome. Turn on LSP-based code formatting. Leave the CLI path empty so the plugin uses
node_modules/.bin/biome. - Settings, Tools, Actions on Save. Turn on Reformat code for JavaScript, TypeScript, JSON, and CSS.
- Leave WebStorm's Optimize imports off. It sorts with WebStorm's order. Biome sorts in the hook, with
biome check --write. - Turn off the Prettier plugin's "run on save" for this project.
Prettier and ESLint:
- Settings, Languages & Frameworks, JavaScript, Prettier. Set the package to the project dependency and turn on run on save.
- Settings, Languages & Frameworks, JavaScript, Code Quality Tools, ESLint. Set it to Automatic and turn on run
eslint --fixon save. - Settings, Tools, Actions on Save. Turn on Optimize imports for JavaScript and TypeScript.
Git hooks
Husky 9 runs lint-staged. After pnpm dlx husky init, the hook is .husky/pre-commit:
pnpm exec lint-stagedBiome:
json
{
"lint-staged": {
"*.{js,jsx,ts,tsx,json,jsonc,css}": "biome check --write --no-errors-on-unmatched"
}
}Prettier and ESLint:
json
{
"lint-staged": {
"*.{js,jsx,ts,tsx,css,scss,md}": "prettier --write",
"*.{js,jsx,ts,tsx}": "eslint --fix"
}
}Sass projects add a Stylelint line to either block:
json
"*.{css,scss}": "stylelint --fix"lint-staged stages the files it changes. Do not add a git add.