Configuration
$schema
Section titled $schemaAllows to pass a path to a JSON schema file.
We publish a JSON schema file for our biome.json
/biome.jsonc
files.
You can specify a relative path to the schema inside the @biomejs/biome
NPM
package if it is installed in the node_modules
folder:
{ "$schema": "./node_modules/@biomejs/biome/configuration_schema.json"}
If you have problems with resolving the physical file, you can use the one published on this site:
{ "$schema": "https://biomejs.dev/schemas/2.0.0-beta/schema.json"}
extends
Section titled extendsA list of paths to other Biome configuration files. Biome resolves and applies
the configuration settings from the files contained in the extends
list, and
eventually applies the options contained in this biome.json
/biome.jsonc
file.
The order of paths to extend goes from least relevant to most relevant.
files
Section titled filesfiles.includes
Section titled files.includesA list of glob patterns of files to process.
If a folder matches a glob pattern, all files inside that folder will be processed.
The following example matches all files with a .js
extension inside the src
folder:
{ "files": { "includes": ["src/**/*.js"] }}
*
is used to match all files in a folder, while **
recursively matches
all files and subfolders in a folder. For more information on globs, see the
glob syntax reference
includes
also supports negated patterns, or exceptions. These are patterns
that start with !
and they can be used to instruct Biome to process all files
except those matching the negated pattern.
Note that exceptions are processed in order, allowing you to specify exceptions to exceptions.
Consider the following example:
{ "files": { "includes": ["**", "!**/*.test.js", "**/special.test.js", "!test"] }}
This example specifies that:
- All files inside all (sub)folders are processed, thanks to the
**
pattern… - … except when those files have a
.test.js
extension… - … but the file
special.test.ts
is still processed… - … except when it occurs in the folder named
test
, because no files inside that folder are processed.
This means that:
src/app.js
is processed.src/app.test.js
is not processed.src/special.test.js
*is processed.test/special.test.js
*is not processed.
files.ignoreUnknown
Section titled files.ignoreUnknownIf true
, Biome won’t emit diagnostics if it encounters files that it can’t
handle.
{ "files": { "ignoreUnknown": true }}
Default:
false
files.maxSize
Section titled files.maxSizeThe maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reasons.
Default:
1048576
(1024*1024, 1MB)
Set of properties to integrate Biome with a VCS (Version Control Software).
vcs.enabled
Section titled vcs.enabledWhether Biome should integrate itself with the VCS client
Default:
false
vcs.clientKind
Section titled vcs.clientKindThe kind of client.
Values:
"git"
vcs.useIgnoreFile
Section titled vcs.useIgnoreFileWhether Biome should use the VCS ignore file. When true
, Biome will ignore the files
specified in the ignore file.
vcs.root
Section titled vcs.rootThe folder where Biome should check for VCS files. By default, Biome will use the same
folder where biome.json
was found.
If Biome can’t find the configuration, it will attempt to use the current working directory. If no current working directory can’t be found, Biome won’t use the VCS integration, and a diagnostic will be emitted
vcs.defaultBranch
Section titled vcs.defaultBranchThe main branch of the project. Biome will use this branch when evaluating the changed files.
linter
Section titled linterlinter.enabled
Section titled linter.enabledEnables Biome’s linter.
Default:
true
linter.includes
Section titled linter.includesA list of glob patterns of files to lint.
The following example lints all files with a .js
extension inside the src
folder:
{ "linter": { "includes": ["src/**/*.js"] }}
*
is used to match all files in a folder, while **
recursively matches
all files and subfolders in a folder. For more information on globs, see the
glob syntax reference
includes
also supports negated patterns, or exceptions. These are patterns
that start with !
and they can be used to instruct Biome to process all files
except those matching the negated pattern.
Note that exceptions are processed in order, allowing you to specify exceptions to exceptions.
Consider the following example:
{ "linter": { "includes": ["**", "!**/*.test.js", "**/special.test.js"] }}
This example specifies that:
- All files inside all (sub)folders are linted, thanks to the
**
pattern… - … except when those files have a
.test.js
extension… - … but the file
special.test.ts
is still linted.
This means that:
src/app.js
is linted.src/app.test.js
is not linted.src/special.test.js
*is linted.
Note that linter.includes
is applied after files.includes
. This means
that any file that is not matched by files.includes
can no longer be matched
linter.includes
. This means the following example doesn’t work:
{ "files": { "includes": "src/**" }, "linter": { // This matches nothing because there is no overlap with `files.includes`: "includes": "scripts/**" }}
If linter.includes
is not specified, all files matched by
files.includes
are linted.
linter.rules.recommended
Section titled linter.rules.recommendedEnables the recommended rules for all groups.
Default:
true
linter.rules.[group]
Section titled linter.rules.[group]Options that influence the rules of a single group. Biome supports the following groups:
- accessibility: Rules focused on preventing accessibility problems.
- complexity: Rules that focus on inspecting complex code that could be simplified.
- correctness: Rules that detect code that is guaranteed to be incorrect or useless.
- nursery: New rules that are still under development. Nursery rules require explicit opt-in via configuration on stable versions because they may still have bugs or performance problems. They are enabled by default on nightly builds, but as they are unstable their diagnostic severity may be set to either error or warning, depending on whether we intend for the rule to be recommended or not when it eventually gets stabilized. Nursery rules get promoted to other groups once they become stable or may be removed. Rules that belong to this group are not subject to semantic version.
- performance: Rules catching ways your code could be written to run faster, or generally be more efficient.
- security: Rules that detect potential security flaws.
- style: Rules enforcing a consistent and idiomatic way of writing your code.
- suspicious: Rules that detect code that is likely to be incorrect or useless.
Each group can accept, as a value, a string that represents the severity or an object where each rule can be configured.
When passing the severity, you can control the severity emitted by all the rules that belong to a group.
For example, you can configure the a11y
group to emit information diagnostics:
{ "linter": { "rules": { "a11y": "info" } }}
Here are the accepted values:
"on"
: each rule that belongs to the group will emit a diagnostic with the default severity of the rule. Refer to the documentation of the rule, or use theexplain
command:Terminal window biome explain noDebugger"off"
: none of the rules that belong to the group will emit any diagnostics."info"
: all rules that belong to the group will emit a diagnostic with information severity."warn"
: all rules that belong to the group will emit a diagnostic with warning severity."error"
: all rules that belong to the group will emit a diagnostic with error severity.
linter.rules.[group].recommended
Section titled linter.rules.[group].recommendedEnables the recommended rules for a single group.
Example:
{ "linter": { "enabled": true, "rules": { "nursery": { "recommended": true } } }}
formatter
Section titled formatterThese options apply to all languages. There are additional language-specific formatting options below.
formatter.enabled
Section titled formatter.enabledEnables Biome’s formatter.
Default:
true
formatter.includes
Section titled formatter.includesA list of glob patterns of files to format.
The following example formats all files with a .js
extension inside the src
folder:
{ "formatter": { "includes": ["src/**/*.js"] }}
*
is used to match all files in a folder, while **
recursively matches
all files and subfolders in a folder. For more information on globs, see the
glob syntax reference
includes
also supports negated patterns, or exceptions. These are patterns
that start with !
and they can be used to instruct Biome to process all files
except those matching the negated pattern.
Note that exceptions are processed in order, allowing you to specify exceptions to exceptions.
Consider the following example:
{ "formatter": { "includes": ["**", "!**/*.test.js", "**/special.test.js"] }}
This example specifies that:
- All files inside all (sub)folders are formatted, thanks to the
**
pattern… - … except when those files have a
.test.js
extension… - … but the file
special.test.ts
is still formatted.
This means that:
src/app.js
is formatted.src/app.test.js
is not formatted.src/special.test.js
*is formatted.
Note that formatter.includes
is applied after files.includes
. This means
that any file that is not matched by files.includes
can no longer be matched
formatter.includes
. This means the following example doesn’t work:
{ "files": { "includes": "src/**" }, "formatter": { // This matches nothing because there is no overlap with `files.includes`: "includes": "scripts/**" }}
If formatter.includes
is not specified, all files matched by
files.includes
are formatted.
formatter.formatWithErrors
Section titled formatter.formatWithErrorsAllows to format a document that has syntax errors.
{ "formatter": { "formatWithErrors": true }}
Default:
false
formatter.indentStyle
Section titled formatter.indentStyleThe style of the indentation. It can be "tab"
or "space"
.
Default:
"tab"
formatter.indentWidth
Section titled formatter.indentWidthHow big the indentation should be.
Default:
2
formatter.lineEnding
Section titled formatter.lineEndingThe type of line ending.
"lf"
, Line Feed only (\n
), common on Linux and macOS as well as inside git repos;"crlf"
, Carriage Return + Line Feed characters (\r\n
), common on Windows;"cr"
, Carriage Return character only (\r
), used very rarely.
Default:
"lf"
formatter.lineWidth
Section titled formatter.lineWidthThe amount of characters that can be written on a single line..
Default:
80
formatter.attributePosition
Section titled formatter.attributePositionThe attribute position style in HTMLish languages.
"auto"
, the attributes are automatically formatted, and they will collapse in multiple lines only when they hit certain criteria;"multiline"
, the attributes will collapse in multiple lines if more then 1 attribute is used.
Default:
"auto"
formatter.bracketSpacing
Section titled formatter.bracketSpacingChoose whether spaces should be added between brackets and inner values.
Default:
true
formatter.objectWrap
Section titled formatter.objectWrapWhether to enforce collapsing object literals when possible.
"preserve"
, object literals are expanded if the first property has a leading newline."collapse"
, enforce object literals to collapse if possible (shorter than the max line width).
Default:
"preserve"
formatter.useEditorconfig
Section titled formatter.useEditorconfigWhether Biome should use the .editorconfig
file to determine the formatting options.
The config files .editorconfig
and biome.json
will follow the follwing rules:
- Formatting settings in
biome.json
always take precedence over.editorconfig
files. .editorconfig
files that exist higher up in the hierarchy than abiome.json
file are already ignored. This is to avoid loading formatting settings from someone’s home directory into a project with abiome.json
file.- Nested
.editorconfig
files aren’t supported currently.
Default:
true
javascript
Section titled javascriptThese options apply only to JavaScript (and TypeScript) files.
javascript.parser.unsafeParameterDecoratorsEnabled
Section titled javascript.parser.unsafeParameterDecoratorsEnabledAllows to support the unsafe/experimental parameter decorators.
{ "javascript": { "parser": { "unsafeParameterDecoratorsEnabled": true } }}
Default:
false
javascript.parser.jsxEverywhere
Section titled javascript.parser.jsxEverywhereWhen set to true
, allows to parse JSX syntax inside .js
files. When set to false
, Biome will raise diagnostics when it encounters JSX syntax inside .js
files.
Default:
true
{ "javascript": { "parser": { "jsxEverywhere": false } }}
javascript.formatter.quoteStyle
Section titled javascript.formatter.quoteStyleThe type of quote used when representing string literals. It can be "single"
or "double"
.
Default:
"double"
javascript.formatter.jsxQuoteStyle
Section titled javascript.formatter.jsxQuoteStyleThe type of quote used when representing jsx string literals. It can be "single"
or "double"
.
Default:
"double"
{ "javascript": { "formatter": { "jsxQuoteStyle": "single" } }}
javascript.formatter.quoteProperties
Section titled javascript.formatter.quotePropertiesWhen properties inside objects should be quoted. It can be "asNeeded"
or "preserve"
.
Default:
"asNeeded"
{ "javascript": { "formatter": { "quoteProperties": "preserve" } }}
javascript.formatter.trailingCommas
Section titled javascript.formatter.trailingCommasPrint trailing commas wherever possible in multi-line comma-separated syntactic structures. Possible values:
"all"
, the trailing comma is always added;"es5"
, the trailing comma is added only in places where it’s supported by older version of JavaScript;"none"
, trailing commas are never added.
Default:
"all"
javascript.formatter.semicolons
Section titled javascript.formatter.semicolonsIt configures where the formatter prints semicolons:
"always"
, the semicolons is always added at the end of each statement;"asNeeded"
, the semicolons are added only in places where it’s needed, to protect from ASI.
Default:
"always"
Example:
{ "javascript": { "formatter": { "semicolons": "asNeeded" } }}
javascript.formatter.arrowParentheses
Section titled javascript.formatter.arrowParenthesesWhether to add non-necessary parentheses to arrow functions:
"always"
, the parentheses are always added;"asNeeded"
, the parentheses are added only when they are needed.
Default:
"always"
javascript.formatter.enabled
Section titled javascript.formatter.enabledEnables Biome’s formatter for JavaScript (and its super languages) files.
Default:
true
javascript.formatter.indentStyle
Section titled javascript.formatter.indentStyleThe style of the indentation for JavaScript (and its super languages) files. It can be "tab"
or "space"
.
Default:
"tab"
javascript.formatter.indentWidth
Section titled javascript.formatter.indentWidthHow big the indentation should be for JavaScript (and its super languages) files.
Default:
2
javascript.formatter.lineEnding
Section titled javascript.formatter.lineEndingThe type of line ending for JavaScript (and its super languages) files.
"lf"
, Line Feed only (\n
), common on Linux and macOS as well as inside git repos;"crlf"
, Carriage Return + Line Feed characters (\r\n
), common on Windows;"cr"
, Carriage Return character only (\r
), used very rarely.
Default:
"lf"
javascript.formatter.lineWidth
Section titled javascript.formatter.lineWidthThe amount of characters that can be written on a single line in JavaScript (and its super languages) files.
Default:
80
javascript.formatter.bracketSameLine
Section titled javascript.formatter.bracketSameLineChoose whether the ending >
of a multi-line JSX element should be on the last attribute line or not
Default:
false
javascript.formatter.bracketSpacing
Section titled javascript.formatter.bracketSpacingChoose whether spaces should be added between brackets and inner values.
Default:
true
javascript.formatter.attributePosition
Section titled javascript.formatter.attributePositionThe attribute position style in jsx elements.
"auto"
, do not enforce single attribute per line."multiline"
, enforce single attribute per line.
Default:
"auto"
javascript.formatter.objectWrap
Section titled javascript.formatter.objectWrapWhether to enforce collapsing object literals when possible.
"preserve"
, object literals are expanded if the first property has a leading newline."collapse"
, enforce object literals to collapse if possible (shorter than the max line width).
Default:
"preserve"
javascript.globals
Section titled javascript.globalsA list of global names that Biome should ignore (analyzer, linter, etc.)
{ "javascript": { "globals": ["$", "_", "externalVariable"] }}
javascript.jsxRuntime
Section titled javascript.jsxRuntimeIndicates the type of runtime or transformation used for interpreting JSX.
"transparent"
— Indicates a modern or native JSX environment, that doesn’t require special handling by Biome."reactClassic"
— Indicates a classic React environment that requires theReact
import. Corresponds to thereact
value for thejsx
option in TypeScript’stsconfig.json
.
{ "javascript": { "jsxRuntime": "reactClassic" }}
For more information about the old vs. new JSX runtime, please see: https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html
Default:
"transparent"
javascript.linter.enabled
Section titled javascript.linter.enabledEnables Biome’s linter for JavaScript (and its super languages) files.
Default:
true
{ "javascript": { "linter": { "enabled": false } }}
javascript.assist.enabled
Section titled javascript.assist.enabledEnables Biome’s assist for JavaScript (and its super languages) files.
Default:
true
{ "javascript": { "assist": { "enabled": false } }}
Options applied to the JSON files.
json.parser.allowComments
Section titled json.parser.allowCommentsEnables the parsing of comments in JSON files.
{ "json": { "parser": { "allowComments": true } }}
json.parser.allowTrailingCommas
Section titled json.parser.allowTrailingCommasEnables the parsing of trailing commas in JSON files.
{ "json": { "parser": { "allowTrailingCommas": true } }}
json.formatter.enabled
Section titled json.formatter.enabledEnables Biome’s formatter for JSON (and its super languages) files.
Default:
true
{ "json": { "formatter": { "enabled": false } }}
json.formatter.indentStyle
Section titled json.formatter.indentStyleThe style of the indentation for JSON (and its super languages) files. It can be "tab"
or "space"
.
Default:
"tab"
json.formatter.indentWidth
Section titled json.formatter.indentWidthHow big the indentation should be for JSON (and its super languages) files.
Default:
2
json.formatter.lineEnding
Section titled json.formatter.lineEndingThe type of line ending for JSON (and its super languages) files.
"lf"
, Line Feed only (\n
), common on Linux and macOS as well as inside git repos;"crlf"
, Carriage Return + Line Feed characters (\r\n
), common on Windows;"cr"
, Carriage Return character only (\r
), used very rarely.
Default:
"lf"
json.formatter.lineWidth
Section titled json.formatter.lineWidthThe amount of characters that can be written on a single line in JSON (and its super languages) files.
Default:
80
json.formatter.trailingCommas
Section titled json.formatter.trailingCommasPrint trailing commas wherever possible in multi-line comma-separated syntactic structures.
Allowed values:
"none"
: the trailing comma is removed;"all"
: the trailing comma is kept and preferred.
Default:
"none"
json.formatter.bracketSpacing
Section titled json.formatter.bracketSpacingChoose whether spaces should be added between brackets and inner values.
Default:
true
json.formatter.objectWrap
Section titled json.formatter.objectWrapWhether to enforce collapsing object literals when possible.
"preserve"
, object literals are expanded if the first property has a leading newline."collapse"
, enforce object literals to collapse if possible (shorter than the max line width).
Default:
"preserve"
json.formatter.expand
Section titled json.formatter.expandWhether to expand arrays and objects literals on multiple lines.
"followSource"
: arrays and objects literals are formatted on multiple lines if they already were on multiple lines, or if they don’t fit on a single line."always"
: arrays and objects literals are formatted on multiple lines, regardless of length of the list.
When formatting package.json
, Biome will use always
unless configured otherwise.
Default:
"followSource"
json.linter.enabled
Section titled json.linter.enabledEnables Biome’s formatter for JSON (and its super languages) files.
Default:
true
{ "json": { "linter": { "enabled": false } }}
json.assist.enabled
Section titled json.assist.enabledEnables Biome’s assist for JSON (and its super languages) files.
Default:
true
{ "json": { "assist": { "enabled": false } }}
Options applied to the CSS files.
css.parser.cssModules
Section titled css.parser.cssModulesEnables parsing of CSS modules
Default:
false
css.formatter.enabled
Section titled css.formatter.enabledEnables Biome’s formatter for CSS files.
Default:
false
{ "css": { "formatter": { "enabled": false } }}
css.formatter.indentStyle
Section titled css.formatter.indentStyleThe style of the indentation for CSS files. It can be "tab"
or "space"
.
Default:
"tab"
css.formatter.indentWidth
Section titled css.formatter.indentWidthHow big the indentation should be for CSS files.
Default:
2
{ "css": { "formatter": { "indentWidth": 2 } }}
css.formatter.lineEnding
Section titled css.formatter.lineEndingThe type of line ending for CSS files.
"lf"
, Line Feed only (\n
), common on Linux and macOS as well as inside git repos;"crlf"
, Carriage Return + Line Feed characters (\r\n
), common on Windows;"cr"
, Carriage Return character only (\r
), used very rarely.
Default:
"lf"
css.formatter.lineWidth
Section titled css.formatter.lineWidthThe amount of characters that can be written on a single line in CSS files.
Default:
80
css.formatter.quoteStyle
Section titled css.formatter.quoteStyleThe type of quote used when representing string literals. It can be "single"
or "double"
.
Default:
"double"
css.linter.enabled
Section titled css.linter.enabledEnables Biome’s linter for CSS files.
Default:
true
{ "css": { "linter": { "enabled": false } }}
css.assist.enabled
Section titled css.assist.enabledEnables Biome’s assist for CSS files.
Default:
true
{ "css": { "assist": { "enabled": false } }}
graphql
Section titled graphqlOptions applied to the GraphQL files.
graphql.formatter.enabled
Section titled graphql.formatter.enabledEnables Biome’s formatter for GraphQL files.
Default:
false
graphql.formatter.indentStyle
Section titled graphql.formatter.indentStyleThe style of the indentation for GraphQL files. It can be "tab"
or "space"
.
Default:
"tab"
graphql.formatter.indentWidth
Section titled graphql.formatter.indentWidthHow big the indentation should be for GraphQL files.
Default:
2
graphql.formatter.lineEnding
Section titled graphql.formatter.lineEndingThe type of line ending for GraphQL files.
"lf"
, Line Feed only (\n
), common on Linux and macOS as well as inside git repos;"crlf"
, Carriage Return + Line Feed characters (\r\n
), common on Windows;"cr"
, Carriage Return character only (\r
), used very rarely.
Default:
"lf"
graphql.formatter.lineWidth
Section titled graphql.formatter.lineWidthThe amount of characters that can be written on a single line in GraphQL files.
Default:
80
graphql.formatter.quoteStyle
Section titled graphql.formatter.quoteStyleThe type of quote used when representing string literals. It can be "single"
or "double"
.
Default:
"double"
graphql.linter.enabled
Section titled graphql.linter.enabledEnables Biome’s linter for GraphQL files.
Default:
true
graphql.assist.enabled
Section titled graphql.assist.enabledEnables Biome’s assist for GraphQL files.
Default:
true
Options applied to the Grit files.
grit.formatter.enabled
Section titled grit.formatter.enabledEnables Biome’s formatter for Grit files.
Default:
false
grit.formatter.indentStyle
Section titled grit.formatter.indentStyleThe style of the indentation for Grit files. It can be "tab"
or "space"
.
Default:
"tab"
grit.formatter.indentWidth
Section titled grit.formatter.indentWidthHow big the indentation should be for Grit files.
Default:
2
grit.formatter.lineEnding
Section titled grit.formatter.lineEndingThe type of line ending for Grit files.
"lf"
, Line Feed only (\n
), common on Linux and macOS as well as inside git repos;"crlf"
, Carriage Return + Line Feed characters (\r\n
), common on Windows;"cr"
, Carriage Return character only (\r
), used very rarely.
Default:
"lf"
grit.formatter.lineWidth
Section titled grit.formatter.lineWidthThe amount of characters that can be written on a single line in Grit files.
Default:
80
grit.formatter.quoteStyle
Section titled grit.formatter.quoteStyleThe type of quote used when representing string literals. It can be "single"
or "double"
.
Default:
"double"
grit.linter.enabled
Section titled grit.linter.enabledEnables Biome’s linter for Grit files.
Default:
true
{ "grit": { "linter": { "enabled": false } }}
grit.assist.enabled
Section titled grit.assist.enabledEnables Biome’s assist for Grit files.
Default:
true
{ "grit": { "assist": { "enabled": false } }}
overrides
Section titled overridesA list of patterns.
Use this configuration to change the behaviour of the tools for certain files.
When a file is matched against an override pattern, the configuration specified in that pattern will be override the top-level configuration.
The order of the patterns matter. If a file can match three patterns, only the first one is used.
overrides.<ITEM>.includes
Section titled overrides.<ITEM>.includesA list of glob patterns of files for which to apply customised settings.
{ "overrides": [{ "includes": ["scripts/*.js"], // settings that should only apply to the files specified in the includes field. }]}
overrides.<ITEM>.formatter
Section titled overrides.<ITEM>.formatterIt will include the options of top level formatter configuration, minus ignore
and include
.
Examples
Section titled ExamplesFor example, it’s possible to modify the formatter lineWidth
, indentStyle
for certain files that are included in the glob path generated/**
:
{ "formatter": { "lineWidth": 100 }, "overrides": [ { "includes": ["generated/**"], "formatter": { "lineWidth": 160, "indentStyle": "space" } } ]}
overrides.<ITEM>.linter
Section titled overrides.<ITEM>.linterIt will include the options of top level linter configuration, minus ignore
and include
.
Examples
Section titled ExamplesYou can disable certain rules for certain glob paths, and disable the linter for other glob paths:
{ "linter": { "enabled": true, "rules": { "recommended": true } }, "overrides": [ { "includes": ["lib/**"], "linter": { "rules": { "suspicious": { "noDebugger": "off" } } } }, { "includes": ["shims/**"], "linter": { "enabled": false } } ]}
overrides.<ITEM>.organizeImports
Section titled overrides.<ITEM>.organizeImportsIt will include the options of top level organize imports, minus ignore
and include
.
overrides.<ITEM>.javascript
Section titled overrides.<ITEM>.javascriptIt will include the options of top level javascript configuration.
Examples
Section titled ExamplesYou can change the formatting behaviour of JavaScript files in certain folders:
{ "formatter": { "lineWidth": 120 }, "javascript": { "formatter": { "quoteStyle": "single" } }, "overrides": [ { "includes": ["lib/**"], "javascript": { "formatter": { "quoteStyle": "double" } } } ]}
overrides.<ITEM>.json
Section titled overrides.<ITEM>.jsonIt will include the options of top level json configuration.
Examples
Section titled ExamplesYou can enable parsing features for certain JSON files:
{ "linter": { "enabled": true, "rules": { "recommended": true } }, "overrides": [ { "includes": [".vscode/**"], "json": { "parser": { "allowComments": true, "allowTrailingCommas": true } } } ]}
Glob syntax reference
Section titled Glob syntax referenceGlob patterns are used to match paths of files and folders. Biome supports the following syntax in globs:
*
matches zero or more characters. It cannot match the path separator/
.**
recursively matches directories and files. This sequence must be used as an entire path component, so both**a
andb**
are invalid and will result in an error. A sequence of more than two consecutive*
characters is also invalid.[...]
matches any character inside the brackets. Ranges of characters can also be specified, as ordered by Unicode, so e.g.[0-9]
specifies any character between 0 and 9 inclusive.[!...]
is the negation of[...]
, i.e. it matches any characters not in the brackets.- If the entire glob starts with
!
, it is a so-called negated pattern. This glob only matches if the path doesn’t match the glob. Negated patterns cannot be used alone, they can only be used as exception to a regular glob.
Some examples:
dist/**
matches thedist/
folder and all files inside it.**/test/**
matches all files under any folder namedtest
, regardless of where they are. E.g.dist/test
,src/test
.**/*.js
matches all files ending with the extension.js
in all folders.