Environment Setup
Configure VS Code to format your code with Biome and to serve your projects locally.
Install Biome
Section titled “Install Biome”Install the Biome command-line tool by following Biome’s manual installation guide. Do not install it with npm.
After installing it, restart your terminal and verify the installation:
biome --versionInstall VS Code extensions
Section titled “Install VS Code extensions”Install these extensions from the VS Code Extensions view (Cmd+Shift+X on macOS or Ctrl+Shift+X on Windows/Linux):
- Biome — formats and checks your code.
- Live Server — runs your project in a local development server.
Configure Biome as the formatter
Section titled “Configure Biome as the formatter”If you have the Prettier extension installed, disable it to prevent it from conflicting with Biome:
- Open the Extensions view.
- Find Prettier - Code formatter.
- Click the gear icon and choose Disable (or Disable (Workspace)).
Then make Biome the default formatter:
- Open VS Code Settings with Cmd+, on macOS or Ctrl+, on Windows/Linux.
- Search for
default formatter. - Set Editor: Default Formatter to Biome.
- Search for
format on saveand enable Editor: Format On Save.
Enable auto-save on focus
Section titled “Enable auto-save on focus”- In VS Code Settings, search for
auto save. - Set Files: Auto Save to onFocusChange (shown as on focus change in the Settings UI).
VS Code will now save your work whenever you switch away from the editor to view the game running in your browser, allowing Biome to format it automatically.