Configuration
1.8.1Schema URL
The configuration that is contained inside the file biome.json
Properties
A field for the JSON schema specification
Specific configuration for the Css language
A list of paths to other JSON files, used to extends the current configuration.
The configuration of the filesystem
The configuration of the formatter
Specific configuration for the JavaScript language
Specific configuration for the Json language
The configuration for the linter
The configuration of the import sorting
A list of granular patterns that should be applied only to a sub set of files
The configuration of the VCS integration
Definitions
A list of rules that belong to this group
It enables ALL rules for this group.
Enforce that the accessKey attribute is not used on any HTML element.
Enforce that aria-hidden="true" is not set on focusable elements.
Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
Enforce that autoFocus prop is not used on elements.
Disallow target="_blank" attribute without rel="noreferrer"
Enforces that no distracting elements are used.
The scope prop should be used only on <th> elements.
Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements.
Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.
Enforce that tabIndex is not assigned to non-interactive HTML elements.
Prevent the usage of positive integers on tabIndex property
Enforce img alt prop does not contain the word "image", "picture", or "photo".
Enforce explicit role property is not the same as implicit/default role property on an element.
Enforces the usage of the title element for the svg element.
It enables the recommended rules for this group
Enforce that all elements that require alternative text have meaningful information to relay back to the end user.
Enforce that anchors have content and that the content is accessible to screen readers.
Enforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant.
Enforce that elements with ARIA roles must have all required ARIA attributes for that role.
Enforces the usage of the attribute type for the element button
Enforce that heading elements (h1, h2, etc.) have content and that the content is accessible to screen readers. Accessible means that it is not hidden using the aria-hidden prop.
Enforce that html element has lang attribute.
Enforces the usage of the attribute title for the element iframe.
Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress.
Enforce onMouseOver / onMouseOut are accompanied by onFocus / onBlur.
Enforces that audio and video elements must have a track for captions.
Enforce that all anchors are valid, and they are navigable elements.
Ensures that ARIA properties aria-* are all valid.
Elements with ARIA roles must use a valid, non-abstract ARIA role.
Enforce that ARIA state and property values are valid.
Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.
A list of rules that belong to this group
It enables ALL rules for this group.
Disallow primitive type aliases and misleading types.
Disallow empty type parameters in type aliases and interfaces.
Disallow functions that exceed a given Cognitive Complexity score.
This rule enforces a maximum depth to nested describe() in test files.
Disallow unnecessary boolean casts
Prefer for...of statement instead of Array.forEach.
Disallow unclear usage of consecutive space characters in regular expression literals
This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.
Disallow this and super in static contexts.
Disallow unnecessary catch clauses.
Disallow unnecessary constructors.
Disallow empty exports that don't change anything in a module file.
Disallow unnecessary fragments
Disallow unnecessary labels.
Disallow unnecessary nested block statements.
Disallow renaming import, export, and destructured assignments to the same name.
Disallow useless case in switch statements.
Disallow ternary operators when simpler alternatives exist.
Disallow useless this aliasing.
Disallow using any or unknown as type constraint.
Disallow the use of void operators, which is not a familiar operator.
Disallow with statements in non-strict contexts.
It enables the recommended rules for this group
Use arrow functions over function expressions.
Promotes the use of .flatMap() when map().flat() are used together.
Enforce the usage of a literal access to properties over computed property access.
Enforce using concise optional chain instead of chained logical expressions.
Enforce the use of the regular expression literals instead of the RegExp constructor if possible.
Disallow number literal object member names which are not base10 or uses underscore as separator
Discard redundant terms from logical expressions.
Options for the rule noExcessiveCognitiveComplexity.
The maximum complexity score that we allow. Anything higher is considered excessive.
A list of rules that belong to this group
It enables ALL rules for this group.
Prevent passing of children as props.
Prevents from having const variables being re-assigned.
Disallow constant expressions in conditions
Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant.
Disallow returning a value from a constructor.
Disallow empty character classes in regular expression literals.
Disallows empty destructuring patterns.
Disallow to use unnecessary callback on flatMap.
Disallow calling global object properties as functions
Disallow function and var declarations that are accessible outside their block.
Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.
Disallow new operators with global non-constructor functions.
Disallow the use of variables and function parameters before their declaration
Disallow new operators with the Symbol object.
Forbid the use of Node.js builtin modules.
Disallow \8 and \9 escape sequences in string literals.
Disallow literal numbers that lose precision
Prevent the usage of the return value of React.render.
Disallow assignments where both sides are exactly the same.
Disallow returning a value from a setter
Disallow comparison of expressions modifying the string case with non-compliant value.
Disallow lexical declarations in switch clauses.
Prevents the usage of variables that haven't been declared inside the document.
Avoid using unnecessary continue.
Disallow unreachable code
Ensures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass
Disallow control flow statements in finally blocks.
Disallow the use of optional chaining in contexts where the undefined value is not allowed.
Disallow unused imports.
Disallow unused labels.
Disallow unused private class members
Disallow unused variables.
This rules prevents void elements (AKA self-closing elements) from having children.
Disallow returning a value from a function with the return type 'void'
It enables the recommended rules for this group
Disallow Array constructors.
Enforce all dependencies are correctly specified in a React hook.
Enforce that all React hooks are being called from the Top Level component functions.
Require calls to isNaN() when checking for NaN.
Disallow missing key props in iterators/collection literals.
Enforce "for" loop update clause moving the counter in the right direction.
Require generator functions to contain yield.
Options applied to CSS files
CSS formatter options
CSS linter options
CSS parsing options
Options that changes how the CSS formatter behaves
Control the formatter for CSS (and its super languages) files.
The indent style applied to CSS (and its super languages) files.
The size of the indentation applied to CSS (and its super languages) files. Default to 2.
The type of line ending applied to CSS (and its super languages) files.
What's the max width of a line applied to CSS (and its super languages) files. Defaults to 80.
The type of quotes used in CSS code. Defaults to double.
Options that changes how the CSS linter behaves
Control the linter for CSS (and its super languages) files.
Options that changes how the CSS parser behaves
Allow comments to appear on incorrect lines in .css files
Enables parsing of CSS Modules specific features.
Options for the useHookAtTopLevel rule have been deprecated, since we now use the React hook naming convention to determine whether a function is a hook.
Supported cases for file names.
Rule's options.
If false, then non-ASCII characters are allowed.
If false, then consecutive uppercase are allowed in camel and pascal cases. This does not affect other [Case].
The configuration of the filesystem
A list of Unix shell style patterns. Biome will ignore files/folders that will match these patterns.
Tells Biome to not emit diagnostics when handling files that doesn't know
A list of Unix shell style patterns. Biome will handle only those files/folders that will match these patterns.
The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reasons. Defaults to 1 MiB
Used to identify the kind of code action emitted by a rule
Supported cases.
Generic options applied to all files
The attribute position style in HTMLish languages. By default auto.
Stores whether formatting should be allowed to proceed if a given file has syntax errors
A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.
A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.
The size of the indentation, 2 by default (deprecated, use indent-width)
The indent style.
The size of the indentation, 2 by default
The type of line ending.
What's the max width of a line. Defaults to 80.
The name of the hook.
Whether the result of the hook is stable.
Set to true to mark the identity of the hook's return value as stable, or use a number/an array of numbers to mark the "positions" in the return array as stable.
For example, for React's useRef() hook the value would be true, while for useState() it would be [1].
The "position" of the closure function, starting from zero.
For example, for React's useEffect() hook, the closure index is 0.
The "position" of the array of dependencies, starting from zero.
For example, for React's useEffect() hook, the dependencies index is 1.
Options for the rule useExhaustiveDependencies
List of hooks of which the dependencies should be validated.
A set of options applied to the JavaScript files
Formatting options
A list of global bindings that should be ignored by the analyzers
If defined here, they should not emit diagnostics.
Indicates the type of runtime or transformation used for interpreting JSX.
Linter options
Parsing options
Formatting options specific to the JavaScript files
Whether to add non-necessary parentheses to arrow functions. Defaults to "always".
The attribute position style in jsx elements. Defaults to auto.
Whether to hug the closing bracket of multiline HTML/JSX tags to the end of the last line, rather than being alone on the following line. Defaults to false.
Whether to insert spaces around brackets in object literals. Defaults to true.
Control the formatter for JavaScript (and its super languages) files.
The size of the indentation applied to JavaScript (and its super languages) files. Default to 2.
The indent style applied to JavaScript (and its super languages) files.
The size of the indentation applied to JavaScript (and its super languages) files. Default to 2.
The type of quotes used in JSX. Defaults to double.
The type of line ending applied to JavaScript (and its super languages) files.
What's the max width of a line applied to JavaScript (and its super languages) files. Defaults to 80.
When properties in objects are quoted. Defaults to asNeeded.
The type of quotes used in JavaScript code. Defaults to double.
Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.
Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "all".
Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "all".
Linter options specific to the JavaScript linter
Control the linter for JavaScript (and its super languages) files.
Options that changes how the JavaScript parser behaves
It enables the experimental and unsafe parsing of parameter decorators
These decorators belong to an old proposal, and they are subject to change.
Options applied to JSON files
Formatting options
Linting options
Parsing options
Control the formatter for JSON (and its super languages) files.
The size of the indentation applied to JSON (and its super languages) files. Default to 2.
The indent style applied to JSON (and its super languages) files.
The size of the indentation applied to JSON (and its super languages) files. Default to 2.
The type of line ending applied to JSON (and its super languages) files.
What's the max width of a line applied to JSON (and its super languages) files. Defaults to 80.
Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "none".
Linter options specific to the JSON linter
Control the linter for JSON (and its super languages) files.
Options that changes how the JSON parser behaves
Allow parsing comments in .json files
Allow parsing trailing commas in .json files
Indicates the type of runtime or transformation used for interpreting JSX.
Validated value for the line_width formatter options
The allowed range of values is 1..=320
if false, it disables the feature and the linter won't be executed. true by default
A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.
A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.
List of rules
Rule's options.
Custom conventions.
If false, then non-ASCII characters are allowed.
If false, then consecutive uppercase are allowed in camel and pascal cases. This does not affect other [Case].
Array of component names that should be considered the same as an input element.
Array of attributes that should be treated as the label accessible text content.
Array of component names that should be considered the same as a label element.
A list of rules that belong to this group
It enables ALL rules for this group.
Disallow the use of console.
Disallow using a callback in asynchronous tests and hooks.
Disallow duplicate @import rules.
Disallow duplicate conditions in if-else-if chains
Disallow duplicate names within font families.
Disallow two keys with the same name inside a JSON object.
Disallow duplicate selectors within keyframe blocks.
Disallow CSS empty blocks.
Disallow variables from evolving into any type through reassignments.
Disallow invalid !important within keyframe declarations
Disallow the use of @import at-rules in invalid positions.
Enforce that a label element or component has a text label and an associated input.
Checks that the assertion function, for example expect, is placed inside an it() function call.
Prevents React-specific JSX properties from being used.
Disallow specified modules when loaded by import or require.
Disallow shorthand properties that override related longhand properties.
Disallow the use of dependencies that aren't specified in the package.json.
Disallow unknown CSS value functions.
Disallow unknown media feature names.
Disallow unknown properties.
Disallow unknown pseudo-class selectors.
Disallow unknown pseudo-element selectors.
Disallow unknown CSS units.
Disallow unmatchable An+B selectors.
Disallow unused function parameters.
Disallow unnecessary concatenation of string or template literals.
Disallow initializing variables to undefined.
Disallow the use of yoda expressions.
It enables the recommended rules for this group
Disallow the use of overload signatures that are not next to each other.
Enforce the use of new for all builtins, except String, Number, Boolean, Symbol and BigInt.
Disallowing invalid named grid areas in CSS Grid Layouts.
Use Date.now() to get the number of milliseconds since the Unix Epoch.
Require the default clause in switch statements.
Enforce passing a message value when creating a built-in error.
Enforce explicitly comparing the length, size, byteLength or byteOffset property of a value.
Elements with an interactive role and interaction handlers must be focusable.
Disallow a missing generic family keyword within font families.
Enforce file extensions for relative imports.
Disallows package private imports.
Enforce using the digits argument with Number#toFixed().
It detects the use of role attributes in JSX elements and suggests using semantic elements instead.
Enforce the sorting of CSS utility classes.
Require new when throwing an error.
Disallow throwing non-Error values.
Require regex literals to be declared at the top level.
Enables the organization of imports
A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.
A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.
The attribute position style.
Stores whether formatting should be allowed to proceed if a given file has syntax errors
The size of the indentation, 2 by default (deprecated, use indent-width)
The indent style.
The size of the indentation, 2 by default
The type of line ending.
What's the max width of a line. Defaults to 80.
if false, it disables the feature and the linter won't be executed. true by default
List of rules
if false, it disables the feature and the linter won't be executed. true by default
Specific configuration for the Css language
Specific configuration for the Json language
A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.
A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.
Specific configuration for the JavaScript language
Specific configuration for the Json language
Specific configuration for the Json language
Specific configuration for the Json language
A list of rules that belong to this group
It enables ALL rules for this group.
Disallow the use of spread (...) syntax on accumulators.
Disallow the use of barrel file.
Disallow the use of the delete operator.
Avoid re-export all.
It enables the recommended rules for this group
Options for the rule noRestrictedGlobals.
A list of names that should trigger the rule
Options for the rule noRestrictedImports.
A list of names that should trigger the rule
The kind of the code actions emitted by the rule
The kind of the code actions emitted by the rule
The kind of the code actions emitted by the rule
The kind of the code actions emitted by the rule
The kind of the code actions emitted by the rule
It enables ALL rules. The rules that belong to nursery won't be enabled.
It enables the lint rules recommended by Biome. true by default.
A list of rules that belong to this group
It enables ALL rules for this group.
Prevent the usage of dangerous JSX props
Report when a DOM element or a component uses both children and dangerouslySetInnerHTML prop.
Disallow the use of global eval().
It enables the recommended rules for this group
A list of rules that belong to this group
It enables ALL rules for this group.
Disallow the use of arguments.
Disallow comma operator.
Disallow default exports.
Disallow implicit true values on JSX boolean attributes
Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.
Disallow the use of TypeScript's namespaces.
Disallow the use of namespace imports.
Disallow negation in the condition of an if statement if it has an else clause.
Disallow non-null assertions using the ! postfix operator.
Disallow reassigning function parameters.
Disallow the use of parameter properties in class constructors.
This rule allows you to specify global variable names that you don’t want to use in your application.
Disallow the use of constants which its value is the upper-case version of its name.
Disallow template literals if interpolation and special-character handling are not needed
Disallow else block when the if block breaks early.
Disallow the use of var
It enables the recommended rules for this group
Enforce the use of as const over literal type and type annotation.
Requires following curly brace conventions.
Enforce using else if instead of nested if in else clauses.
Require consistently using either T[] or Array<T>
Require const declarations for variables that are only assigned once.
Enforce default function parameters and optional function parameters to be last.
Require that each enum member value be explicitly initialized.
Disallow the use of Math.pow in favor of the ** operator.
Promotes the use of export type for types.
Enforce naming conventions for JavaScript and TypeScript filenames.
This rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array.
This rule enforces the use of <>...</> over <Fragment>...</Fragment>.
Promotes the use of import type for types.
Require all enum members to be literal values.
Enforce naming conventions for everything across a codebase.
Promotes the usage of node:assert/strict over node:assert.
Enforces using the node: protocol for Node.js builtin modules.
Use the Number properties instead of global ones.
Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals
Prevent extra closing tags for components without children
When expressing array types, this rule promotes the usage of T[] shorthand instead of Array<T>.
Require assignment operator shorthand where possible.
Enforce using function types instead of object type with call signatures.
Enforces switch clauses have a single statement, emits a quick fix wrapping the statements in a block.
Disallow multiple variable declarations in the same variable statement
Prefer template literals over string concatenation.
Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed.
A list of rules that belong to this group
It enables ALL rules for this group.
Use standard constants instead of approximated literals.
Discourage the usage of Array index in keys.
Disallow assignments in expressions.
Disallows using an async function as a Promise executor.
Disallow reassigning exceptions in catch clauses.
Disallow reassigning class members.
Prevent comments from being inserted as text nodes
Disallow comparing against -0
Disallow labeled statements that are not loops.
Disallow void type outside of generic or return types.
Disallow the use of console.log
Disallow TypeScript const enum
Prevents from having control characters and some escape sequences that match control characters in regular expressions.
Disallow the use of debugger
Require the use of === and !==
Disallow duplicate case labels.
Disallow duplicate class members.
Prevents JSX properties to be assigned multiple times.
Prevents object literals having more than one property declaration for the same name.
Disallow duplicate function parameter name.
A describe block should not contain duplicate hooks.
Disallow empty block statements and static blocks.
Disallow the declaration of empty interfaces.
Disallow the any type usage.
Disallow using export or module.exports in files containing tests
Prevents the wrong usage of the non-null assertion operator (!) in TypeScript files.
Disallow fallthrough of switch clauses.
Disallow focused tests.
Disallow reassigning function declarations.
Disallow assignments to native objects and read-only global variables.
Use Number.isFinite instead of global isFinite.
Use Number.isNaN instead of global isNaN.
Disallow use of implicit any type on variable declarations.
Disallow assigning to imported bindings
Disallow labels that share a name with a variable
Disallow characters made with multiple code points in character class syntax.
Enforce proper usage of new and constructor.
Disallow shorthand assign when variable appears on both sides.
Disallow direct use of Object.prototype builtins.
Disallow variable, function, class, and type redeclarations in the same scope.
Prevents from having redundant "use strict".
Disallow comparisons where both sides are exactly the same.
Disallow identifiers from shadowing restricted names.
Disallow disabled tests.
Disallow sparse arrays
It detects possible "wrong" semicolons inside JSX elements.
Disallow then property.
Disallow unsafe declaration merging between interfaces and classes.
Disallow using unsafe negation.
It enables the recommended rules for this group
Ensure async functions utilize await.
Enforce default clauses in switch statements to be last
Enforce get methods to always return a value.
Use Array.isArray() instead of instanceof Array.
Require using the namespace keyword over the module keyword to declare TypeScript namespaces.
This rule verifies the result of typeof $expr unary expressions is being compared to valid values, either string literals containing valid type names or other typeof expressions
Print trailing commas wherever possible in multi-line comma-separated syntactic structures.
Additional attributes that will be sorted.
Names of the functions or tagged templates that will be sorted.
Set of properties to integrate Biome with a VCS software.
The kind of client.
The main branch of the project
Whether Biome should integrate itself with the VCS client
The 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
Whether Biome should use the VCS ignore file. When [true], Biome will ignore the files specified in the ignore file.