Configure the formatter that already handles your file: Prettier uses the semi option, while Biome uses javascript.formatter.semicolons. Choose whether it should print semicolons routinely or only where needed to protect JavaScript parsing. A no-semicolon style does not necessarily mean every semicolon disappears.
First, identify the formatter used for the file
A setting only affects output when the relevant formatter is actually run on that file. Check your project configuration, scripts, or editor formatter selection to determine whether the file is handled by Prettier or Biome before changing anything. The two tools use different option names and value formats.
As an Amazon Associate I earn from qualifying purchases.
Configure semicolons in Prettier
Set semi in the project’s Prettier configuration. For example, to omit routine statement-ending semicolons, use:
{
"semi": false
}
Set "semi": true to print semicolons at statement ends; this is Prettier’s documented default. You can also use Prettier’s CLI override --no-semi. The API option is named semi. See Prettier’s options documentation.
#1 Best Overall
Configure semicolons in Biome
In biome.json, set javascript.formatter.semicolons. To emit semicolons only where needed, configure:
{
"javascript": {
"formatter": {
"semicolons": "asNeeded"
}
}
}
Use "always" to print a semicolon after every statement; that is Biome’s documented default. The configuration value is camel-cased as asNeeded, while the CLI spells the equivalent option --semicolons=as-needed (or --semicolons=always). Refer to the Biome configuration reference and Biome CLI reference.
Rank #2
Why a no-semicolon style may still show semicolons
JavaScript’s automatic semicolon insertion (ASI) can make a line that begins with certain syntax—such as a bracket—continue the expression on the preceding line. To avoid changing how code parses, Prettier with semi: false still inserts protective semicolons at the beginning of lines in those cases. Biome’s asNeeded mode likewise emits semicolons when needed to protect against ASI. These are safety measures, not evidence that the style option failed. See Prettier’s semicolon rationale.
Recommended Free Tools
Make the formatter run when you save
The semicolon option controls how a formatter prints code; formatting on save is a separate editor behavior that triggers the formatter. To have edits applied automatically, enable your editor’s format-on-save behavior and ensure the intended formatter is selected for the file’s language. The exact setting names and menus vary by editor and installed extension, so use the instructions for your specific setup.
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




