Configuration
2.3.11Schema URL
The configuration that is contained inside the file biome.json
Properties
A field for the JSON schema specification
Specific configuration for assists
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 GraphQL language
Specific configuration for the GraphQL language
Specific configuration for the HTML language
Specific configuration for the JavaScript language
Specific configuration for the Json language
The configuration for the linter
A list of granular patterns that should be applied only to a sub set of files
List of plugins to load.
Indicates whether this configuration file is at the root of a Biome
project. By default, this is true.
The configuration of the VCS integration
Definitions
A list of rules that belong to this group
Enforce that the accessKey attribute is not used on any HTML element. See https://biomejs.dev/linter/rules/no-access-key
Enforce that aria-hidden="true" is not set on focusable elements. See https://biomejs.dev/linter/rules/no-aria-hidden-on-focusable
Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. See https://biomejs.dev/linter/rules/no-aria-unsupported-elements
Enforce that autoFocus prop is not used on elements. See https://biomejs.dev/linter/rules/no-autofocus
Enforces that no distracting elements are used. See https://biomejs.dev/linter/rules/no-distracting-elements
The scope prop should be used only on <th> elements. See https://biomejs.dev/linter/rules/no-header-scope
Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements. See https://biomejs.dev/linter/rules/no-interactive-element-to-noninteractive-role
Enforce that a label element or component has a text label and an associated input. See https://biomejs.dev/linter/rules/no-label-without-control
Disallow use event handlers on non-interactive elements. See https://biomejs.dev/linter/rules/no-noninteractive-element-interactions
Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements. See https://biomejs.dev/linter/rules/no-noninteractive-element-to-interactive-role
Enforce that tabIndex is not assigned to non-interactive HTML elements. See https://biomejs.dev/linter/rules/no-noninteractive-tabindex
Prevent the usage of positive integers on tabIndex property. See https://biomejs.dev/linter/rules/no-positive-tabindex
Enforce img alt prop does not contain the word "image", "picture", or "photo". See https://biomejs.dev/linter/rules/no-redundant-alt
Enforce explicit role property is not the same as implicit/default role property on an element. See https://biomejs.dev/linter/rules/no-redundant-roles
Enforce that static, visible elements (such as <div>) that have click handlers use the valid role attribute. See https://biomejs.dev/linter/rules/no-static-element-interactions
Enforces the usage of the title element for the svg element. See https://biomejs.dev/linter/rules/no-svg-without-title
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. See https://biomejs.dev/linter/rules/use-alt-text
Enforce that anchors have content and that the content is accessible to screen readers. See https://biomejs.dev/linter/rules/use-anchor-content
Enforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant. See https://biomejs.dev/linter/rules/use-aria-activedescendant-with-tabindex
Enforce that elements with ARIA roles must have all required ARIA attributes for that role. See https://biomejs.dev/linter/rules/use-aria-props-for-role
Enforce that ARIA properties are valid for the roles that are supported by the element. See https://biomejs.dev/linter/rules/use-aria-props-supported-by-role
Enforces the usage of the attribute type for the element button. See https://biomejs.dev/linter/rules/use-button-type
Elements with an interactive role and interaction handlers must be focusable. See https://biomejs.dev/linter/rules/use-focusable-interactive
Disallow a missing generic family keyword within font families. See https://biomejs.dev/linter/rules/use-generic-font-names
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. See https://biomejs.dev/linter/rules/use-heading-content
Enforce that html element has lang attribute. See https://biomejs.dev/linter/rules/use-html-lang
Enforces the usage of the attribute title for the element iframe. See https://biomejs.dev/linter/rules/use-iframe-title
Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress. See https://biomejs.dev/linter/rules/use-key-with-click-events
Enforce onMouseOver / onMouseOut are accompanied by onFocus / onBlur. See https://biomejs.dev/linter/rules/use-key-with-mouse-events
Enforces that audio and video elements must have a track for captions. See https://biomejs.dev/linter/rules/use-media-caption
It detects the use of role attributes in JSX elements and suggests using semantic elements instead. See https://biomejs.dev/linter/rules/use-semantic-elements
Enforce that all anchors are valid, and they are navigable elements. See https://biomejs.dev/linter/rules/use-valid-anchor
Ensures that ARIA properties aria-* are all valid. See https://biomejs.dev/linter/rules/use-valid-aria-props
Elements with ARIA roles must use a valid, non-abstract ARIA role. See https://biomejs.dev/linter/rules/use-valid-aria-role
Enforce that ARIA state and property values are valid. See https://biomejs.dev/linter/rules/use-valid-aria-values
Use valid values for the autocomplete attribute on input elements. See https://biomejs.dev/linter/rules/use-valid-autocomplete
Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country. See https://biomejs.dev/linter/rules/use-valid-lang
It enables the assist actions recommended by Biome. true by default.
Put the > of a multi-line HTML or JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).
A list of rules that belong to this group
Disallow unclear usage of consecutive space characters in regular expression literals. See https://biomejs.dev/linter/rules/no-adjacent-spaces-in-regex
Disallow the use of arguments. See https://biomejs.dev/linter/rules/no-arguments
Disallow primitive type aliases and misleading types. See https://biomejs.dev/linter/rules/no-banned-types
Disallow comma operator. See https://biomejs.dev/linter/rules/no-comma-operator
Disallow empty type parameters in type aliases and interfaces. See https://biomejs.dev/linter/rules/no-empty-type-parameters
Disallow functions that exceed a given Cognitive Complexity score. See https://biomejs.dev/linter/rules/no-excessive-cognitive-complexity
Restrict the number of lines of code in a function. See https://biomejs.dev/linter/rules/no-excessive-lines-per-function
This rule enforces a maximum depth to nested describe() in test files. See https://biomejs.dev/linter/rules/no-excessive-nested-test-suites
Disallow unnecessary boolean casts. See https://biomejs.dev/linter/rules/no-extra-boolean-cast
Disallow to use unnecessary callback on flatMap. See https://biomejs.dev/linter/rules/no-flat-map-identity
Prefer for...of statement instead of Array.forEach. See https://biomejs.dev/linter/rules/no-for-each
Disallow shorthand type conversions. See https://biomejs.dev/linter/rules/no-implicit-coercions
Disallow the use of the !important style. See https://biomejs.dev/linter/rules/no-important-styles
This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace. See https://biomejs.dev/linter/rules/no-static-only-class
Disallow this and super in static contexts. See https://biomejs.dev/linter/rules/no-this-in-static
Disallow unnecessary catch clauses. See https://biomejs.dev/linter/rules/no-useless-catch
Disallow unnecessary constructors. See https://biomejs.dev/linter/rules/no-useless-constructor
Avoid using unnecessary continue. See https://biomejs.dev/linter/rules/no-useless-continue
Disallow empty exports that don't change anything in a module file. See https://biomejs.dev/linter/rules/no-useless-empty-export
Disallow unnecessary escape sequence in regular expression literals. See https://biomejs.dev/linter/rules/no-useless-escape-in-regex
Disallow unnecessary fragments. See https://biomejs.dev/linter/rules/no-useless-fragments
Disallow unnecessary labels. See https://biomejs.dev/linter/rules/no-useless-label
Disallow unnecessary nested block statements. See https://biomejs.dev/linter/rules/no-useless-lone-block-statements
Disallow renaming import, export, and destructured assignments to the same name. See https://biomejs.dev/linter/rules/no-useless-rename
Disallow unnecessary concatenation of string or template literals. See https://biomejs.dev/linter/rules/no-useless-string-concat
Disallow unnecessary String.raw function in template string literals without any escape sequence. See https://biomejs.dev/linter/rules/no-useless-string-raw
Disallow useless case in switch statements. See https://biomejs.dev/linter/rules/no-useless-switch-case
Disallow ternary operators when simpler alternatives exist. See https://biomejs.dev/linter/rules/no-useless-ternary
Disallow useless this aliasing. See https://biomejs.dev/linter/rules/no-useless-this-alias
Disallow using any or unknown as type constraint. See https://biomejs.dev/linter/rules/no-useless-type-constraint
Disallow initializing variables to undefined. See https://biomejs.dev/linter/rules/no-useless-undefined-initialization
Disallow the use of void operators, which is not a familiar operator. See https://biomejs.dev/linter/rules/no-void
Enables the recommended rules for this group
Use arrow functions over function expressions. See https://biomejs.dev/linter/rules/use-arrow-function
Use Date.now() to get the number of milliseconds since the Unix Epoch. See https://biomejs.dev/linter/rules/use-date-now
Promotes the use of .flatMap() when map().flat() are used together. See https://biomejs.dev/linter/rules/use-flat-map
Prefer Array#{indexOf,lastIndexOf}() over Array#{findIndex,findLastIndex}() when looking for the index of an item. See https://biomejs.dev/linter/rules/use-index-of
Enforce the usage of a literal access to properties over computed property access. See https://biomejs.dev/linter/rules/use-literal-keys
Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals. See https://biomejs.dev/linter/rules/use-numeric-literals
Enforce using concise optional chain instead of chained logical expressions. See https://biomejs.dev/linter/rules/use-optional-chain
Enforce the use of the regular expression literals instead of the RegExp constructor if possible. See https://biomejs.dev/linter/rules/use-regex-literals
Disallow number literal object member names which are not base 10 or use underscore as separator. See https://biomejs.dev/linter/rules/use-simple-number-keys
Discard redundant terms from logical expressions. See https://biomejs.dev/linter/rules/use-simplified-logic-expression
Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed. See https://biomejs.dev/linter/rules/use-while
Regular expression to enforce
3 nested properties
A list of rules that belong to this group
Prevent passing of children as props. See https://biomejs.dev/linter/rules/no-children-prop
Prevents from having const variables being re-assigned. See https://biomejs.dev/linter/rules/no-const-assign
Disallow constant expressions in conditions. See https://biomejs.dev/linter/rules/no-constant-condition
Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant. See https://biomejs.dev/linter/rules/no-constant-math-min-max-clamp
Disallow returning a value from a constructor. See https://biomejs.dev/linter/rules/no-constructor-return
Disallow empty character classes in regular expression literals. See https://biomejs.dev/linter/rules/no-empty-character-class-in-regex
Disallows empty destructuring patterns. See https://biomejs.dev/linter/rules/no-empty-pattern
Disallow the use of __dirname and __filename in the global scope. See https://biomejs.dev/linter/rules/no-global-dirname-filename
Disallow calling global object properties as functions. See https://biomejs.dev/linter/rules/no-global-object-calls
Disallow function and var declarations that are accessible outside their block. See https://biomejs.dev/linter/rules/no-inner-declarations
Ensure that builtins are correctly instantiated. See https://biomejs.dev/linter/rules/no-invalid-builtin-instantiation
Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors. See https://biomejs.dev/linter/rules/no-invalid-constructor-super
Disallow non-standard direction values for linear gradient functions. See https://biomejs.dev/linter/rules/no-invalid-direction-in-linear-gradient
Disallows invalid named grid areas in CSS Grid Layouts. See https://biomejs.dev/linter/rules/no-invalid-grid-areas
Disallow the use of @import at-rules in invalid positions. See https://biomejs.dev/linter/rules/no-invalid-position-at-import-rule
Disallow the use of variables, function parameters, classes, and enums before their declaration. See https://biomejs.dev/linter/rules/no-invalid-use-before-declaration
Disallow missing var function for css variables. See https://biomejs.dev/linter/rules/no-missing-var-function
Disallows defining React components inside other components. See https://biomejs.dev/linter/rules/no-nested-component-definitions
Forbid the use of Node.js builtin modules. See https://biomejs.dev/linter/rules/no-nodejs-modules
Disallow \8 and \9 escape sequences in string literals. See https://biomejs.dev/linter/rules/no-nonoctal-decimal-escape
Disallow literal numbers that lose precision. See https://biomejs.dev/linter/rules/no-precision-loss
Restrict imports of private exports. See https://biomejs.dev/linter/rules/no-private-imports
Disallow the use of process global. See https://biomejs.dev/linter/rules/no-process-global
Disallow useVisibleTask$() functions in Qwik components. See https://biomejs.dev/linter/rules/no-qwik-use-visible-task
Disallow assigning to React component props. See https://biomejs.dev/linter/rules/no-react-prop-assignments
Prevent the usage of the return value of React.render. See https://biomejs.dev/linter/rules/no-render-return-value
Disallow the use of configured elements. See https://biomejs.dev/linter/rules/no-restricted-elements
Disallow assignments where both sides are exactly the same. See https://biomejs.dev/linter/rules/no-self-assign
Disallow returning a value from a setter. See https://biomejs.dev/linter/rules/no-setter-return
Disallow destructuring props inside JSX components in Solid projects. See https://biomejs.dev/linter/rules/no-solid-destructured-props
Disallow comparison of expressions modifying the string case with non-compliant value. See https://biomejs.dev/linter/rules/no-string-case-mismatch
Disallow lexical declarations in switch clauses. See https://biomejs.dev/linter/rules/no-switch-declarations
Disallow the use of dependencies that aren't specified in the package.json. See https://biomejs.dev/linter/rules/no-undeclared-dependencies
Prevents the usage of variables that haven't been declared inside the document. See https://biomejs.dev/linter/rules/no-undeclared-variables
Disallow unknown CSS value functions. See https://biomejs.dev/linter/rules/no-unknown-function
Disallow unknown media feature names. See https://biomejs.dev/linter/rules/no-unknown-media-feature-name
Disallow unknown properties. See https://biomejs.dev/linter/rules/no-unknown-property
Disallow unknown pseudo-class selectors. See https://biomejs.dev/linter/rules/no-unknown-pseudo-class
Disallow unknown pseudo-element selectors. See https://biomejs.dev/linter/rules/no-unknown-pseudo-element
Disallow unknown type selectors. See https://biomejs.dev/linter/rules/no-unknown-type-selector
Disallow unknown CSS units. See https://biomejs.dev/linter/rules/no-unknown-unit
Disallow unmatchable An+B selectors. See https://biomejs.dev/linter/rules/no-unmatchable-anb-selector
Disallow unreachable code. See https://biomejs.dev/linter/rules/no-unreachable
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. See https://biomejs.dev/linter/rules/no-unreachable-super
Disallow control flow statements in finally blocks. See https://biomejs.dev/linter/rules/no-unsafe-finally
Disallow the use of optional chaining in contexts where the undefined value is not allowed. See https://biomejs.dev/linter/rules/no-unsafe-optional-chaining
Disallow unused function parameters. See https://biomejs.dev/linter/rules/no-unused-function-parameters
Disallow unused imports. See https://biomejs.dev/linter/rules/no-unused-imports
Disallow unused labels. See https://biomejs.dev/linter/rules/no-unused-labels
Disallow unused private class members. See https://biomejs.dev/linter/rules/no-unused-private-class-members
Disallow unused variables. See https://biomejs.dev/linter/rules/no-unused-variables
This rules prevents void elements (AKA self-closing elements) from having children. See https://biomejs.dev/linter/rules/no-void-elements-with-children
Disallow returning a value from a function with the return type 'void'. See https://biomejs.dev/linter/rules/no-void-type-return
Enables the recommended rules for this group
Enforce correct dependency usage within React hooks. See https://biomejs.dev/linter/rules/use-exhaustive-dependencies
Enforce specifying the name of GraphQL operations. See https://biomejs.dev/linter/rules/use-graphql-named-operations
Enforce that all React hooks are being called from the Top Level component functions. See https://biomejs.dev/linter/rules/use-hook-at-top-level
Enforces that <img> elements have both width and height attributes. See https://biomejs.dev/linter/rules/use-image-size
Enforce file extensions for relative imports. See https://biomejs.dev/linter/rules/use-import-extensions
Require calls to isNaN() when checking for NaN. See https://biomejs.dev/linter/rules/use-is-nan
Enforces the use of with { type: "json" } for JSON module imports. See https://biomejs.dev/linter/rules/use-json-import-attributes
Disallow missing key props in iterators/collection literals. See https://biomejs.dev/linter/rules/use-jsx-key-in-iterable
Enforce the consistent use of the radix argument when using parseInt(). See https://biomejs.dev/linter/rules/use-parse-int-radix
Prefer using the class prop as a classlist over the classnames helper. See https://biomejs.dev/linter/rules/use-qwik-classlist
Enforce JSDoc comment lines to start with a single asterisk, except for the first one. See https://biomejs.dev/linter/rules/use-single-js-doc-asterisk
Prevent the usage of static string literal id attribute on elements. See https://biomejs.dev/linter/rules/use-unique-element-ids
Enforce "for" loop update clause moving the counter in the right direction. See https://biomejs.dev/linter/rules/use-valid-for-direction
This rule checks that the result of a typeof expression is compared to a valid value. See https://biomejs.dev/linter/rules/use-valid-typeof
Require generator functions to contain yield. See https://biomejs.dev/linter/rules/use-yield
Options that changes how the CSS assist behaves
Control the assist for CSS files.
Options applied to CSS files
CSS assist options
CSS formatter options
CSS globals
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. auto uses CRLF on Windows and LF on other platforms.
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 files.
Options that changes how the CSS parser behaves
Elements to restrict. Each key is the element name, and the value is the message to show when the element is used.
Supported cases for file names.
The configuration of the filesystem
Deprecated: Please use force-ignore syntax in files.includes
instead: https://biomejs.dev/reference/configuration/#filesincludes
Set of file and folder names that should be unconditionally ignored by Biome's scanner.
Tells Biome to not emit diagnostics when handling files that it doesn't know
A list of glob 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 HTML-ish languages. Defaults to auto.
Put the > of a multi-line HTML or JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).
Whether to insert spaces around brackets in object literals. Defaults to true.
Whether to expand arrays and objects on multiple lines.
When set to auto, object literals are formatted on multiple lines if the first property has a newline,
and array literals are formatted on a single line if it fits in the line.
When set to always, these literals are formatted on multiple lines, regardless of length of the list.
When set to never, these literals are formatted on a single line if it fits in the line.
When formatting package.json, Biome will use always unless configured otherwise. Defaults to "auto".
Whether formatting should be allowed to proceed if a given file has syntax errors
A list of glob patterns. The formatter will include files/folders that will match these patterns.
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.
Use any .editorconfig files to configure the formatter. Configuration
in biome.json will override .editorconfig configuration.
Default: true.
Options that changes how the GraphQL linter behaves
Control the formatter for GraphQL files.
Options applied to GraphQL files
Assist options
GraphQL formatter options
Options that changes how the GraphQL formatter behaves
Whether to insert spaces around brackets in object literals. Defaults to true.
Control the formatter for GraphQL files.
The indent style applied to GraphQL files.
The size of the indentation applied to GraphQL files. Default to 2.
The type of line ending applied to GraphQL files. auto uses CRLF on Windows and LF on other platforms.
What's the max width of a line applied to GraphQL files. Defaults to 80.
The type of quotes used in GraphQL code. Defaults to double.
Options that change how the GraphQL linter behaves.
Control the formatter for GraphQL files.
Control the assist functionality for Grit files.
Options applied to GritQL files
Assist options
Formatting options
Formatting options
Control the formatter for Grit files.
The indent style applied to Grit files.
The size of the indentation applied to Grit files. Default to 2.
The type of line ending applied to Grit files.
What's the max width of a line applied to Grit files. Defaults to 80.
Control the linter for Grit files.
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.
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].
Options that changes how the HTML assist behaves
Control the assist for HTML (and its super languages) files.
Options applied to HTML files
Enables full support for HTML, Vue, Svelte and Astro files.
HTML formatter options
HTML linter options
HTML parsing options
Options that changes how the HTML formatter behaves
The attribute position style in HTML elements. Defaults to auto.
Whether to hug the closing bracket of multiline HTML tags to the end of the last line, rather than being alone on the following line. Defaults to false.
Control the formatter for HTML (and its super languages) files.
Whether to indent the <script> and <style> tags for HTML (and its super languages). Defaults to false.
The indent style applied to HTML (and its super languages) files.
The size of the indentation applied to HTML (and its super languages) files. Default to 2.
The type of line ending applied to HTML (and its super languages) files. auto uses CRLF on Windows and LF on other platforms.
What's the max width of a line applied to HTML (and its super languages) files. Defaults to 80.
Whether void elements should be self-closed. Defaults to never.
Whether to account for whitespace sensitivity when formatting HTML (and its super languages). Defaults to "css".
Options that changes how the HTML linter behaves
Control the linter for HTML (and its super languages) files.
Options that changes how the HTML parser behaves
Enables the parsing of double text expressions such as {{ expression }} inside .html files
Whether to indent the content of <script> and <style> tags for HTML-ish templating languages (Vue, Svelte, etc.).
When true, the content of <script> and <style> tags will be indented one level.
Assist options specific to the JavaScript assist
Control the assist for JavaScript (and its super languages) files.
A set of options applied to the JavaScript files
Assist options
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.
Whether to expand arrays and objects on multiple lines.
When set to auto, object literals are formatted on multiple lines if the first property has a newline,
and array literals are formatted on a single line if it fits in the line.
When set to always, these literals are formatted on multiple lines, regardless of length of the list.
When set to never, these literals are formatted on a single line if it fits in the line.
When formatting package.json, Biome will use always unless configured otherwise. Defaults to "auto".
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. auto uses CRLF on Windows and LF on other platforms.
What's the max width of a line applied to JavaScript (and its super languages) files. Defaults to 80.
When breaking binary expressions into multiple lines, whether to break them before or after the binary operator. Defaults to "after".
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".
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
Enables parsing of Grit metavariables.
Defaults to false.
When enabled, files like .js/.mjs/.cjs may contain JSX syntax.
Defaults to true.
It enables the experimental and unsafe parsing of parameter decorators
These decorators belong to an old proposal, and they are subject to change.
Print trailing commas wherever possible in multi-line comma-separated syntactic structures for JavaScript/TypeScript files.
Assist options specific to the JSON linter
Control the assist for JSON (and its super languages) files.
Options applied to JSON files
Assist options
Formatting options
Linting options
Parsing options
Whether to insert spaces around brackets in object literals. Defaults to true.
Control the formatter for JSON (and its super languages) files.
Whether to expand arrays and objects on multiple lines.
When set to auto, object literals are formatted on multiple lines if the first property has a newline,
and array literals are formatted on a single line if it fits in the line.
When set to always, these literals are formatted on multiple lines, regardless of length of the list.
When set to never, these literals are formatted on a single line if it fits in the line.
When formatting package.json, Biome will use always unless configured otherwise. Defaults to "auto".
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. auto uses CRLF on Windows and LF on other platforms.
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.
Print trailing commas wherever possible in multi-line comma-separated syntactic structures for 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
An object where the keys are the names of the domains, and the values are all, recommended, or none.
if false, it disables the feature and the linter won't be executed. true by default
A list of glob patterns. The analyzer will handle only those files/folders that will match these patterns.
List of rules
It allows users to modify the strings that can be checked for in the anchor text. Useful for specifying other words in other languages
Allows a list of bitwise operators to be used as exceptions.
List of domains where target="_blank" is allowed without
rel="noopener".
Whether noreferrer is allowed in addition to noopener.
A list of (non-confusing) labels that should be allowed
Allowed calls on the console object.
If true, an exception is made when comparing with null, as it's often relied on to check
both for null or undefined.
If false, no such exception will be made.
Whether comments are considered meaningful
The maximum complexity score that we allow. Anything higher is considered excessive.
The maximum number of lines allowed in a function body.
When this options is set to true, blank lines in the function body are not counted towards the maximum line limit.
When this option is set to true, Immediately Invoked Function Expressions (IIFEs) are not checked for the maximum line limit.
A list of variable names allowed for forEach calls.
Ignores type-only imports when finding an import cycle. A type-only import (import type)
will be removed by the compiler, so it cuts an import cycle at runtime. Note that named type
imports (import { type Foo }) aren't considered as type-only because it's not removed by
the compiler if the verbatimModuleSyntax option is enabled. Enabled by default.
Allows unary operators ++ and -- in the afterthought (final expression) of a for loop.
An array of strings that won't trigger the rule. Whitespaces are taken into consideration
When enabled, strings inside props are always ignored
When enabled, also flag string literals inside JSX expressions and attributes
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.
Whether to report an error when a dependency is listed in the dependencies array but isn't used. Defaults to allow.
The default visibility to assume for symbols without visibility tag.
Default: public.
A list of additional JSON files that should be checked.
[]
Elements to restrict. Each key is the element name, and the value is the message to show when the element is used.
A list of names that should trigger the rule
A list of import paths that should trigger the rule.
gitignore-style patterns that should trigger the rule.
Set entropy threshold (default is 41).
If set to false, then the rule will show an error when devDependencies are imported. Defaults to true.
If set to false, then the rule will show an error when optionalDependencies are imported. Defaults to true.
If set to false, then the rule will show an error when peerDependencies are imported. Defaults to true.
Environment variables that should always be allowed.
Use this to specify environment variables that are always available
in your environment, even when not declared in turbo.json.
Supports regular expressions, e.g. ["MY_ENV_.*"].
Check undeclared types.
A list of unknown at-rule names to ignore (case-insensitive).
Whether to ignore unused variables from an object destructuring with a spread.
Whether to ignore unused variables from an object destructuring with a spread.
Options for the noUselessCatchBinding rule.
Currently empty; reserved for future extensions (e.g. allowlist of names).
Normalized Biome glob pattern that strips ./ from the pattern.
A list of rules that belong to this group
Disallow ambiguous anchor descriptions. See https://biomejs.dev/linter/rules/no-ambiguous-anchor-text
Prevent usage of next/script's beforeInteractive strategy outside of pages/_document.js in a Next.js project. See https://biomejs.dev/linter/rules/no-before-interactive-script-outside-document
Disallow continue statements. See https://biomejs.dev/linter/rules/no-continue
Restrict imports of deprecated exports. See https://biomejs.dev/linter/rules/no-deprecated-imports
Prevent the listing of duplicate dependencies. The rule supports the following dependency groups: "bundledDependencies", "bundleDependencies", "dependencies", "devDependencies", "overrides", "optionalDependencies", and "peerDependencies". See https://biomejs.dev/linter/rules/no-duplicate-dependencies
Disallow JSX prop spreading the same identifier multiple times. See https://biomejs.dev/linter/rules/no-duplicated-spread-props
Disallow empty sources. See https://biomejs.dev/linter/rules/no-empty-source
Require the use of === or !== for comparison with null. See https://biomejs.dev/linter/rules/no-equals-to-null
Require Promise-like statements to be handled appropriately. See https://biomejs.dev/linter/rules/no-floating-promises
Disallow iterating using a for-in loop. See https://biomejs.dev/linter/rules/no-for-in
Prevent import cycles. See https://biomejs.dev/linter/rules/no-import-cycles
Disallows the usage of the unary operators ++ and --. See https://biomejs.dev/linter/rules/no-increment-decrement
Disallow string literals inside JSX elements. See https://biomejs.dev/linter/rules/no-jsx-literals
Disallow .bind(), arrow functions, or function expressions in JSX props. See https://biomejs.dev/linter/rules/no-jsx-props-bind
Prevent problematic leaked values from being rendered. See https://biomejs.dev/linter/rules/no-leaked-render
Disallow Promises to be used in places where they are almost certainly a mistake. See https://biomejs.dev/linter/rules/no-misused-promises
Disallow use of chained assignment expressions. See https://biomejs.dev/linter/rules/no-multi-assign
Disallow creating multiline strings by escaping newlines. See https://biomejs.dev/linter/rules/no-multi-str
Prevent client components from being async functions. See https://biomejs.dev/linter/rules/no-next-async-client-component
Disallow function parameters that are only used in recursive calls. See https://biomejs.dev/linter/rules/no-parameters-only-used-in-recursion
Disallow the use of the deprecated proto object property. See https://biomejs.dev/linter/rules/no-proto
Replaces usages of forwardRef with passing ref as a prop. See https://biomejs.dev/linter/rules/no-react-forward-ref
Disallow assignments in return statements. See https://biomejs.dev/linter/rules/no-return-assign
Disallow javascript: URLs in HTML. See https://biomejs.dev/linter/rules/no-script-url
Disallow variable declarations from shadowing variables declared in the outer scope. See https://biomejs.dev/linter/rules/no-shadow
Prevent the usage of synchronous scripts. See https://biomejs.dev/linter/rules/no-sync-scripts
Disallow ternary operators. See https://biomejs.dev/linter/rules/no-ternary
Disallow the use of undeclared environment variables. See https://biomejs.dev/linter/rules/no-undeclared-env-vars
Disallow unknown DOM properties. See https://biomejs.dev/linter/rules/no-unknown-attribute
Disallow unnecessary type-based conditions that can be statically determined as redundant. See https://biomejs.dev/linter/rules/no-unnecessary-conditions
Warn when importing non-existing exports. See https://biomejs.dev/linter/rules/no-unresolved-imports
Disallow expression statements that are neither a function call nor an assignment. See https://biomejs.dev/linter/rules/no-unused-expressions
Disallow unused catch bindings. See https://biomejs.dev/linter/rules/no-useless-catch-binding
Disallow the use of useless undefined. See https://biomejs.dev/linter/rules/no-useless-undefined
Enforce that Vue component data options are declared as functions. See https://biomejs.dev/linter/rules/no-vue-data-object-declaration
Disallow duplicate keys in Vue component data, methods, computed properties, and other options. See https://biomejs.dev/linter/rules/no-vue-duplicate-keys
Disallow reserved keys in Vue component data and computed properties. See https://biomejs.dev/linter/rules/no-vue-reserved-keys
Disallow reserved names to be used as props. See https://biomejs.dev/linter/rules/no-vue-reserved-props
Disallow destructuring of props passed to setup in Vue projects. See https://biomejs.dev/linter/rules/no-vue-setup-props-reactivity-loss
Disallow using v-if and v-for directives on the same element. See https://biomejs.dev/linter/rules/no-vue-v-if-with-v-for
Enables the recommended rules for this group
Require Array#sort and Array#toSorted calls to always provide a compareFunction. See https://biomejs.dev/linter/rules/use-array-sort-compare
Enforce that await is only used on Promise values. See https://biomejs.dev/linter/rules/use-await-thenable
Enforce consistent arrow function bodies. See https://biomejs.dev/linter/rules/use-consistent-arrow-return
Require all descriptions to follow the same style (either block or inline) to maintain consistency and improve readability across the schema. See https://biomejs.dev/linter/rules/use-consistent-graphql-descriptions
Require the @deprecated directive to specify a deletion date. See https://biomejs.dev/linter/rules/use-deprecated-date
Require destructuring from arrays and/or objects. See https://biomejs.dev/linter/rules/use-destructuring
Require switch-case statements to be exhaustive. See https://biomejs.dev/linter/rules/use-exhaustive-switch-cases
Enforce types in functions, methods, variables, and parameters. See https://biomejs.dev/linter/rules/use-explicit-type
Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result. See https://biomejs.dev/linter/rules/use-find
Enforce a maximum number of parameters in function definitions. See https://biomejs.dev/linter/rules/use-max-params
Disallow use* hooks outside of component$ or other use* hooks in Qwik applications. See https://biomejs.dev/linter/rules/use-qwik-method-usage
Disallow unserializable expressions in Qwik dollar ($) scopes. See https://biomejs.dev/linter/rules/use-qwik-valid-lexical-scope
Enforce RegExp#exec over String#match if no global flag is provided. See https://biomejs.dev/linter/rules/use-regexp-exec
Enforce the presence of required scripts in package.json. See https://biomejs.dev/linter/rules/use-required-scripts
Enforce the sorting of CSS utility classes. See https://biomejs.dev/linter/rules/use-sorted-classes
Enforce the use of the spread operator over .apply(). See https://biomejs.dev/linter/rules/use-spread
Require all argument names for fields & directives to be unique. See https://biomejs.dev/linter/rules/use-unique-argument-names
Require all fields of a type to be unique. See https://biomejs.dev/linter/rules/use-unique-field-definition-names
Enforce unique operation names across a GraphQL document. See https://biomejs.dev/linter/rules/use-unique-graphql-operation-name
Require fields within an input object to be unique. See https://biomejs.dev/linter/rules/use-unique-input-field-names
Require all variable definitions to be unique. See https://biomejs.dev/linter/rules/use-unique-variable-names
Enforce consistent defineProps declaration style. See https://biomejs.dev/linter/rules/use-vue-consistent-define-props-declaration
Enforce a consistent style for v-bind in Vue templates. See https://biomejs.dev/linter/rules/use-vue-consistent-v-bind-style
Enforce a consistent style for v-on in Vue templates. See https://biomejs.dev/linter/rules/use-vue-consistent-v-on-style
Enforce specific order of Vue compiler macros. See https://biomejs.dev/linter/rules/use-vue-define-macros-order
Enforce hyphenated (kebab-case) attribute names in Vue templates. See https://biomejs.dev/linter/rules/use-vue-hyphenated-attributes
Enforce multi-word component names in Vue components. See https://biomejs.dev/linter/rules/use-vue-multi-word-component-names
Enforce that elements using v-for also specify a unique key. See https://biomejs.dev/linter/rules/use-vue-v-for-key
Enforce valid Vue <template> root usage. See https://biomejs.dev/linter/rules/use-vue-valid-template-root
Forbids v-bind directives with missing arguments or invalid modifiers. See https://biomejs.dev/linter/rules/use-vue-valid-v-bind
Enforce valid v-cloak Vue directives. See https://biomejs.dev/linter/rules/use-vue-valid-v-cloak
Enforce valid usage of v-else. See https://biomejs.dev/linter/rules/use-vue-valid-v-else
Enforce valid v-else-if directives. See https://biomejs.dev/linter/rules/use-vue-valid-v-else-if
Enforce valid v-html directives. See https://biomejs.dev/linter/rules/use-vue-valid-v-html
Enforces valid v-if usage for Vue templates. See https://biomejs.dev/linter/rules/use-vue-valid-v-if
Enforce valid v-on directives with proper arguments, modifiers, and handlers. See https://biomejs.dev/linter/rules/use-vue-valid-v-on
Enforce valid v-once Vue directives. See https://biomejs.dev/linter/rules/use-vue-valid-v-once
Enforce valid v-pre Vue directives. See https://biomejs.dev/linter/rules/use-vue-valid-v-pre
Enforce valid v-text Vue directives. See https://biomejs.dev/linter/rules/use-vue-valid-v-text
Enforce opting in to Vue Vapor mode in <script setup> blocks. See https://biomejs.dev/linter/rules/use-vue-vapor
File size limit in bytes
The attribute position style.
Put the > of a multi-line HTML or JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).
Whether to insert spaces around brackets in object literals. Defaults to true.
Whether to expand arrays and objects on multiple lines.
When set to auto, object literals are formatted on multiple lines if the first property has a newline,
and array literals are formatted on a single line if it fits in the line.
When set to always, these literals are formatted on multiple lines, regardless of length of the list.
When set to never, these literals are formatted on a single line if it fits in the line.
When formatting package.json, Biome will use always unless configured otherwise. Defaults to "auto".
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.
List of rules
if false, it disables the feature and the linter won't be executed. true by default
List of rules
Specific configuration for the Json language
Specific configuration for the CSS language
Specific configuration for the filesystem
Specific configuration for the Json language
Specific configuration for the Graphql language
Specific configuration for the GritQL language
Specific configuration for the GritQL language
A list of glob patterns. Biome 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 additional plugins
Names of the exported members that allowed to be not be used.
Names of the exported members that should not be used.
The message to display when this module is imported.
An array of gitignore-style patterns.
A regex pattern for import names to forbid within the matched modules.
If true, the matched patterns in the importNamePattern will be allowed. Defaults to false.
A custom message for diagnostics related to this pattern.
A list of rules that belong to this group
Disallow the use of spread (...) syntax on accumulators. See https://biomejs.dev/linter/rules/no-accumulating-spread
Disallow await inside loops. See https://biomejs.dev/linter/rules/no-await-in-loops
Disallow the use of barrel file. See https://biomejs.dev/linter/rules/no-barrel-file
Disallow the use of the delete operator. See https://biomejs.dev/linter/rules/no-delete
Disallow accessing namespace imports dynamically. See https://biomejs.dev/linter/rules/no-dynamic-namespace-import-access
Prevent usage of <img> element in a Next.js project. See https://biomejs.dev/linter/rules/no-img-element
Disallow the use of namespace imports. See https://biomejs.dev/linter/rules/no-namespace-import
Avoid re-export all. See https://biomejs.dev/linter/rules/no-re-export-all
Prevent duplicate polyfills from Polyfill.io. See https://biomejs.dev/linter/rules/no-unwanted-polyfillio
Enables the recommended rules for this group
Ensure the preconnect attribute is used when using Google Fonts. See https://biomejs.dev/linter/rules/use-google-font-preconnect
Enforce using Solid's <For /> component for mapping an array to JSX elements. See https://biomejs.dev/linter/rules/use-solid-for-component
Require regex literals to be declared at the top level. See https://biomejs.dev/linter/rules/use-top-level-regex
Specifies whether property assignments on function parameters are allowed or denied.
2 nested properties
Rule domains
1 nested properties
It allows users to modify the strings that can be checked for in the anchor text. Useful for specifying other words in other languages
1 nested properties
Allows a list of bitwise operators to be used as exceptions.
1 nested properties
A list of (non-confusing) labels that should be allowed
1 nested properties
Whether comments are considered meaningful
1 nested properties
The maximum complexity score that we allow. Anything higher is considered excessive.
3 nested properties
The maximum number of lines allowed in a function body.
When this options is set to true, blank lines in the function body are not counted towards the maximum line limit.
When this option is set to true, Immediately Invoked Function Expressions (IIFEs) are not checked for the maximum line limit.
1 nested properties
A list of variable names allowed for forEach calls.
1 nested properties
Ignores type-only imports when finding an import cycle. A type-only import (import type)
will be removed by the compiler, so it cuts an import cycle at runtime. Note that named type
imports (import { type Foo }) aren't considered as type-only because it's not removed by
the compiler if the verbatimModuleSyntax option is enabled. Enabled by default.
1 nested properties
Allows unary operators ++ and -- in the afterthought (final expression) of a for loop.
3 nested properties
An array of strings that won't trigger the rule. Whitespaces are taken into consideration
When enabled, strings inside props are always ignored
When enabled, also flag string literals inside JSX expressions and attributes
3 nested properties
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.
1 nested properties
Whether to report an error when a dependency is listed in the dependencies array but isn't used. Defaults to allow.
1 nested properties
The default visibility to assume for symbols without visibility tag.
Default: public.
1 nested properties
Elements to restrict. Each key is the element name, and the value is the message to show when the element is used.
1 nested properties
A list of names that should trigger the rule
2 nested properties
A list of import paths that should trigger the rule.
gitignore-style patterns that should trigger the rule.
1 nested properties
1 nested properties
Set entropy threshold (default is 41).
3 nested properties
If set to false, then the rule will show an error when devDependencies are imported. Defaults to true.
If set to false, then the rule will show an error when optionalDependencies are imported. Defaults to true.
If set to false, then the rule will show an error when peerDependencies are imported. Defaults to true.
1 nested properties
Environment variables that should always be allowed.
Use this to specify environment variables that are always available
in your environment, even when not declared in turbo.json.
Supports regular expressions, e.g. ["MY_ENV_.*"].
1 nested properties
Check undeclared types.
1 nested properties
A list of unknown at-rule names to ignore (case-insensitive).
1 nested properties
2 nested properties
Allows the export of constants. This option is for environments that support it, such as Vite
A list of names that can be additionally exported from the module This option is for exports that do not hinder React Fast Refresh, such as meta in Remix
1 nested properties
Options for the useConsistentArrowReturn rule.
2 nested properties
Determines whether the rule enforces a consistent style when the return value is an object literal.
This option is only applicable when used in conjunction with the asNeeded option.
The style to enforce for arrow function return statements.
1 nested properties
The description style to enforce. Defaults to "block"
1 nested properties
The kind of accessibility you want to enforce. Default to "noPublic"
1 nested properties
The preferred syntax to enforce.
1 nested properties
1 nested properties
3 nested properties
List of hooks of which the dependencies should be validated.
Whether to report an error when a hook has no dependencies array.
Whether to report an error when a dependency is listed in the dependencies array but isn't used. Defaults to true.
4 nested properties
Allowed cases for file names.
Regular expression to enforce
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].
1 nested properties
The style to apply when import types. Default to "auto"
1 nested properties
Set to true to check shorthand fragments (<></>)
1 nested properties
Maximum number of parameters allowed (default: 4)
Rule's options.
3 nested properties
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].
1 nested properties
List of script names that must be present in package.json
[]
1 nested properties
Component names that accept an id prop that does not translate
to a DOM element id.
2 nested properties
It allows specifying a list of roles that might be invalid otherwise
Use this option to ignore non-DOM elements, such as custom components
1 nested properties
input like custom components that should be checked.
1 nested properties
1 nested properties
Preferred style for v-bind usage: "shorthand" or "longhand".
If omitted, shorthand is preferred.
1 nested properties
Preferred style for v-on usage: "shorthand" or "longhand".
If omitted, shorthand is preferred.
2 nested properties
List of attribute names to ignore when checking for hyphenated attributes.
List of HTML tags to ignore when checking for hyphenated attributes.
1 nested properties
Component names to ignore (allowed to be single-word).
1 nested properties
Additional modifiers that should be considered valid
It enables the lint rules recommended by Biome. true by default.
A list of rules that belong to this group
Disallow target="_blank" attribute without rel="noopener". See https://biomejs.dev/linter/rules/no-blank-target
Prevent the usage of dangerous JSX props. See https://biomejs.dev/linter/rules/no-dangerously-set-inner-html
Report when a DOM element or a component uses both children and dangerouslySetInnerHTML prop. See https://biomejs.dev/linter/rules/no-dangerously-set-inner-html-with-children
Disallow the use of global eval(). See https://biomejs.dev/linter/rules/no-global-eval
Disallow usage of sensitive data such as API keys and tokens. See https://biomejs.dev/linter/rules/no-secrets
Enables the recommended rules for this group
Controls whether void-elements should be self closed
A list of rules that belong to this group
Provides a code action to sort the imports and exports in the file using a built-in or custom order. See https://biomejs.dev/assist/actions/organize-imports
Enables the recommended rules for this group
Enforce attribute sorting in JSX elements. See https://biomejs.dev/assist/actions/use-sorted-attributes
Sort the keys of a JSON object in natural order. See https://biomejs.dev/assist/actions/use-sorted-keys
Enforce ordering of CSS properties and nested rules. See https://biomejs.dev/assist/actions/use-sorted-properties
A list of rules that belong to this group
Disallow use of CommonJs module system in favor of ESM style imports. See https://biomejs.dev/linter/rules/no-common-js
Disallow default exports. See https://biomejs.dev/linter/rules/no-default-export
Disallow a lower specificity selector from coming after a higher specificity selector. See https://biomejs.dev/linter/rules/no-descending-specificity
Disallow using a callback in asynchronous tests and hooks. See https://biomejs.dev/linter/rules/no-done-callback
Disallow TypeScript enum. See https://biomejs.dev/linter/rules/no-enum
Disallow exporting an imported variable. See https://biomejs.dev/linter/rules/no-exported-imports
Prevent usage of <head> element in a Next.js project. See https://biomejs.dev/linter/rules/no-head-element
Disallow implicit true values on JSX boolean attributes. See https://biomejs.dev/linter/rules/no-implicit-boolean
Disallow type annotations for variables, parameters, and class properties initialized with a literal expression. See https://biomejs.dev/linter/rules/no-inferrable-types
Reports usage of "magic numbers" — numbers used directly instead of being assigned to named constants. See https://biomejs.dev/linter/rules/no-magic-numbers
Disallow the use of TypeScript's namespaces. See https://biomejs.dev/linter/rules/no-namespace
Disallow negation in the condition of an if statement if it has an else clause. See https://biomejs.dev/linter/rules/no-negation-else
Disallow nested ternary expressions. See https://biomejs.dev/linter/rules/no-nested-ternary
Disallow non-null assertions using the ! postfix operator. See https://biomejs.dev/linter/rules/no-non-null-assertion
Disallow reassigning function parameters. See https://biomejs.dev/linter/rules/no-parameter-assign
Disallow the use of parameter properties in class constructors. See https://biomejs.dev/linter/rules/no-parameter-properties
Disallow the use of process.env. See https://biomejs.dev/linter/rules/no-process-env
This rule allows you to specify global variable names that you don’t want to use in your application. See https://biomejs.dev/linter/rules/no-restricted-globals
Disallow specified modules when loaded by import or require. See https://biomejs.dev/linter/rules/no-restricted-imports
Disallow user defined types. See https://biomejs.dev/linter/rules/no-restricted-types
Disallow the use of constants which its value is the upper-case version of its name. See https://biomejs.dev/linter/rules/no-shouty-constants
Enforce the use of String.slice() over String.substr() and String.substring(). See https://biomejs.dev/linter/rules/no-substr
Disallow template literals if interpolation and special-character handling are not needed. See https://biomejs.dev/linter/rules/no-unused-template-literal
Disallow else block when the if block breaks early. See https://biomejs.dev/linter/rules/no-useless-else
Disallow use of @value rule in css modules. See https://biomejs.dev/linter/rules/no-value-at-rule
Disallow the use of yoda expressions. See https://biomejs.dev/linter/rules/no-yoda-expression
Enables the recommended rules for this group
Disallow Array constructors. See https://biomejs.dev/linter/rules/use-array-literals
Enforce the use of as const over literal type and type annotation. See https://biomejs.dev/linter/rules/use-as-const-assertion
Use at() instead of integer index access. See https://biomejs.dev/linter/rules/use-at-index
Requires following curly brace conventions. See https://biomejs.dev/linter/rules/use-block-statements
Enforce using else if instead of nested if in else clauses. See https://biomejs.dev/linter/rules/use-collapsed-else-if
Enforce using single if instead of nested if clauses. See https://biomejs.dev/linter/rules/use-collapsed-if
Enforce declaring components only within modules that export React Components exclusively. See https://biomejs.dev/linter/rules/use-component-export-only-modules
Require consistently using either T[] or Array<T>. See https://biomejs.dev/linter/rules/use-consistent-array-type
Enforce the use of new for all builtins, except String, Number and Boolean. See https://biomejs.dev/linter/rules/use-consistent-builtin-instantiation
This rule enforces consistent use of curly braces inside JSX attributes and JSX children. See https://biomejs.dev/linter/rules/use-consistent-curly-braces
Require consistent accessibility modifiers on class properties and methods. See https://biomejs.dev/linter/rules/use-consistent-member-accessibility
Require the consistent declaration of object literals. Defaults to explicit definitions. See https://biomejs.dev/linter/rules/use-consistent-object-definitions
Enforce type definitions to consistently use either interface or type. See https://biomejs.dev/linter/rules/use-consistent-type-definitions
Require const declarations for variables that are only assigned once. See https://biomejs.dev/linter/rules/use-const
Enforce default function parameters and optional function parameters to be last. See https://biomejs.dev/linter/rules/use-default-parameter-last
Require the default clause in switch statements. See https://biomejs.dev/linter/rules/use-default-switch-clause
Require specifying the reason argument when using @deprecated directive. See https://biomejs.dev/linter/rules/use-deprecated-reason
Require that each enum member value be explicitly initialized. See https://biomejs.dev/linter/rules/use-enum-initializers
Enforce explicitly comparing the length, size, byteLength or byteOffset property of a value. See https://biomejs.dev/linter/rules/use-explicit-length-check
Disallow the use of Math.pow in favor of the ** operator. See https://biomejs.dev/linter/rules/use-exponentiation-operator
Promotes the use of export type for types. See https://biomejs.dev/linter/rules/use-export-type
Require that all exports are declared after all non-export statements. See https://biomejs.dev/linter/rules/use-exports-last
Enforce naming conventions for JavaScript and TypeScript filenames. See https://biomejs.dev/linter/rules/use-filenaming-convention
Prefer using for...of loops over standard for loops where possible. See https://biomejs.dev/linter/rules/use-for-of
This rule enforces the use of <>...</> over <Fragment>...</Fragment>. See https://biomejs.dev/linter/rules/use-fragment-syntax
Validates that all enum values are capitalized. See https://biomejs.dev/linter/rules/use-graphql-naming-convention
Enforce that getters and setters for the same property are adjacent in class and object definitions. See https://biomejs.dev/linter/rules/use-grouped-accessor-pairs
Promotes the use of import type for types. See https://biomejs.dev/linter/rules/use-import-type
Require all enum members to be literal values. See https://biomejs.dev/linter/rules/use-literal-enum-members
Enforce naming conventions for everything across a codebase. See https://biomejs.dev/linter/rules/use-naming-convention
Promotes the usage of node:assert/strict over node:assert. See https://biomejs.dev/linter/rules/use-node-assert-strict
Enforces using the node: protocol for Node.js builtin modules. See https://biomejs.dev/linter/rules/use-nodejs-import-protocol
Use the Number properties instead of global ones. See https://biomejs.dev/linter/rules/use-number-namespace
Enforce the use of numeric separators in numeric literals. See https://biomejs.dev/linter/rules/use-numeric-separators
Prefer object spread over Object.assign() when constructing new objects. See https://biomejs.dev/linter/rules/use-object-spread
Enforce that components are defined as functions and never as classes. See https://biomejs.dev/linter/rules/use-react-function-components
Enforce marking members as readonly if they are never modified outside the constructor. See https://biomejs.dev/linter/rules/use-readonly-class-properties
Prevent extra closing tags for components without children. See https://biomejs.dev/linter/rules/use-self-closing-elements
Require assignment operator shorthand where possible. See https://biomejs.dev/linter/rules/use-shorthand-assign
Enforce using function types instead of object type with call signatures. See https://biomejs.dev/linter/rules/use-shorthand-function-type
Disallow multiple variable declarations in the same variable statement. See https://biomejs.dev/linter/rules/use-single-var-declarator
Require a description parameter for the Symbol(). See https://biomejs.dev/linter/rules/use-symbol-description
Prefer template literals over string concatenation. See https://biomejs.dev/linter/rules/use-template
Require new when throwing an error. See https://biomejs.dev/linter/rules/use-throw-new-error
Disallow throwing non-Error values. See https://biomejs.dev/linter/rules/use-throw-only-error
Enforce the use of String.trimStart() and String.trimEnd() over String.trimLeft() and String.trimRight(). See https://biomejs.dev/linter/rules/use-trim-start-end
Disallow overload signatures that can be unified into a single signature. See https://biomejs.dev/linter/rules/use-unified-type-signatures
A list of rules that belong to this group
Disallow the use of alert, confirm, and prompt. See https://biomejs.dev/linter/rules/no-alert
Use standard constants instead of approximated literals. See https://biomejs.dev/linter/rules/no-approximative-numeric-constant
Discourage the usage of Array index in keys. See https://biomejs.dev/linter/rules/no-array-index-key
Disallow assignments in expressions. See https://biomejs.dev/linter/rules/no-assign-in-expressions
Disallows using an async function as a Promise executor. See https://biomejs.dev/linter/rules/no-async-promise-executor
Prevents the misuse of glob patterns inside the files.includes field. See https://biomejs.dev/linter/rules/no-biome-first-exception
Disallow bitwise operators. See https://biomejs.dev/linter/rules/no-bitwise-operators
Disallow reassigning exceptions in catch clauses. See https://biomejs.dev/linter/rules/no-catch-assign
Disallow reassigning class members. See https://biomejs.dev/linter/rules/no-class-assign
Prevent comments from being inserted as text nodes. See https://biomejs.dev/linter/rules/no-comment-text
Disallow comparing against -0. See https://biomejs.dev/linter/rules/no-compare-neg-zero
Disallow labeled statements that are not loops. See https://biomejs.dev/linter/rules/no-confusing-labels
Disallow void type outside of generic or return types. See https://biomejs.dev/linter/rules/no-confusing-void-type
Disallow the use of console. See https://biomejs.dev/linter/rules/no-console
Disallow TypeScript const enum. See https://biomejs.dev/linter/rules/no-const-enum
Disallow expressions where the operation doesn't affect the value. See https://biomejs.dev/linter/rules/no-constant-binary-expressions
Prevents from having control characters and some escape sequences that match control characters in regular expression literals. See https://biomejs.dev/linter/rules/no-control-characters-in-regex
Disallow the use of debugger. See https://biomejs.dev/linter/rules/no-debugger
Disallow direct assignments to document.cookie. See https://biomejs.dev/linter/rules/no-document-cookie
Prevents importing next/document outside of pages/_document.jsx in Next.js projects. See https://biomejs.dev/linter/rules/no-document-import-in-page
Require the use of === and !==. See https://biomejs.dev/linter/rules/no-double-equals
Disallow duplicate @import rules. See https://biomejs.dev/linter/rules/no-duplicate-at-import-rules
Disallow duplicate case labels. See https://biomejs.dev/linter/rules/no-duplicate-case
Disallow duplicate class members. See https://biomejs.dev/linter/rules/no-duplicate-class-members
Disallow duplicate custom properties within declaration blocks. See https://biomejs.dev/linter/rules/no-duplicate-custom-properties
Disallow duplicate conditions in if-else-if chains. See https://biomejs.dev/linter/rules/no-duplicate-else-if
No duplicated fields in GraphQL operations. See https://biomejs.dev/linter/rules/no-duplicate-fields
Disallow duplicate names within font families. See https://biomejs.dev/linter/rules/no-duplicate-font-names
Prevents JSX properties to be assigned multiple times. See https://biomejs.dev/linter/rules/no-duplicate-jsx-props
Disallow two keys with the same name inside objects. See https://biomejs.dev/linter/rules/no-duplicate-object-keys
Disallow duplicate function parameter name. See https://biomejs.dev/linter/rules/no-duplicate-parameters
Disallow duplicate properties within declaration blocks. See https://biomejs.dev/linter/rules/no-duplicate-properties
Disallow duplicate selectors within keyframe blocks. See https://biomejs.dev/linter/rules/no-duplicate-selectors-keyframe-block
A describe block should not contain duplicate hooks. See https://biomejs.dev/linter/rules/no-duplicate-test-hooks
Disallow CSS empty blocks. See https://biomejs.dev/linter/rules/no-empty-block
Disallow empty block statements and static blocks. See https://biomejs.dev/linter/rules/no-empty-block-statements
Disallow the declaration of empty interfaces. See https://biomejs.dev/linter/rules/no-empty-interface
Disallow variables from evolving into any type through reassignments. See https://biomejs.dev/linter/rules/no-evolving-types
Disallow the any type usage. See https://biomejs.dev/linter/rules/no-explicit-any
Disallow using export or module.exports in files containing tests. See https://biomejs.dev/linter/rules/no-exports-in-test
Prevents the wrong usage of the non-null assertion operator (!) in TypeScript files. See https://biomejs.dev/linter/rules/no-extra-non-null-assertion
Disallow fallthrough of switch clauses. See https://biomejs.dev/linter/rules/no-fallthrough-switch-clause
Disallow focused tests. See https://biomejs.dev/linter/rules/no-focused-tests
Disallow reassigning function declarations. See https://biomejs.dev/linter/rules/no-function-assign
Disallow assignments to native objects and read-only global variables. See https://biomejs.dev/linter/rules/no-global-assign
Use Number.isFinite instead of global isFinite. See https://biomejs.dev/linter/rules/no-global-is-finite
Use Number.isNaN instead of global isNaN. See https://biomejs.dev/linter/rules/no-global-is-nan
Prevent using the next/head module in pages/_document.js on Next.js projects. See https://biomejs.dev/linter/rules/no-head-import-in-document
Disallow use of implicit any type on variable declarations. See https://biomejs.dev/linter/rules/no-implicit-any-let
Disallow assigning to imported bindings. See https://biomejs.dev/linter/rules/no-import-assign
Disallow invalid !important within keyframe declarations. See https://biomejs.dev/linter/rules/no-important-in-keyframe
Disallows the use of irregular whitespace characters. See https://biomejs.dev/linter/rules/no-irregular-whitespace
Disallow labels that share a name with a variable. See https://biomejs.dev/linter/rules/no-label-var
Disallow characters made with multiple code points in character class syntax. See https://biomejs.dev/linter/rules/no-misleading-character-class
Enforce proper usage of new and constructor. See https://biomejs.dev/linter/rules/no-misleading-instantiator
Checks that the assertion function, for example expect, is placed inside an it() function call. See https://biomejs.dev/linter/rules/no-misplaced-assertion
Disallow shorthand assign when variable appears on both sides. See https://biomejs.dev/linter/rules/no-misrefactored-shorthand-assign
Disallow non-null assertions after optional chaining expressions. See https://biomejs.dev/linter/rules/no-non-null-asserted-optional-chain
Disallow octal escape sequences in string literals. See https://biomejs.dev/linter/rules/no-octal-escape
Disallow direct use of Object.prototype builtins. See https://biomejs.dev/linter/rules/no-prototype-builtins
Disallow the use if quickfix.biome inside editor settings file. See https://biomejs.dev/linter/rules/no-quickfix-biome
Prevents React-specific JSX properties from being used. See https://biomejs.dev/linter/rules/no-react-specific-props
Disallow variable, function, class, and type redeclarations in the same scope. See https://biomejs.dev/linter/rules/no-redeclare
Prevents from having redundant "use strict". See https://biomejs.dev/linter/rules/no-redundant-use-strict
Disallow comparisons where both sides are exactly the same. See https://biomejs.dev/linter/rules/no-self-compare
Disallow identifiers from shadowing restricted names. See https://biomejs.dev/linter/rules/no-shadow-restricted-names
Disallow shorthand properties that override related longhand properties. See https://biomejs.dev/linter/rules/no-shorthand-property-overrides
Disallow disabled tests. See https://biomejs.dev/linter/rules/no-skipped-tests
Prevents the use of sparse arrays (arrays with holes). See https://biomejs.dev/linter/rules/no-sparse-array
It detects possible "wrong" semicolons inside JSX elements. See https://biomejs.dev/linter/rules/no-suspicious-semicolon-in-jsx
Disallow template literal placeholder syntax in regular strings. See https://biomejs.dev/linter/rules/no-template-curly-in-string
Disallow then property. See https://biomejs.dev/linter/rules/no-then-property
Prevents the use of the TypeScript directive @ts-ignore. See https://biomejs.dev/linter/rules/no-ts-ignore
Disallow let or var variables that are read but never assigned. See https://biomejs.dev/linter/rules/no-unassigned-variables
Disallow unknown at-rules. See https://biomejs.dev/linter/rules/no-unknown-at-rules
Disallow unsafe declaration merging between interfaces and classes. See https://biomejs.dev/linter/rules/no-unsafe-declaration-merging
Disallow using unsafe negation. See https://biomejs.dev/linter/rules/no-unsafe-negation
Disallow unnecessary escapes in string literals. See https://biomejs.dev/linter/rules/no-useless-escape-in-string
Disallow useless backreferences in regular expression literals that always match an empty string. See https://biomejs.dev/linter/rules/no-useless-regex-backrefs
Disallow the use of var. See https://biomejs.dev/linter/rules/no-var
Disallow with statements in non-strict contexts. See https://biomejs.dev/linter/rules/no-with
Enables the recommended rules for this group
Disallow the use of overload signatures that are not next to each other. See https://biomejs.dev/linter/rules/use-adjacent-overload-signatures
Ensure async functions utilize await. See https://biomejs.dev/linter/rules/use-await
Promotes the correct usage for ignoring folders in the configuration file. See https://biomejs.dev/linter/rules/use-biome-ignore-folder
Enforce default clauses in switch statements to be last. See https://biomejs.dev/linter/rules/use-default-switch-clause-last
Enforce passing a message value when creating a built-in error. See https://biomejs.dev/linter/rules/use-error-message
Enforce get methods to always return a value. See https://biomejs.dev/linter/rules/use-getter-return
Enforces the use of a recommended display strategy with Google Fonts. See https://biomejs.dev/linter/rules/use-google-font-display
Require for-in loops to include an if statement. See https://biomejs.dev/linter/rules/use-guard-for-in
Use Array.isArray() instead of instanceof Array. See https://biomejs.dev/linter/rules/use-is-array
Enforce consistent return values in iterable callbacks. See https://biomejs.dev/linter/rules/use-iterable-callback-return
Require using the namespace keyword over the module keyword to declare TypeScript namespaces. See https://biomejs.dev/linter/rules/use-namespace-keyword
Enforce using the digits argument with Number#toFixed(). See https://biomejs.dev/linter/rules/use-number-to-fixed-digits-argument
Use static Response methods instead of new Response() constructor when possible. See https://biomejs.dev/linter/rules/use-static-response-methods
Enforce the use of the directive "use strict" in script files. See https://biomejs.dev/linter/rules/use-strict-mode
Allows the export of constants. This option is for environments that support it, such as Vite
A list of names that can be additionally exported from the module This option is for exports that do not hinder React Fast Refresh, such as meta in Remix
Options for the useConsistentArrowReturn rule.
Determines whether the rule enforces a consistent style when the return value is an object literal.
This option is only applicable when used in conjunction with the asNeeded option.
The style to enforce for arrow function return statements.
The description style to enforce. Defaults to "block"
The GraphQL description style to enforce.
The kind of accessibility you want to enforce. Default to "noPublic"
The preferred syntax to enforce.
List of hooks of which the dependencies should be validated.
Whether to report an error when a hook has no dependencies array.
Whether to report an error when a dependency is listed in the dependencies array but isn't used. Defaults to true.
Allowed cases for file names.
Regular expression to enforce
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].
If true, the suggested extension is always .js regardless of what
extension the source file has in your project.
The style to apply when import types. Default to "auto"
The style to apply when importing types.
Set to true to check shorthand fragments (<></>)
Maximum number of parameters allowed (default: 4)
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].
When true, the keywords public, protected, and private are analyzed by the rule.
List of script names that must be present in package.json
[]
Additional attributes that will be sorted.
Names of the functions or tagged templates that will be sorted.
Component names that accept an id prop that does not translate
to a DOM element id.
It allows specifying a list of roles that might be invalid otherwise
Use this option to ignore non-DOM elements, such as custom components
input like custom components that should be checked.
Preferred style for v-bind usage: "shorthand" or "longhand".
If omitted, shorthand is preferred.
Preferred style for v-on usage: "shorthand" or "longhand".
If omitted, shorthand is preferred.
The order of the Vue define macros.
List of attribute names to ignore when checking for hyphenated attributes.
List of HTML tags to ignore when checking for hyphenated attributes.
Component names to ignore (allowed to be single-word).
Additional modifiers that should be considered valid
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.
Whitespace sensitivity for HTML formatting.
The following two cases won't produce the same output:
| html | output | |
|---|---|---|
| with spaces | 1<b> 2 </b>3 | 1 2 3 |
| without spaces | 1<b>2</b>3 | 123 |
This happens because whitespace is significant in inline elements.
As a consequence of this, the formatter must format blocks that look like this (assume a small line width, <20):
<span>really long content</span>
as this, where the content hugs the tags:
<span
>really long content</span
>
Note that this is only necessary for inline elements. Block elements do not have this restriction.