Configuration
Это содержимое пока не доступно на вашем языке.
This reference covers all supported options in biome.json/biome.jsonc. For a step-by-step introduction, see the Configure Biome guide.
To get started, scaffold a minimal biome.jsonc file using the biome init CLI command:
biome init --jsonc$schema
Section titled “$schema”Type: string
Specifies the JSON Schema used to validate the configuration and provide editor features such as completion and inline documentation.
If @biomejs/biome is installed locally, reference the schema included in the npm package, which always matches the installed Biome version:
{ "$schema": "./node_modules/@biomejs/biome/configuration_schema.json"}If your editor cannot resolve the local file, use the schema published on the Biome website:
{ "$schema": "https://biomejs.dev/schemas/2.5.15/schema.json"}extends
Section titled “extends”Type: "//" | string[]
Extends the current configuration with settings from one or more other Biome configurations.
When a subdirectory has its own Biome configuration (a nested configuration), use "//" to extend the configuration at the project root without specifying a relative path. This works at any nesting depth:
{ "extends": "//"}To extend configurations using relative paths or installed package specifiers, use an array:
{ "extends": ["./common.json", "@org/shared-configs/biome"]}Biome merges configurations from left to right. For options that accept a single value, later configurations take precedence. For options that accept a list, Biome combines their entries. The current file is applied last.
See the Use Biome in big projects guide for monorepo setup and shared configuration examples.
Type: boolean
Default: true
Marks whether this file is the root configuration for a Biome project. The root configuration establishes the project’s base settings, while "root": false tells Biome that a configuration found inside the project is nested rather than a second project root.
Biome implicitly treats root as false when a nested configuration uses "extends": "//", while all other nested configurations must explicitly set "root": false to avoid an error.
plugins
Section titled “plugins”Type: (string | { path: string, includes?: string[] })[]
A list of GritQL plugins to load. Each entry is either a plugin path or an object containing a path and optional file filters:
{ "plugins": [ "./general-plugin.grit", { "path": "./react-plugin.grit", "includes": ["**/src/components/**", "!**/src/components/generated/**"] } ]}plugins.<ITEM>.path
Section titled “plugins.<ITEM>.path”Type: string
Path to the plugin’s .grit file or a directory containing biome-manifest.jsonc.
plugins.<ITEM>.includes
Section titled “plugins.<ITEM>.includes”Type: string[]
A list of glob patterns selecting the files on which the plugin runs.
If omitted, the plugin runs on every file eligible for linting. An empty list ([]) selects no files.
Type: { includes?: string[], ignoreUnknown?: boolean, maxSize?: integer, experimentalScannerIgnores?: string[] }
Configures which files Biome can discover and process.
files.includes
Section titled “files.includes”Type: string[]
A list of glob patterns selecting which files and directories Biome can process.
If omitted, this option does not further restrict the supported files Biome can process. An empty list ([]) selects no files.
For example, this includes all JavaScript files below src:
{ "files": { "includes": ["src/**/*.js"] }}Scanner behavior
Section titled “Scanner behavior”Biome’s scanner is responsible for discovering nested configuration and ignore files. When enabled rules use the project or types domains, it also indexes source files and project dependencies.
The scanner respects files.includes and, when enabled, VCS ignore files. However, it may still discover required metadata or index excluded source files needed for analysis. To ensure that a path is never indexed, use a force-ignore pattern:
{ "files": { "includes": ["**", "!!**/dist"] }}Force-ignore build output and nested projects that Biome should not inspect. Prefer a regular exclusion for generated source files that provide types or other project information.
files.ignoreUnknown
Section titled “files.ignoreUnknown”Type: boolean
Default: false
Controls whether Biome suppresses diagnostics for unrecognized file types.
files.maxSize
Section titled “files.maxSize”Type: integer
Default: 1048576
Sets the maximum source code file size in bytes. Biome will skip files above this limit for performance reasons and emit a warning diagnostic.
files.experimentalScannerIgnores
Section titled “files.experimentalScannerIgnores”Type: string[]
A list of file or directory names that the scanner ignores unconditionally while crawling. Each value matches a complete path component, not a glob.
Ignored files are not added to the module graph and therefore types won’t be inferred from them.
Type: { enabled?: boolean, clientKind?: "git", useIgnoreFile?: boolean, root?: string, defaultBranch?: string }
Configures how Biome integrates with a version control system (VCS).
vcs.enabled
Section titled “vcs.enabled”Type: boolean
Default: false
Enables or disables version-control integration. Enabling it requires vcs.clientKind to be set.
vcs.clientKind
Section titled “vcs.clientKind”Type: "git"
Selects the version-control client. Currently, only "git" is supported.
vcs.useIgnoreFile
Section titled “vcs.useIgnoreFile”Type: boolean
Default: false
Controls whether Biome applies patterns from .gitignore, Git’s local .git/info/exclude, and supported .ignore files, including nested ignore files.
Patterns in the root ignore file are resolved from vcs.root while patterns in nested ignore files are resolved from the directory containing that file.
vcs.root
Section titled “vcs.root”Type: string
Sets the directory where Biome looks for version-control files. A relative value is resolved from the directory containing the current configuration file, while an absolute path is used directly.
Set this option when the Biome configuration is not located at the repository root:
{ "vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true, "root": "../" }}If omitted, Biome uses the directory containing the current configuration file, falling back to the current working directory when no configuration directory is available. If neither directory is available, Biome disables VCS integration and emits a diagnostic.
vcs.defaultBranch
Section titled “vcs.defaultBranch”Type: string
Sets the base branch used by --changed when --since is not provided. If neither vcs.defaultBranch nor --since is set, commands using --changed fail because Biome cannot determine the comparison base.
linter
Section titled “linter”Type: { enabled?: boolean, includes?: string[], domains?: object, rules?: object }
Configures linting and the rules Biome runs on selected files.
linter.enabled
Section titled “linter.enabled”Type: boolean
Default: true
Enables or disables the linter.
linter.includes
Section titled “linter.includes”Type: string[]
A list of glob patterns selecting files to lint.
If omitted, all files selected by files.includes remain eligible for linting. An empty list ([]) selects no files.
linter.domains
Section titled “linter.domains”Type: Record<string, "recommended" | "all" | "none">
Configures rules associated with a framework, library, project-wide analysis, or type analysis. Each key is a domain name and each value is one of:
"recommended": Enables the domain’s recommended non-nursery rules."all": Enables all rules in the domain."none": Disables the domain.
Enabling the project or types domain causes Biome to scan project dependencies. The types domain additionally enables type-aware resolution.
linter.rules.recommended
Section titled “linter.rules.recommended”Type: boolean
Default: true
Enables Biome’s recommended non-nursery rules.
linter.rules.preset
Section titled “linter.rules.preset”Type: "recommended" | "all" | "none"
Default: "recommended"
Selects the baseline set of lint rules:
"recommended": Enables Biome’s recommended non-nursery rules."all": Enables all non-nursery rules."none": Starts with no rules enabled.
Group-level settings and explicit rule settings override this preset. An explicit rule can therefore be enabled when the preset is "none".
linter.rules.[group]
Section titled “linter.rules.[group]”Type: "off" | "on" | "info" | "warn" | "error" | { preset?: "recommended" | "all" | "none", recommended?: boolean, [rule]?: "off" | "on" | "info" | "warn" | "error" | object }
Configures all rules in one lint group:
a11y: Detects accessibility problems.complexity: Detects unnecessarily complex code.correctness: Detects code that is incorrect or has no useful effect.nursery: Contains unstable rules that require explicit opt-in.performance: Detects code that may be less efficient than an available alternative.security: Detects potential security vulnerabilities.style: Enforces consistent and idiomatic code.suspicious: Detects code that is likely to be incorrect or unintended.
A group accepts either a string level or an object. A string applies one level to the group:
"off": Disables the group."on": Enables the group using each rule’s default severity."info": Enables the group with information severity."warn": Enables the group with warning severity."error": Enables the group with error severity.
{ "linter": { "rules": { "a11y": "info" } }}linter.rules.[group].preset
Section titled “linter.rules.[group].preset”Type: "recommended" | "all" | "none"
Selects the baseline set of lint rules for one non-nursery group:
"recommended": Enables the group’s recommended rules."all": Enables all rules in the group."none": Starts with no rules enabled in the group.
Explicit rule settings override this group preset, which in turn overrides linter.rules.preset for the group.
linter.rules.[group].recommended
Section titled “linter.rules.[group].recommended”Type: boolean
Enables or disables the recommended rules in a non-nursery group.
The group’s preset setting takes precedence when both options are set.
linter.rules.[group].[rule]
Section titled “linter.rules.[group].[rule]”Type: "off" | "on" | "info" | "warn" | "error" | { level: "off" | "on" | "info" | "warn" | "error", options?: object, fix?: "none" | "safe" | "unsafe" }
Configures an individual lint rule.
A rule accepts either a string level or an object. A string applies one level to the rule:
"off": Disables the rule."on": Enables the rule using its default severity."info": Enables the rule with information severity."warn": Enables the rule with warning severity."error": Enables the rule with error severity.
An explicit rule configuration takes precedence over group-level settings and presets.
Depending on the rule, an object can contain the required level property and the optional options and fix properties:
{ "linter": { "rules": { "complexity": { "noExcessiveCognitiveComplexity": { "level": "warn", "options": { "maxAllowedComplexity": 15 } } } } }}linter.rules.[group].[rule].fix
Section titled “linter.rules.[group].[rule].fix”Type: "none" | "safe" | "unsafe"
Overrides how Biome classifies or emits a rule’s code fix. Only rules with a configurable fix accept this property:
"none": Prevents the rule from emitting a code fix."safe": Marks the fix as safe. Biome can apply it when writing files."unsafe": Marks the fix as unsafe. Biome applies it only when unsafe fixes are explicitly enabled.
Changing a fix’s classification does not change the fix itself. Review a fix before marking it as safe. See Configure the code fix for an example and details about safe and unsafe fixes.
This property is also available for rule configurations inside overrides.
assist
Section titled “assist”Type: { enabled?: boolean, includes?: string[], actions?: object }
Configures assist actions that Biome checks or applies on selected files.
assist.enabled
Section titled “assist.enabled”Type: boolean
Default: true
Enables or disables configured assist actions in the CLI and editor integrations.
assist.includes
Section titled “assist.includes”Type: string[]
A list of glob patterns selecting files on which assist actions can run.
If omitted, all files selected by files.includes remain eligible for assist actions. An empty list ([]) selects no files.
assist.actions.recommended
Section titled “assist.actions.recommended”Type: boolean
Default: true
Enables Biome’s recommended assist actions across all action groups.
assist.actions.preset
Section titled “assist.actions.preset”Type: "recommended" | "all" | "none"
Default: "recommended"
Selects the baseline set of assist actions:
"recommended": Enables Biome’s recommended actions."all": Enables all actions."none": Starts with no actions enabled.
Group presets and explicit action settings override this preset. An explicit action can therefore be enabled when the preset is "none".
assist.actions.[group]
Section titled “assist.actions.[group]”Type: { preset?: "recommended" | "all" | "none", recommended?: boolean, [action]?: "on" | "off" | object }
Configures one group of assist actions:
source: Contains source-level actions such as organizing imports and sorting supported declarations. These actions can be exposed as editor source actions and checked or applied by the CLI.
assist.actions.[group].preset
Section titled “assist.actions.[group].preset”Type: "recommended" | "all" | "none"
Selects the baseline set of assist actions for one group:
"recommended": Enables the group’s recommended actions."all": Enables all actions in the group."none": Starts with no actions enabled in the group.
Explicit action settings override this group preset, which in turn overrides assist.actions.preset for the group.
assist.actions.[group].recommended
Section titled “assist.actions.[group].recommended”Type: boolean
Enables or disables the recommended actions in one group.
The group’s preset setting takes precedence when both options are set.
assist.actions.[group].[action]
Section titled “assist.actions.[group].[action]”Type: "on" | "off" | { level: "on" | "off", options: object }
Configures an individual assist action.
An action accepts either a string level or an object. A string applies one level to the action:
"on": Enables the action."off": Disables the action.
An explicit action configuration takes precedence over group-level settings and presets.
An object contains the required level and options properties. The available options depend on the action:
{ "assist": { "actions": { "source": { "useSortedKeys": { "level": "on", "options": { "sortOrder": "natural" } } } } }}See the assist documentation for the options supported by each action.
formatter
Section titled “formatter”Type: { enabled?: boolean, includes?: string[], formatWithErrors?: boolean, indentStyle?: "tab" | "space", indentWidth?: integer, lineEnding?: "lf" | "crlf" | "cr" | "auto", lineWidth?: integer, attributePosition?: "auto" | "multiline", bracketSameLine?: boolean, bracketSpacing?: boolean, delimiterSpacing?: boolean, expand?: "auto" | "always" | "never", trailingNewline?: boolean, useEditorconfig?: boolean }
Configures formatting for selected files.
formatter.enabled
Section titled “formatter.enabled”Type: boolean
Default: true
Enables or disables the formatter.
formatter.includes
Section titled “formatter.includes”Type: string[]
A list of glob patterns selecting files to format.
If omitted, all files selected by files.includes remain eligible for formatting. An empty list ([]) selects no files.
formatter.formatWithErrors
Section titled “formatter.formatWithErrors”Type: boolean
Default: false
Controls whether Biome formats files that contain syntax errors.
formatter.indentStyle
Section titled “formatter.indentStyle”Type: "tab" | "space"
Default: "tab"
Selects the indentation style:
"tab": Uses tabs for indentation."space": Uses spaces for indentation.
formatter.indentWidth
Section titled “formatter.indentWidth”Type: integer
Default: 2
Sets the indentation width. With "space" indentation, this is the number of spaces emitted per indentation level. With "tab" indentation, Biome emits one tab per level and uses this value as the tab’s display width when calculating line length.
Accepted values range from 0 through 24.
formatter.lineEnding
Section titled “formatter.lineEnding”Type: "lf" | "crlf" | "cr" | "auto"
Default: "lf"
Selects the line-ending sequence:
"lf": Line Feed (\n), commonly used on Linux and macOS."crlf": Carriage Return followed by Line Feed (\r\n), commonly used on Windows."cr": Carriage Return (\r), which is rarely used."auto": Uses CRLF on Windows and LF on other platforms.
formatter.lineWidth
Section titled “formatter.lineWidth”Type: integer
Default: 80
Sets the preferred maximum line width used when deciding where to wrap code. Some content, such as long unbreakable strings, may still exceed this width.
Accepted values range from 1 through 320.
formatter.attributePosition
Section titled “formatter.attributePosition”Type: "auto" | "multiline"
Default: "auto"
Controls attribute placement in HTML-like languages:
"auto": Places attributes automatically and wraps them when needed."multiline": Places each attribute on its own line when an element has multiple attributes.
formatter.bracketSameLine
Section titled “formatter.bracketSameLine”Type: boolean
Default: false
Controls the placement of the closing bracket for multiline HTML and JSX opening tags.
Biome places the bracket at the end of the last attribute line when enabled and on its own line after the last attribute when disabled.
This option also affects self-closing HTML elements, but self-closing JSX elements are unaffected.
formatter.bracketSpacing
Section titled “formatter.bracketSpacing”Type: boolean
Default: true
Controls spaces inside braces in supported single-line structures. The affected structures vary by language.
formatter.delimiterSpacing
Section titled “formatter.delimiterSpacing”Type: boolean
Default: false
Controls spaces immediately inside supported delimiters when their content fits on one line.
Biome does not add spaces before opening delimiters or inside empty delimiters. The affected delimiters vary by language.
formatter.expand
Section titled “formatter.expand”Type: "auto" | "always" | "never"
Default: "auto"
Controls whether arrays and objects are formatted on one line or multiple lines:
"auto": Formats objects on multiple lines if the first property has a leading newline, and keeps arrays on one line when they fit."always": Formats arrays and objects on multiple lines."never": Keeps arrays and objects on one line when they fit.
When formatting package.json, Biome uses "always" unless expansion is configured explicitly.
formatter.trailingNewline
Section titled “formatter.trailingNewline”Type: boolean
Default: true
Controls whether formatted files end with a newline.
formatter.useEditorconfig
Section titled “formatter.useEditorconfig”Type: boolean
Default: false
Controls whether Biome loads formatter settings from an .editorconfig file. Biome currently reads indent_style, indent_size, end_of_line, and insert_final_newline. Settings in biome.json or biome.jsonc take precedence.
Biome loads only one .editorconfig. Nested cascading configurations and the EditorConfig root property are not currently supported.
overrides
Section titled “overrides”Type: { includes?: string[], formatter?: object, linter?: object, assist?: object, files?: object, plugins?: (string | object)[], javascript?: object, json?: object, css?: object, graphql?: object, grit?: object, html?: object }[]
Configures settings for files selected by each override.
When multiple overrides configure the same single-value setting, the last matching override takes precedence.
overrides.<ITEM>.includes
Section titled “overrides.<ITEM>.includes”Type: string[]
A list of glob patterns selecting the files to which the override applies.
If omitted, the override applies to every file. An empty list ([]) applies to no files.
For example, this override changes the line width for JavaScript files directly under scripts:
{ "overrides": [ { "includes": ["scripts/*.js"], // Settings in this object apply only to matched files. "formatter": { "lineWidth": 100 } } ]}overrides.<ITEM>.formatter
Section titled “overrides.<ITEM>.formatter”Type: { enabled?: boolean, formatWithErrors?: boolean, indentStyle?: "tab" | "space", indentSize?: integer, indentWidth?: integer, lineEnding?: "lf" | "crlf" | "cr" | "auto", lineWidth?: integer, attributePosition?: "auto" | "multiline", bracketSameLine?: boolean, bracketSpacing?: boolean, delimiterSpacing?: boolean, expand?: "auto" | "always" | "never", trailingCommas?: "all" | "es5" | "none", trailingNewline?: boolean }
Configures formatter settings for files selected by this override.
overrides.<ITEM>.linter
Section titled “overrides.<ITEM>.linter”Type: { enabled?: boolean, domains?: object, rules?: object }
Configures linter settings for files selected by this override.
{ "overrides": [ { "includes": ["lib/**"], "linter": { "rules": { "suspicious": { "noDebugger": "off" } } } }, { "includes": ["shims/**"], "linter": { "enabled": false } } ]}overrides.<ITEM>.assist
Section titled “overrides.<ITEM>.assist”Type: { enabled?: boolean, actions?: object }
Configures assist settings for files selected by this override.
overrides.<ITEM>.files
Section titled “overrides.<ITEM>.files”Type: { maxSize?: integer }
Configures file-handling settings for files selected by this override.
overrides.<ITEM>.plugins
Section titled “overrides.<ITEM>.plugins”Type: (string | { path: string, includes?: string[] })[]
Adds plugins for files selected by this override. They run in addition to top-level plugins.
overrides.<ITEM>.javascript
Section titled “overrides.<ITEM>.javascript”Type: { parser?: object, formatter?: object, linter?: object, assist?: object, resolver?: object, globals?: string[], jsxRuntime?: "transparent" | "reactClassic", experimentalEmbeddedSnippetsEnabled?: boolean }
Configures JavaScript-specific settings for files selected by this override.
{ "javascript": { "formatter": { "quoteStyle": "single" } }, "overrides": [ { "includes": ["lib/**"], "javascript": { "formatter": { "quoteStyle": "double" } } } ]}overrides.<ITEM>.json
Section titled “overrides.<ITEM>.json”Type: { parser?: object, formatter?: object, linter?: object, assist?: object }
Configures JSON-specific settings for files selected by this override.
The following override enables comments and trailing commas in JSON files below .vscode/:
{ "overrides": [ { "includes": [".vscode/**"], "json": { "parser": { "allowComments": true, "allowTrailingCommas": true } } } ]}overrides.<ITEM>.css
Section titled “overrides.<ITEM>.css”Type: { parser?: object, formatter?: object, globals?: string[], linter?: object, assist?: object }
Configures CSS-specific settings for files selected by this override.
overrides.<ITEM>.graphql
Section titled “overrides.<ITEM>.graphql”Type: { formatter?: object, linter?: object, assist?: object }
Configures GraphQL-specific settings for files selected by this override.
overrides.<ITEM>.grit
Section titled “overrides.<ITEM>.grit”Type: { formatter?: object, linter?: object, assist?: object }
Configures GritQL-specific settings for files selected by this override.
overrides.<ITEM>.html
Section titled “overrides.<ITEM>.html”Type: { experimentalFullSupportEnabled?: boolean, parser?: object, formatter?: object, linter?: object, assist?: object }
Configures HTML-specific settings for files selected by this override.
Language-specific options
Section titled “Language-specific options”The following sections describe parser, formatter, linter, and assist options for individual languages.
javascript
Section titled “javascript”Type: { parser?: object, formatter?: object, linter?: object, assist?: object, resolver?: object, globals?: string[], jsxRuntime?: "transparent" | "reactClassic", experimentalEmbeddedSnippetsEnabled?: boolean }
Options applied to JavaScript, TypeScript, JSX, TSX, and supported languages that embed JavaScript.
javascript.parser.unsafeParameterDecoratorsEnabled
Section titled “javascript.parser.unsafeParameterDecoratorsEnabled”Type: boolean
Default: false
Enables parsing decorators on class parameters, such as method(@Decorator() value). This syntax belongs to an old experimental proposal and may change, so enable it only when existing code requires it.
javascript.parser.gritMetavariables
Section titled “javascript.parser.gritMetavariables”Type: boolean
Default: false
Enables parsing Grit metavariables in JavaScript and TypeScript syntax.
javascript.parser.jsxEverywhere
Section titled “javascript.parser.jsxEverywhere”Type: boolean
Default: true
Controls whether .js, .mjs, and .cjs files may contain JSX syntax. Disabling this option causes JSX in those files to raise a diagnostic.
javascript.formatter.quoteStyle
Section titled “javascript.formatter.quoteStyle”Type: "single" | "double"
Default: "double"
Selects the preferred quote style for JavaScript and TypeScript string literals:
"single": Prefers single quotes."double": Prefers double quotes.
Biome may use the alternate quote when that avoids additional escaping.
javascript.formatter.jsxQuoteStyle
Section titled “javascript.formatter.jsxQuoteStyle”Type: "single" | "double"
Default: "double"
Selects the preferred quote style for JSX attribute values:
"single": Prefers single quotes."double": Prefers double quotes.
javascript.formatter.quoteProperties
Section titled “javascript.formatter.quoteProperties”Type: "asNeeded" | "preserve"
Default: "asNeeded"
Controls whether quotes around object property names are preserved:
"asNeeded": Removes quotes when the property name is valid without them."preserve": Preserves quotes around property names that were quoted in the input.
javascript.formatter.trailingCommas
Section titled “javascript.formatter.trailingCommas”Type: "all" | "es5" | "none"
Default: "all"
Controls trailing commas in multiline comma-separated structures:
"all": Adds trailing commas wherever syntax permits, including function parameters and calls."es5": Adds them only in constructs supported by ES5, such as array and object literals. It excludes function parameters, function calls, and TypeScript type parameters."none": Removes trailing commas.
javascript.formatter.semicolons
Section titled “javascript.formatter.semicolons”Type: "always" | "asNeeded"
Default: "always"
Controls where the formatter prints semicolons:
"always": Prints semicolons after statements."asNeeded": Omits semicolons except where needed to avoid automatic semicolon insertion hazards.
javascript.formatter.arrowParentheses
Section titled “javascript.formatter.arrowParentheses”Type: "always" | "asNeeded"
Default: "always"
Controls parentheses around arrow-function parameters:
"always": Always prints parentheses."asNeeded": Omits parentheses when an arrow function has one parameter and the syntax permits it.
javascript.formatter.enabled
Section titled “javascript.formatter.enabled”Type: boolean
Enables or disables the formatter for JavaScript and languages that extend it.
javascript.formatter.indentStyle
Section titled “javascript.formatter.indentStyle”Type: "tab" | "space"
Selects the indentation style:
"tab": Uses tabs for indentation."space": Uses spaces for indentation.
javascript.formatter.indentWidth
Section titled “javascript.formatter.indentWidth”Type: integer
Sets the indentation width, from 0 through 24.
javascript.formatter.lineEnding
Section titled “javascript.formatter.lineEnding”Type: "lf" | "crlf" | "cr" | "auto"
Selects the line-ending sequence:
"lf": Line Feed (\n), commonly used on Linux and macOS."crlf": Carriage Return followed by Line Feed (\r\n), commonly used on Windows."cr": Carriage Return (\r), which is rarely used."auto": Uses CRLF on Windows and LF on other platforms.
javascript.formatter.lineWidth
Section titled “javascript.formatter.lineWidth”Type: integer
Sets the preferred maximum line width, from 1 through 320.
javascript.formatter.bracketSameLine
Section titled “javascript.formatter.bracketSameLine”Type: boolean
Controls the placement of the closing bracket for multiline JSX opening tags.
Biome places the bracket at the end of the last attribute line when enabled and on its own line after the last attribute when disabled.
Self-closing JSX elements are unaffected.
javascript.formatter.bracketSpacing
Section titled “javascript.formatter.bracketSpacing”Type: boolean
Controls spaces inside the braces of single-line object literals.
Biome formats {value: 1} when disabled and { value: 1 } when enabled.
javascript.formatter.delimiterSpacing
Section titled “javascript.formatter.delimiterSpacing”Type: boolean
Controls spaces immediately inside supported JavaScript and TypeScript delimiters when their content fits on one line.
This option affects parentheses, square brackets, template interpolations, TypeScript angle brackets, and JSX expression braces. Empty delimiters are unchanged.
It also controls spacing after logical NOT operators. In a chain of logical NOT operators, only the final operator receives a following space.
javascript.formatter.attributePosition
Section titled “javascript.formatter.attributePosition”Type: "auto" | "multiline"
Controls attribute placement in JSX elements:
"auto": Places attributes automatically and wraps them when needed."multiline": Places each attribute on its own line when an element has multiple attributes.
javascript.formatter.expand
Section titled “javascript.formatter.expand”Type: "auto" | "always" | "never"
Controls whether arrays and objects are formatted on one line or multiple lines:
"auto": Formats objects on multiple lines if the first property has a leading newline, and keeps arrays on one line when they fit."always": Formats arrays and objects on multiple lines."never": Keeps arrays and objects on one line when they fit.
javascript.formatter.operatorLinebreak
Section titled “javascript.formatter.operatorLinebreak”Type: "after" | "before"
Default: "after"
Controls operator placement when a binary or logical expression wraps:
"after": Places the operator at the end of the preceding line."before": Places the operator at the beginning of the following line.
javascript.formatter.trailingNewline
Section titled “javascript.formatter.trailingNewline”Type: boolean
Controls whether formatted files end with a newline.
javascript.globals
Section titled “javascript.globals”Type: string[]
A list of additional names that Biome’s JavaScript linter treats as predefined global bindings.
Use this for globals supplied by a runtime, framework, or external script that are not declared in the source file:
{ "javascript": { "globals": ["$", "_", "externalVariable"] }}javascript.jsxRuntime
Section titled “javascript.jsxRuntime”Type: "transparent" | "reactClassic"
Default: "transparent"
Configures how Biome’s analyzer accounts for imports used by JSX. This option does not transform JSX or select a runtime for your build tool.
"transparent": Use for the automatic React JSX transform, native JSX environments, and setups where JSX does not require an in-scope factory import. Biome applies no classic-runtime handling."reactClassic": Use for the classic React JSX transform. Biome treats the React import, or custom JSX factory imports configured intsconfig.json, as runtime values used by JSX. This corresponds to TypeScript’s"jsx": "react"mode.
See React’s introduction to the new JSX transform for background.
javascript.resolver.experimentalPnpmCatalogs
Section titled “javascript.resolver.experimentalPnpmCatalogs”Type: boolean
Default: false
Enables experimental pnpm workspace catalog resolution when Biome reads JavaScript package manifests. Biome resolves catalog: and catalog:<name> versions in dependencies, devDependencies, and peerDependencies using top-level catalog and catalogs mappings in pnpm-workspace.yaml.
If the workspace file is missing, unreadable, or invalid, Biome behaves as though this option were disabled.
javascript.linter.enabled
Section titled “javascript.linter.enabled”Type: boolean
Enables or disables the linter for JavaScript and languages that extend it.
javascript.assist.enabled
Section titled “javascript.assist.enabled”Type: boolean
Enables or disables assist actions for JavaScript and languages that extend it.
javascript.experimentalEmbeddedSnippetsEnabled
Section titled “javascript.experimentalEmbeddedSnippetsEnabled”Type: boolean
Default: false
Enables experimental parsing, formatting, linting, diagnostics, and fixes for CSS and GraphQL snippets embedded in JavaScript and TypeScript template literals.
Biome recognizes CSS in css and styled templates and GraphQL in gql and graphql templates or calls. Templates containing interpolations are not currently supported.
Type: { parser?: object, formatter?: object, linter?: object, assist?: object }
Options applied to JSON, JSONC, and recognized JSON-based configuration files.
json.parser.allowComments
Section titled “json.parser.allowComments”Type: boolean
Controls whether comments are allowed in files parsed as JSON.
When unset, Biome follows the file type’s default behavior. An explicit value overrides that behavior, except that biome.jsonc always allows comments.
json.parser.allowTrailingCommas
Section titled “json.parser.allowTrailingCommas”Type: boolean
Controls whether trailing commas are allowed in files parsed as JSON.
When unset, Biome follows the file type’s default behavior. An explicit value overrides that behavior, except that biome.jsonc always allows trailing commas.
json.formatter.enabled
Section titled “json.formatter.enabled”Type: boolean
Enables or disables the formatter for JSON and languages that extend it.
json.formatter.indentStyle
Section titled “json.formatter.indentStyle”Type: "tab" | "space"
Selects the indentation style:
"tab": Uses tabs for indentation."space": Uses spaces for indentation.
json.formatter.indentWidth
Section titled “json.formatter.indentWidth”Type: integer
Sets the indentation width, from 0 through 24.
json.formatter.lineEnding
Section titled “json.formatter.lineEnding”Type: "lf" | "crlf" | "cr" | "auto"
Selects the line-ending sequence:
"lf": Line Feed (\n), commonly used on Linux and macOS."crlf": Carriage Return followed by Line Feed (\r\n), commonly used on Windows."cr": Carriage Return (\r), which is rarely used."auto": Uses CRLF on Windows and LF on other platforms.
json.formatter.lineWidth
Section titled “json.formatter.lineWidth”Type: integer
Sets the preferred maximum line width, from 1 through 320.
json.formatter.trailingCommas
Section titled “json.formatter.trailingCommas”Type: "none" | "all"
Default: "none"
Controls trailing commas in multiline JSON arrays and objects:
"none": Removes trailing commas."all": Adds trailing commas wherever the JSON formatter supports them.
Use "all" only for JSON variants that allow trailing commas, and ensure json.parser.allowTrailingCommas is enabled or automatically detected for those files.
json.formatter.bracketSpacing
Section titled “json.formatter.bracketSpacing”Type: boolean
Controls spaces inside the braces of single-line JSON objects.
Biome formats {"name": "Biome"} when disabled and { "name": "Biome" } when enabled.
json.formatter.delimiterSpacing
Section titled “json.formatter.delimiterSpacing”Type: boolean
Controls spaces immediately inside JSON square brackets when an array fits on one line.
Biome formats [1, 2, 3] when disabled and [ 1, 2, 3 ] when enabled. Empty arrays are unchanged.
json.formatter.expand
Section titled “json.formatter.expand”Type: "auto" | "always" | "never"
Controls whether arrays and objects are formatted on one line or multiple lines:
"auto": Formats objects on multiple lines if the first property has a leading newline, and keeps arrays on one line when they fit."always": Formats arrays and objects on multiple lines."never": Keeps arrays and objects on one line when they fit.
When formatting package.json, Biome uses "always" unless expansion is configured explicitly.
json.formatter.trailingNewline
Section titled “json.formatter.trailingNewline”Type: boolean
Controls whether formatted files end with a newline.
json.linter.enabled
Section titled “json.linter.enabled”Type: boolean
Enables or disables the linter for JSON and languages that extend it.
json.assist.enabled
Section titled “json.assist.enabled”Type: boolean
Enables or disables assist actions for JSON and languages that extend it.
Type: { parser?: object, formatter?: object, globals?: string[], linter?: object, assist?: object }
Options applied to CSS and languages that extend it.
css.parser.allowWrongLineComments
Section titled “css.parser.allowWrongLineComments”Type: boolean
Default: false
Enables // line comments in plain CSS. Standard CSS treats // as delimiter characters rather than as a comment, and SCSS accepts // comments independently of this option.
css.parser.cssModules
Section titled “css.parser.cssModules”Type: boolean
Default: false
Enables CSS Modules-specific syntax such as :local, :global, composes, and @value.
When this option is unset, Biome enables this syntax automatically for files whose names end in .module.css, so enable it explicitly only when CSS Module files use another naming convention.
css.parser.tailwindDirectives
Section titled “css.parser.tailwindDirectives”Type: boolean
Default: false
Enables parsing Tailwind CSS 4.0 directives and functions, including @theme, @utility, @variant, @source, and @apply.
css.formatter.enabled
Section titled “css.formatter.enabled”Type: boolean
Enables or disables the formatter for CSS and languages that extend it.
css.formatter.indentStyle
Section titled “css.formatter.indentStyle”Type: "tab" | "space"
Selects the indentation style:
"tab": Uses tabs for indentation."space": Uses spaces for indentation.
css.formatter.indentWidth
Section titled “css.formatter.indentWidth”Type: integer
Sets the indentation width, from 0 through 24.
css.formatter.lineEnding
Section titled “css.formatter.lineEnding”Type: "lf" | "crlf" | "cr" | "auto"
Selects the line-ending sequence:
"lf": Line Feed (\n), commonly used on Linux and macOS."crlf": Carriage Return followed by Line Feed (\r\n), commonly used on Windows."cr": Carriage Return (\r), which is rarely used."auto": Uses CRLF on Windows and LF on other platforms.
css.formatter.lineWidth
Section titled “css.formatter.lineWidth”Type: integer
Sets the preferred maximum line width, from 1 through 320.
css.formatter.quoteStyle
Section titled “css.formatter.quoteStyle”Type: "single" | "double"
Default: "double"
Selects the preferred quote style for CSS strings:
"single": Prefers single quotes."double": Prefers double quotes.
Biome may use the alternate quote when that avoids additional escaping.
Quotes in @charset rules are currently preserved.
css.formatter.delimiterSpacing
Section titled “css.formatter.delimiterSpacing”Type: boolean
Controls spaces immediately inside CSS parentheses and square brackets when their content fits on one line.
When enabled, rgb(0, 0, 0) becomes rgb( 0, 0, 0 ) and [data-attr] becomes [ data-attr ]. Empty delimiters are unchanged.
css.formatter.trailingNewline
Section titled “css.formatter.trailingNewline”Type: boolean
Controls whether formatted files end with a newline.
css.globals
Section titled “css.globals”Type: string[]
Reserved for future CSS analyzer support. This option currently has no effect.
css.linter.enabled
Section titled “css.linter.enabled”Type: boolean
Enables or disables the linter for CSS.
css.assist.enabled
Section titled “css.assist.enabled”Type: boolean
Enables or disables assist actions for CSS.
graphql
Section titled “graphql”Type: { formatter?: object, linter?: object, assist?: object }
Options applied to GraphQL files.
graphql.formatter.enabled
Section titled “graphql.formatter.enabled”Type: boolean
Enables or disables the formatter for GraphQL.
graphql.formatter.indentStyle
Section titled “graphql.formatter.indentStyle”Type: "tab" | "space"
Selects the indentation style:
"tab": Uses tabs for indentation."space": Uses spaces for indentation.
graphql.formatter.indentWidth
Section titled “graphql.formatter.indentWidth”Type: integer
Sets the indentation width, from 0 through 24.
graphql.formatter.lineEnding
Section titled “graphql.formatter.lineEnding”Type: "lf" | "crlf" | "cr" | "auto"
Selects the line-ending sequence:
"lf": Line Feed (\n), commonly used on Linux and macOS."crlf": Carriage Return followed by Line Feed (\r\n), commonly used on Windows."cr": Carriage Return (\r), which is rarely used."auto": Uses CRLF on Windows and LF on other platforms.
graphql.formatter.lineWidth
Section titled “graphql.formatter.lineWidth”Type: integer
Sets the preferred maximum line width, from 1 through 320.
graphql.formatter.quoteStyle
Section titled “graphql.formatter.quoteStyle”Type: "single" | "double"
Reserved for future formatter support. The current formatter preserves standard double-quoted GraphQL strings regardless of this setting.
graphql.formatter.bracketSpacing
Section titled “graphql.formatter.bracketSpacing”Type: boolean
Controls spaces inside the braces of single-line GraphQL object values.
Biome formats {name: "Biome"} when disabled and { name: "Biome" } when enabled.
graphql.formatter.trailingNewline
Section titled “graphql.formatter.trailingNewline”Type: boolean
Controls whether formatted files end with a newline.
graphql.linter.enabled
Section titled “graphql.linter.enabled”Type: boolean
Enables or disables the linter for GraphQL.
graphql.assist.enabled
Section titled “graphql.assist.enabled”Type: boolean
Default: false
Enables or disables assist actions for GraphQL.
Type: { formatter?: object, linter?: object, assist?: object }
Options applied to GritQL files.
grit.formatter.enabled
Section titled “grit.formatter.enabled”Type: boolean
Enables or disables the formatter for GritQL.
grit.formatter.indentStyle
Section titled “grit.formatter.indentStyle”Type: "tab" | "space"
Selects the indentation style:
"tab": Uses tabs for indentation."space": Uses spaces for indentation.
grit.formatter.indentWidth
Section titled “grit.formatter.indentWidth”Type: integer
Sets the indentation width, from 0 through 24.
grit.formatter.lineEnding
Section titled “grit.formatter.lineEnding”Type: "lf" | "crlf" | "cr" | "auto"
Selects the line-ending sequence:
"lf": Line Feed (\n), commonly used on Linux and macOS."crlf": Carriage Return followed by Line Feed (\r\n), commonly used on Windows."cr": Carriage Return (\r), which is rarely used."auto": Uses CRLF on Windows and LF on other platforms.
grit.formatter.lineWidth
Section titled “grit.formatter.lineWidth”Type: integer
Sets the preferred maximum line width, from 1 through 320.
grit.formatter.trailingNewline
Section titled “grit.formatter.trailingNewline”Type: boolean
Controls whether formatted files end with a newline.
grit.linter.enabled
Section titled “grit.linter.enabled”Type: boolean
Enables or disables the linter for GritQL.
grit.assist.enabled
Section titled “grit.assist.enabled”Type: boolean
Enables or disables assist actions for GritQL.
Type: { experimentalFullSupportEnabled?: boolean, parser?: object, formatter?: object, linter?: object, assist?: object }
Options applied to HTML and languages that extend it.
html.experimentalFullSupportEnabled
Section titled “html.experimentalFullSupportEnabled”Type: boolean
Default: false
Enables Biome’s experimental full support for .html, .vue, .svelte, and .astro files. In this mode, Biome parses the complete document and can analyze or format its markup and supported embedded languages.
When disabled, .vue, .svelte, and .astro files use legacy handling, which extracts their JavaScript or TypeScript portions and leaves the rest unchanged.
html.parser.interpolation
Section titled “html.parser.interpolation”Type: boolean
Default: false
Enables double-curly interpolation expressions such as {{ expression }} in .html files.
html.parser.vue
Section titled “html.parser.vue”Type: boolean
Default: false
Enables Vue syntax such as v-if and v-bind in .html files. Enabling this option also enables html.parser.interpolation.
Biome automatically recognizes .vue files. Use this option only when .html files contain Vue template syntax. It does not change how .vue, .svelte, or .astro files are parsed.
html.formatter.enabled
Section titled “html.formatter.enabled”Type: boolean
Default: false
Enables or disables the formatter for HTML and languages that extend it. Formatting complete HTML, Vue, Svelte, and Astro files requires html.experimentalFullSupportEnabled to be true.
html.formatter.indentStyle
Section titled “html.formatter.indentStyle”Type: "tab" | "space"
Selects the indentation style:
"tab": Uses tabs for indentation."space": Uses spaces for indentation.
html.formatter.indentWidth
Section titled “html.formatter.indentWidth”Type: integer
Sets the indentation width, from 0 through 24.
html.formatter.lineEnding
Section titled “html.formatter.lineEnding”Type: "lf" | "crlf" | "cr" | "auto"
Selects the line-ending sequence:
"lf": Line Feed (\n), commonly used on Linux and macOS."crlf": Carriage Return followed by Line Feed (\r\n), commonly used on Windows."cr": Carriage Return (\r), which is rarely used."auto": Uses CRLF on Windows and LF on other platforms.
html.formatter.lineWidth
Section titled “html.formatter.lineWidth”Type: integer
Sets the preferred maximum line width, from 1 through 320.
html.formatter.attributePosition
Section titled “html.formatter.attributePosition”Type: "auto" | "multiline"
Controls attribute placement in HTML elements:
"auto": Places attributes automatically and wraps them when needed."multiline": Places each attribute on its own line when an element has multiple attributes.
html.formatter.bracketSameLine
Section titled “html.formatter.bracketSameLine”Type: boolean
Controls the placement of the closing bracket for multiline HTML opening tags.
Biome places the bracket at the end of the last attribute line when enabled and on its own line after the last attribute when disabled.
This option also affects self-closing HTML elements.
html.formatter.whitespaceSensitivity
Section titled “html.formatter.whitespaceSensitivity”Type: "css" | "strict" | "ignore"
Default: "css"
Controls how the formatter treats whitespace around text and child elements in HTML, Vue, Svelte, and Astro markup:
"css": Treats whitespace as significant for elements that browsers display inline by default."strict": Treats leading and trailing whitespace as significant for every element. Existing whitespace is preserved as at least one character and absent whitespace is not added."ignore": Treats whitespace as insignificant, allowing the formatter to add or remove it. Use this only when whitespace cannot affect rendered output.
html.formatter.indentScriptAndStyle
Section titled “html.formatter.indentScriptAndStyle”Type: boolean
Default: false
Controls whether the content of <script> and <style> tags is indented by one level in HTML, Vue, Svelte, and Astro files.
html.formatter.selfCloseVoidElements
Section titled “html.formatter.selfCloseVoidElements”Type: "never" | "always"
Default: "never"
Controls whether HTML void elements such as <img> and <input> include a slash before >:
"never": Removes the slash, for example<img src="image.png">."always": Adds the slash, for example<img src="image.png" />.
html.formatter.trailingNewline
Section titled “html.formatter.trailingNewline”Type: boolean
Default: true
Controls whether formatted files end with a newline.
Unlike other language-specific trailing-newline settings, this option does not inherit formatter.trailingNewline.
html.linter.enabled
Section titled “html.linter.enabled”Type: boolean
Enables or disables the linter for HTML and languages that extend it.
html.assist.enabled
Section titled “html.assist.enabled”Type: boolean
Enables or disables assist actions for HTML and languages that extend it.
Glob syntax reference
Section titled “Glob syntax reference”Biome uses glob patterns to match file and directory paths relative to the configuration directory. Patterns are case-sensitive and use / as the path separator.
| Syntax | Meaning | Example |
|---|---|---|
* | Matches characters within one path segment | src/*.js |
** | Matches zero or more complete path segments | **/*.js |
{a,b} | Matches either alternative | **/*.{js,ts} |
\ | Escapes a special character so it is matched literally. Write \\ in JSON configuration files. | file\\?.js |
!pattern | Excludes matching paths | !**/*.test.js |
!!pattern | Force-ignores matching paths in files.includes | !!**/dist |
Patterns are evaluated in order, and the last matching pattern wins. For example, the following patterns include JavaScript files, exclude test files, then include src/special.test.js again:
["**/*.js", "!**/*.test.js", "src/special.test.js"]files.includes applies to both files and directories, while other includes settings filter files for a specific feature. This changes how directory exclusions are written:
| Goal | files.includes | Other includes settings |
|---|---|---|
Exclude the root dist directory | !dist | !dist/** |
Exclude dist directories at any depth | !**/dist | !**/dist/** |
Force-ignore dist directories at any depth | !!**/dist | Not supported |
The !! prefix creates a force-ignore pattern only in files.includes. In other includes settings, it behaves like a regular ! exclusion. See scanner behavior for details.
Biome intentionally has a limited glob syntax, with a few expected features not supported:
| Syntax | Behavior |
|---|---|
? | Not supported as a wildcard |
[abc] and [0-9] | Character classes are not supported |
{{a,b},c} | Nested alternatives are not supported |
a**, **a, and *** | ** must occupy an entire path segment |
**/** | Consecutive globstars are not supported |
Copyright (c) 2023-present Biome Developers and Contributors.