Schema URL

Type: object

The configuration that is contained inside the file biome.json

Properties

$schema string | null

A field for the JSON schema specification

css CssConfiguration | null

Specific configuration for the Css language

extends StringSet | null

A list of paths to other JSON files, used to extends the current configuration.

files FilesConfiguration | null

The configuration of the filesystem

formatter FormatterConfiguration | null

The configuration of the formatter

javascript JavascriptConfiguration | null

Specific configuration for the JavaScript language

json JsonConfiguration | null

Specific configuration for the Json language

linter LinterConfiguration | null

The configuration for the linter

organizeImports OrganizeImports | null

The configuration of the import sorting

overrides Overrides | null

A list of granular patterns that should be applied only to a sub set of files

vcs VcsConfiguration | null

The configuration of the VCS integration

Definitions

A11y object

A list of rules that belong to this group

all boolean | null

It enables ALL rules for this group.

noAccessKey RuleFixConfiguration | null

Enforce that the accessKey attribute is not used on any HTML element.

noAriaHiddenOnFocusable RuleFixConfiguration | null

Enforce that aria-hidden="true" is not set on focusable elements.

noAriaUnsupportedElements RuleFixConfiguration | null

Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.

noAutofocus RuleFixConfiguration | null

Enforce that autoFocus prop is not used on elements.

noBlankTarget RuleFixConfiguration | null

Disallow target="_blank" attribute without rel="noreferrer"

noDistractingElements RuleFixConfiguration | null

Enforces that no distracting elements are used.

noHeaderScope RuleFixConfiguration | null

The scope prop should be used only on <th> elements.

noInteractiveElementToNoninteractiveRole RuleFixConfiguration | null

Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements.

noNoninteractiveElementToInteractiveRole RuleFixConfiguration | null

Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.

noNoninteractiveTabindex RuleFixConfiguration | null

Enforce that tabIndex is not assigned to non-interactive HTML elements.

noPositiveTabindex RuleFixConfiguration | null

Prevent the usage of positive integers on tabIndex property

noRedundantAlt RuleConfiguration | null

Enforce img alt prop does not contain the word "image", "picture", or "photo".

noRedundantRoles RuleFixConfiguration | null

Enforce explicit role property is not the same as implicit/default role property on an element.

noSvgWithoutTitle RuleConfiguration | null

Enforces the usage of the title element for the svg element.

recommended boolean | null

It enables the recommended rules for this group

useAltText RuleConfiguration | null

Enforce that all elements that require alternative text have meaningful information to relay back to the end user.

useAnchorContent RuleFixConfiguration | null

Enforce that anchors have content and that the content is accessible to screen readers.

useAriaActivedescendantWithTabindex RuleFixConfiguration | null

Enforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant.

useAriaPropsForRole RuleConfiguration | null

Enforce that elements with ARIA roles must have all required ARIA attributes for that role.

useButtonType RuleConfiguration | null

Enforces the usage of the attribute type for the element button

useHeadingContent RuleConfiguration | null

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.

useHtmlLang RuleConfiguration | null

Enforce that html element has lang attribute.

useIframeTitle RuleConfiguration | null

Enforces the usage of the attribute title for the element iframe.

useKeyWithClickEvents RuleConfiguration | null

Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress.

useKeyWithMouseEvents RuleConfiguration | null

Enforce onMouseOver / onMouseOut are accompanied by onFocus / onBlur.

useMediaCaption RuleConfiguration | null

Enforces that audio and video elements must have a track for captions.

useValidAnchor RuleConfiguration | null

Enforce that all anchors are valid, and they are navigable elements.

useValidAriaProps RuleFixConfiguration | null

Ensures that ARIA properties aria-* are all valid.

useValidAriaRole ValidAriaRoleConfiguration | null

Elements with ARIA roles must use a valid, non-abstract ARIA role.

useValidAriaValues RuleConfiguration | null

Enforce that ARIA state and property values are valid.

useValidLang RuleConfiguration | null

Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.

ArrowParentheses string
AttributePosition string
Complexity object

A list of rules that belong to this group

all boolean | null

It enables ALL rules for this group.

noBannedTypes RuleFixConfiguration | null

Disallow primitive type aliases and misleading types.

noEmptyTypeParameters RuleConfiguration | null

Disallow empty type parameters in type aliases and interfaces.

noExcessiveCognitiveComplexity ComplexityConfiguration | null

Disallow functions that exceed a given Cognitive Complexity score.

noExcessiveNestedTestSuites RuleConfiguration | null

This rule enforces a maximum depth to nested describe() in test files.

noExtraBooleanCast RuleFixConfiguration | null

Disallow unnecessary boolean casts

noForEach RuleConfiguration | null

Prefer for...of statement instead of Array.forEach.

noMultipleSpacesInRegularExpressionLiterals RuleFixConfiguration | null

Disallow unclear usage of consecutive space characters in regular expression literals

noStaticOnlyClass RuleConfiguration | null

This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.

noThisInStatic RuleFixConfiguration | null

Disallow this and super in static contexts.

noUselessCatch RuleConfiguration | null

Disallow unnecessary catch clauses.

noUselessConstructor RuleFixConfiguration | null

Disallow unnecessary constructors.

noUselessEmptyExport RuleFixConfiguration | null

Disallow empty exports that don't change anything in a module file.

noUselessFragments RuleFixConfiguration | null

Disallow unnecessary fragments

noUselessLabel RuleFixConfiguration | null

Disallow unnecessary labels.

noUselessLoneBlockStatements RuleFixConfiguration | null

Disallow unnecessary nested block statements.

noUselessRename RuleFixConfiguration | null

Disallow renaming import, export, and destructured assignments to the same name.

noUselessSwitchCase RuleFixConfiguration | null

Disallow useless case in switch statements.

noUselessTernary RuleFixConfiguration | null

Disallow ternary operators when simpler alternatives exist.

noUselessThisAlias RuleFixConfiguration | null

Disallow useless this aliasing.

noUselessTypeConstraint RuleFixConfiguration | null

Disallow using any or unknown as type constraint.

noVoid RuleConfiguration | null

Disallow the use of void operators, which is not a familiar operator.

noWith RuleConfiguration | null

Disallow with statements in non-strict contexts.

recommended boolean | null

It enables the recommended rules for this group

useArrowFunction RuleFixConfiguration | null

Use arrow functions over function expressions.

useFlatMap RuleFixConfiguration | null

Promotes the use of .flatMap() when map().flat() are used together.

useLiteralKeys RuleFixConfiguration | null

Enforce the usage of a literal access to properties over computed property access.

useOptionalChain RuleFixConfiguration | null

Enforce using concise optional chain instead of chained logical expressions.

useRegexLiterals RuleFixConfiguration | null

Enforce the use of the regular expression literals instead of the RegExp constructor if possible.

useSimpleNumberKeys RuleFixConfiguration | null

Disallow number literal object member names which are not base10 or uses underscore as separator

useSimplifiedLogicExpression RuleFixConfiguration | null

Discard redundant terms from logical expressions.

ComplexityConfiguration RulePlainConfiguration | RuleWithComplexityOptions
ComplexityOptions object

Options for the rule noExcessiveCognitiveComplexity.

maxAllowedComplexity integer required

The maximum complexity score that we allow. Anything higher is considered excessive.

format=uint8min=1
ConsistentArrayType string | string
ConsistentArrayTypeConfiguration RulePlainConfiguration | RuleWithConsistentArrayTypeOptions
ConsistentArrayTypeOptions object
syntax string | string required
Convention object
formats

String cases to enforce

All of: Formats Format[]
match Regex | null

Regular expression to enforce

selector

Declarations concerned by this convention

All of: Selector object
Correctness object

A list of rules that belong to this group

all boolean | null

It enables ALL rules for this group.

noChildrenProp RuleConfiguration | null

Prevent passing of children as props.

noConstAssign RuleFixConfiguration | null

Prevents from having const variables being re-assigned.

noConstantCondition RuleConfiguration | null

Disallow constant expressions in conditions

noConstantMathMinMaxClamp RuleFixConfiguration | null

Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant.

noConstructorReturn RuleConfiguration | null

Disallow returning a value from a constructor.

noEmptyCharacterClassInRegex RuleConfiguration | null

Disallow empty character classes in regular expression literals.

noEmptyPattern RuleConfiguration | null

Disallows empty destructuring patterns.

noFlatMapIdentity RuleFixConfiguration | null

Disallow to use unnecessary callback on flatMap.

noGlobalObjectCalls RuleConfiguration | null

Disallow calling global object properties as functions

noInnerDeclarations RuleConfiguration | null

Disallow function and var declarations that are accessible outside their block.

noInvalidConstructorSuper RuleConfiguration | null

Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.

noInvalidNewBuiltin RuleFixConfiguration | null

Disallow new operators with global non-constructor functions.

noInvalidUseBeforeDeclaration RuleConfiguration | null

Disallow the use of variables and function parameters before their declaration

noNewSymbol RuleFixConfiguration | null

Disallow new operators with the Symbol object.

noNodejsModules RuleConfiguration | null

Forbid the use of Node.js builtin modules.

noNonoctalDecimalEscape RuleFixConfiguration | null

Disallow \8 and \9 escape sequences in string literals.

noPrecisionLoss RuleConfiguration | null

Disallow literal numbers that lose precision

noRenderReturnValue RuleConfiguration | null

Prevent the usage of the return value of React.render.

noSelfAssign RuleConfiguration | null

Disallow assignments where both sides are exactly the same.

noSetterReturn RuleConfiguration | null

Disallow returning a value from a setter

noStringCaseMismatch RuleFixConfiguration | null

Disallow comparison of expressions modifying the string case with non-compliant value.

noSwitchDeclarations RuleFixConfiguration | null

Disallow lexical declarations in switch clauses.

noUndeclaredVariables RuleConfiguration | null

Prevents the usage of variables that haven't been declared inside the document.

noUnnecessaryContinue RuleFixConfiguration | null

Avoid using unnecessary continue.

noUnreachable RuleConfiguration | null

Disallow unreachable code

noUnreachableSuper RuleConfiguration | null

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

noUnsafeFinally RuleConfiguration | null

Disallow control flow statements in finally blocks.

noUnsafeOptionalChaining RuleConfiguration | null

Disallow the use of optional chaining in contexts where the undefined value is not allowed.

noUnusedImports RuleFixConfiguration | null

Disallow unused imports.

noUnusedLabels RuleFixConfiguration | null

Disallow unused labels.

noUnusedPrivateClassMembers RuleFixConfiguration | null

Disallow unused private class members

noUnusedVariables RuleFixConfiguration | null

Disallow unused variables.

noVoidElementsWithChildren RuleFixConfiguration | null

This rules prevents void elements (AKA self-closing elements) from having children.

noVoidTypeReturn RuleConfiguration | null

Disallow returning a value from a function with the return type 'void'

recommended boolean | null

It enables the recommended rules for this group

useArrayLiterals RuleFixConfiguration | null

Disallow Array constructors.

useExhaustiveDependencies HooksConfiguration | null

Enforce all dependencies are correctly specified in a React hook.

useHookAtTopLevel DeprecatedHooksConfiguration | null

Enforce that all React hooks are being called from the Top Level component functions.

useIsNan RuleFixConfiguration | null

Require calls to isNaN() when checking for NaN.

useJsxKeyInIterable RuleConfiguration | null

Disallow missing key props in iterators/collection literals.

useValidForDirection RuleConfiguration | null

Enforce "for" loop update clause moving the counter in the right direction.

useYield RuleConfiguration | null

Require generator functions to contain yield.

CssConfiguration object

Options applied to CSS files

formatter CssFormatter | null

CSS formatter options

linter CssLinter | null

CSS linter options

parser CssParser | null

CSS parsing options

CssFormatter object

Options that changes how the CSS formatter behaves

enabled boolean | null

Control the formatter for CSS (and its super languages) files.

indentStyle PlainIndentStyle | null

The indent style applied to CSS (and its super languages) files.

indentWidth IndentWidth | null

The size of the indentation applied to CSS (and its super languages) files. Default to 2.

lineEnding LineEnding | null

The type of line ending applied to CSS (and its super languages) files.

lineWidth LineWidth | null

What's the max width of a line applied to CSS (and its super languages) files. Defaults to 80.

quoteStyle QuoteStyle | null

The type of quotes used in CSS code. Defaults to double.

CssLinter object

Options that changes how the CSS linter behaves

enabled boolean | null

Control the linter for CSS (and its super languages) files.

CssParser object

Options that changes how the CSS parser behaves

allowWrongLineComments boolean | null

Allow comments to appear on incorrect lines in .css files

cssModules boolean | null

Enables parsing of CSS Modules specific features.

DeprecatedHooksConfiguration RulePlainConfiguration | RuleWithDeprecatedHooksOptions
DeprecatedHooksOptions object

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.

FilenameCase string | string | string | string | string

Supported cases for file names.

FilenameCases FilenameCase[]
FilenamingConventionConfiguration RulePlainConfiguration | RuleWithFilenamingConventionOptions
FilenamingConventionOptions object

Rule's options.

filenameCases

Allowed cases for file names.

All of: FilenameCases FilenameCase[]
requireAscii boolean

If false, then non-ASCII characters are allowed.

strictCase boolean

If false, then consecutive uppercase are allowed in camel and pascal cases. This does not affect other [Case].

FilesConfiguration object

The configuration of the filesystem

ignore StringSet | null

A list of Unix shell style patterns. Biome will ignore files/folders that will match these patterns.

ignoreUnknown boolean | null

Tells Biome to not emit diagnostics when handling files that doesn't know

include StringSet | null

A list of Unix shell style patterns. Biome will handle only those files/folders that will match these patterns.

maxSize integer | null

The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reasons. Defaults to 1 MiB

format=uint64min=1
FixKind string | string | string

Used to identify the kind of code action emitted by a rule

Format string

Supported cases.

Formats Format[]
FormatterConfiguration object

Generic options applied to all files

attributePosition AttributePosition | null

The attribute position style in HTMLish languages. By default auto.

enabled boolean | null
formatWithErrors boolean | null

Stores whether formatting should be allowed to proceed if a given file has syntax errors

ignore StringSet | null

A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.

include StringSet | null

A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.

indentSize IndentWidth | null

The size of the indentation, 2 by default (deprecated, use indent-width)

indentStyle PlainIndentStyle | null

The indent style.

indentWidth IndentWidth | null

The size of the indentation, 2 by default

lineEnding LineEnding | null

The type of line ending.

lineWidth LineWidth | null

What's the max width of a line. Defaults to 80.

Hook object
name string required

The name of the hook.

stableResult required

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].

All of: StableHookResult boolean | integer[]
closureIndex integer | null

The "position" of the closure function, starting from zero.

For example, for React's useEffect() hook, the closure index is 0.

format=uint8min=0
dependenciesIndex integer | null

The "position" of the array of dependencies, starting from zero.

For example, for React's useEffect() hook, the dependencies index is 1.

format=uint8min=0
HooksConfiguration RulePlainConfiguration | RuleWithHooksOptions
HooksOptions object

Options for the rule useExhaustiveDependencies

hooks Hook[] required

List of hooks of which the dependencies should be validated.

IndentWidth integer
JavascriptConfiguration object

A set of options applied to the JavaScript files

formatter JavascriptFormatter | null

Formatting options

globals StringSet | null

A list of global bindings that should be ignored by the analyzers

If defined here, they should not emit diagnostics.

jsxRuntime JsxRuntime | null

Indicates the type of runtime or transformation used for interpreting JSX.

linter JavascriptLinter | null

Linter options

organizeImports JavascriptOrganizeImports | null
parser JavascriptParser | null

Parsing options

JavascriptFormatter object

Formatting options specific to the JavaScript files

arrowParentheses ArrowParentheses | null

Whether to add non-necessary parentheses to arrow functions. Defaults to "always".

attributePosition AttributePosition | null

The attribute position style in jsx elements. Defaults to auto.

bracketSameLine boolean | null

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.

bracketSpacing boolean | null

Whether to insert spaces around brackets in object literals. Defaults to true.

enabled boolean | null

Control the formatter for JavaScript (and its super languages) files.

indentSize IndentWidth | null

The size of the indentation applied to JavaScript (and its super languages) files. Default to 2.

indentStyle PlainIndentStyle | null

The indent style applied to JavaScript (and its super languages) files.

indentWidth IndentWidth | null

The size of the indentation applied to JavaScript (and its super languages) files. Default to 2.

jsxQuoteStyle QuoteStyle | null

The type of quotes used in JSX. Defaults to double.

lineEnding LineEnding | null

The type of line ending applied to JavaScript (and its super languages) files.

lineWidth LineWidth | null

What's the max width of a line applied to JavaScript (and its super languages) files. Defaults to 80.

quoteProperties QuoteProperties | null

When properties in objects are quoted. Defaults to asNeeded.

quoteStyle QuoteStyle | null

The type of quotes used in JavaScript code. Defaults to double.

semicolons Semicolons | null

Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.

trailingComma TrailingCommas | null

Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "all".

trailingCommas TrailingCommas | null

Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "all".

JavascriptLinter object

Linter options specific to the JavaScript linter

enabled boolean | null

Control the linter for JavaScript (and its super languages) files.

JavascriptOrganizeImports object
JavascriptParser object

Options that changes how the JavaScript parser behaves

unsafeParameterDecoratorsEnabled boolean | null

It enables the experimental and unsafe parsing of parameter decorators

These decorators belong to an old proposal, and they are subject to change.

JsonConfiguration object

Options applied to JSON files

formatter JsonFormatter | null

Formatting options

linter JsonLinter | null

Linting options

parser JsonParser | null

Parsing options

JsonFormatter object
enabled boolean | null

Control the formatter for JSON (and its super languages) files.

indentSize IndentWidth | null

The size of the indentation applied to JSON (and its super languages) files. Default to 2.

indentStyle PlainIndentStyle | null

The indent style applied to JSON (and its super languages) files.

indentWidth IndentWidth | null

The size of the indentation applied to JSON (and its super languages) files. Default to 2.

lineEnding LineEnding | null

The type of line ending applied to JSON (and its super languages) files.

lineWidth LineWidth | null

What's the max width of a line applied to JSON (and its super languages) files. Defaults to 80.

trailingCommas TrailingCommas2 | null

Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "none".

JsonLinter object

Linter options specific to the JSON linter

enabled boolean | null

Control the linter for JSON (and its super languages) files.

JsonParser object

Options that changes how the JSON parser behaves

allowComments boolean | null

Allow parsing comments in .json files

allowTrailingCommas boolean | null

Allow parsing trailing commas in .json files

JsxRuntime string | string

Indicates the type of runtime or transformation used for interpreting JSX.

Kind string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string
LineEnding string | string | string
LineWidth integer

Validated value for the line_width formatter options

The allowed range of values is 1..=320

LinterConfiguration object
enabled boolean | null

if false, it disables the feature and the linter won't be executed. true by default

ignore StringSet | null

A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.

include StringSet | null

A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.

rules Rules | null

List of rules

Modifiers RestrictedModifier[]
NamingConventionConfiguration RulePlainConfiguration | RuleWithNamingConventionOptions
NamingConventionOptions object

Rule's options.

conventions Convention[]

Custom conventions.

enumMemberCase

Allowed cases for TypeScript enum member names.

All of: Format string
requireAscii boolean

If false, then non-ASCII characters are allowed.

strictCase boolean

If false, then consecutive uppercase are allowed in camel and pascal cases. This does not affect other [Case].

NoLabelWithoutControlConfiguration RulePlainConfiguration | RuleWithNoLabelWithoutControlOptions
NoLabelWithoutControlOptions object
inputComponents string[] required

Array of component names that should be considered the same as an input element.

labelAttributes string[] required

Array of attributes that should be treated as the label accessible text content.

labelComponents string[] required

Array of component names that should be considered the same as a label element.

Nursery object

A list of rules that belong to this group

all boolean | null

It enables ALL rules for this group.

noConsole RuleFixConfiguration | null

Disallow the use of console.

noDoneCallback RuleConfiguration | null

Disallow using a callback in asynchronous tests and hooks.

noDuplicateAtImportRules RuleConfiguration | null

Disallow duplicate @import rules.

noDuplicateElseIf RuleConfiguration | null

Disallow duplicate conditions in if-else-if chains

noDuplicateFontNames RuleConfiguration | null

Disallow duplicate names within font families.

noDuplicateJsonKeys RuleConfiguration | null

Disallow two keys with the same name inside a JSON object.

noDuplicateSelectorsKeyframeBlock RuleConfiguration | null

Disallow duplicate selectors within keyframe blocks.

noEmptyBlock RuleConfiguration | null

Disallow CSS empty blocks.

noEvolvingTypes RuleConfiguration | null

Disallow variables from evolving into any type through reassignments.

noImportantInKeyframe RuleConfiguration | null

Disallow invalid !important within keyframe declarations

noInvalidPositionAtImportRule RuleConfiguration | null

Disallow the use of @import at-rules in invalid positions.

noLabelWithoutControl NoLabelWithoutControlConfiguration | null

Enforce that a label element or component has a text label and an associated input.

noMisplacedAssertion RuleConfiguration | null

Checks that the assertion function, for example expect, is placed inside an it() function call.

noReactSpecificProps RuleFixConfiguration | null

Prevents React-specific JSX properties from being used.

noRestrictedImports RestrictedImportsConfiguration | null

Disallow specified modules when loaded by import or require.

noShorthandPropertyOverrides RuleConfiguration | null

Disallow shorthand properties that override related longhand properties.

noUndeclaredDependencies RuleConfiguration | null

Disallow the use of dependencies that aren't specified in the package.json.

noUnknownFunction RuleConfiguration | null

Disallow unknown CSS value functions.

noUnknownMediaFeatureName RuleConfiguration | null

Disallow unknown media feature names.

noUnknownProperty RuleConfiguration | null

Disallow unknown properties.

noUnknownPseudoClassSelector RuleConfiguration | null

Disallow unknown pseudo-class selectors.

noUnknownSelectorPseudoElement RuleConfiguration | null

Disallow unknown pseudo-element selectors.

noUnknownUnit RuleConfiguration | null

Disallow unknown CSS units.

noUnmatchableAnbSelector RuleConfiguration | null

Disallow unmatchable An+B selectors.

noUnusedFunctionParameters RuleFixConfiguration | null

Disallow unused function parameters.

noUselessStringConcat RuleFixConfiguration | null

Disallow unnecessary concatenation of string or template literals.

noUselessUndefinedInitialization RuleFixConfiguration | null

Disallow initializing variables to undefined.

noYodaExpression RuleFixConfiguration | null

Disallow the use of yoda expressions.

recommended boolean | null

It enables the recommended rules for this group

useAdjacentOverloadSignatures RuleConfiguration | null

Disallow the use of overload signatures that are not next to each other.

useConsistentBuiltinInstantiation RuleFixConfiguration | null

Enforce the use of new for all builtins, except String, Number, Boolean, Symbol and BigInt.

useConsistentGridAreas RuleConfiguration | null

Disallowing invalid named grid areas in CSS Grid Layouts.

useDateNow RuleFixConfiguration | null

Use Date.now() to get the number of milliseconds since the Unix Epoch.

useDefaultSwitchClause RuleConfiguration | null

Require the default clause in switch statements.

useErrorMessage RuleConfiguration | null

Enforce passing a message value when creating a built-in error.

useExplicitLengthCheck RuleFixConfiguration | null

Enforce explicitly comparing the length, size, byteLength or byteOffset property of a value.

useFocusableInteractive RuleConfiguration | null

Elements with an interactive role and interaction handlers must be focusable.

useGenericFontNames RuleConfiguration | null

Disallow a missing generic family keyword within font families.

useImportExtensions RuleFixConfiguration | null

Enforce file extensions for relative imports.

useImportRestrictions RuleConfiguration | null

Disallows package private imports.

useNumberToFixedDigitsArgument RuleFixConfiguration | null

Enforce using the digits argument with Number#toFixed().

useSemanticElements RuleConfiguration | null

It detects the use of role attributes in JSX elements and suggests using semantic elements instead.

useSortedClasses UtilityClassSortingConfiguration | null

Enforce the sorting of CSS utility classes.

useThrowNewError RuleFixConfiguration | null

Require new when throwing an error.

useThrowOnlyError RuleConfiguration | null

Disallow throwing non-Error values.

useTopLevelRegex RuleConfiguration | null

Require regex literals to be declared at the top level.

OrganizeImports object
enabled boolean | null

Enables the organization of imports

ignore StringSet | null

A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.

include StringSet | null

A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.

OverrideFormatterConfiguration object
attributePosition AttributePosition | null

The attribute position style.

enabled boolean | null
formatWithErrors boolean | null

Stores whether formatting should be allowed to proceed if a given file has syntax errors

indentSize IndentWidth | null

The size of the indentation, 2 by default (deprecated, use indent-width)

indentStyle PlainIndentStyle | null

The indent style.

indentWidth IndentWidth | null

The size of the indentation, 2 by default

lineEnding LineEnding | null

The type of line ending.

lineWidth LineWidth | null

What's the max width of a line. Defaults to 80.

OverrideLinterConfiguration object
enabled boolean | null

if false, it disables the feature and the linter won't be executed. true by default

rules Rules | null

List of rules

OverrideOrganizeImportsConfiguration object
enabled boolean | null

if false, it disables the feature and the linter won't be executed. true by default

OverridePattern object
css CssConfiguration | null

Specific configuration for the Css language

Specific configuration for the Json language

ignore StringSet | null

A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.

include StringSet | null

A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.

javascript JavascriptConfiguration | null

Specific configuration for the JavaScript language

json JsonConfiguration | null

Specific configuration for the Json language

Specific configuration for the Json language

organizeImports OverrideOrganizeImportsConfiguration | null

Specific configuration for the Json language

Overrides OverridePattern[]
Performance object

A list of rules that belong to this group

all boolean | null

It enables ALL rules for this group.

noAccumulatingSpread RuleConfiguration | null

Disallow the use of spread (...) syntax on accumulators.

noBarrelFile RuleConfiguration | null

Disallow the use of barrel file.

noDelete RuleFixConfiguration | null

Disallow the use of the delete operator.

noReExportAll RuleConfiguration | null

Avoid re-export all.

recommended boolean | null

It enables the recommended rules for this group

PlainIndentStyle string | string
QuoteProperties string
QuoteStyle string
Regex string
RestrictedGlobalsConfiguration RulePlainConfiguration | RuleWithRestrictedGlobalsOptions
RestrictedGlobalsOptions object

Options for the rule noRestrictedGlobals.

deniedGlobals string[] required

A list of names that should trigger the rule

RestrictedImportsConfiguration RulePlainConfiguration | RuleWithRestrictedImportsOptions
RestrictedImportsOptions object

Options for the rule noRestrictedImports.

paths Record<string, string> required

A list of names that should trigger the rule

RestrictedModifier string
RuleConfiguration RulePlainConfiguration | RuleWithNoOptions
RuleFixConfiguration RulePlainConfiguration | RuleWithFixNoOptions
RulePlainConfiguration string
RuleWithComplexityOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
options

Rule's options

All of: ComplexityOptions object
RuleWithConsistentArrayTypeOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
fix FixKind | null

The kind of the code actions emitted by the rule

options

Rule's options

RuleWithDeprecatedHooksOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
options

Rule's options

All of: DeprecatedHooksOptions object
RuleWithFilenamingConventionOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
options

Rule's options

RuleWithFixNoOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
fix FixKind | null

The kind of the code actions emitted by the rule

RuleWithHooksOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
options

Rule's options

All of: HooksOptions object
RuleWithNamingConventionOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
fix FixKind | null

The kind of the code actions emitted by the rule

options

Rule's options

All of: NamingConventionOptions object
RuleWithNoLabelWithoutControlOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
options

Rule's options

RuleWithNoOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
RuleWithRestrictedGlobalsOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
options

Rule's options

All of: RestrictedGlobalsOptions object
RuleWithRestrictedImportsOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
options

Rule's options

All of: RestrictedImportsOptions object
RuleWithUtilityClassSortingOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
fix FixKind | null

The kind of the code actions emitted by the rule

options

Rule's options

RuleWithValidAriaRoleOptions object
level required

The severity of the emitted diagnostics by the rule

All of: RulePlainConfiguration string
fix FixKind | null

The kind of the code actions emitted by the rule

options

Rule's options

All of: ValidAriaRoleOptions object
Rules object
a11y A11y | null
all boolean | null

It enables ALL rules. The rules that belong to nursery won't be enabled.

complexity Complexity | null
correctness Correctness | null
nursery Nursery | null
performance Performance | null
recommended boolean | null

It enables the lint rules recommended by Biome. true by default.

security Security | null
style Style | null
suspicious Suspicious | null
Scope string
Security object

A list of rules that belong to this group

all boolean | null

It enables ALL rules for this group.

noDangerouslySetInnerHtml RuleConfiguration | null

Prevent the usage of dangerous JSX props

noDangerouslySetInnerHtmlWithChildren RuleConfiguration | null

Report when a DOM element or a component uses both children and dangerouslySetInnerHTML prop.

noGlobalEval RuleConfiguration | null

Disallow the use of global eval().

recommended boolean | null

It enables the recommended rules for this group

Selector object
kind

Declaration kind

All of: Kind string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string
modifiers

Modifiers used on the declaration

All of: Modifiers RestrictedModifier[]
scope

Scope of the declaration

All of: Scope string
Semicolons string
StableHookResult boolean | integer[]
StringSet string[]
Style object

A list of rules that belong to this group

all boolean | null

It enables ALL rules for this group.

noArguments RuleConfiguration | null

Disallow the use of arguments.

noCommaOperator RuleConfiguration | null

Disallow comma operator.

noDefaultExport RuleConfiguration | null

Disallow default exports.

noImplicitBoolean RuleFixConfiguration | null

Disallow implicit true values on JSX boolean attributes

noInferrableTypes RuleFixConfiguration | null

Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.

noNamespace RuleConfiguration | null

Disallow the use of TypeScript's namespaces.

noNamespaceImport RuleConfiguration | null

Disallow the use of namespace imports.

noNegationElse RuleFixConfiguration | null

Disallow negation in the condition of an if statement if it has an else clause.

noNonNullAssertion RuleFixConfiguration | null

Disallow non-null assertions using the ! postfix operator.

noParameterAssign RuleConfiguration | null

Disallow reassigning function parameters.

noParameterProperties RuleConfiguration | null

Disallow the use of parameter properties in class constructors.

noRestrictedGlobals RestrictedGlobalsConfiguration | null

This rule allows you to specify global variable names that you don’t want to use in your application.

noShoutyConstants RuleFixConfiguration | null

Disallow the use of constants which its value is the upper-case version of its name.

noUnusedTemplateLiteral RuleFixConfiguration | null

Disallow template literals if interpolation and special-character handling are not needed

noUselessElse RuleFixConfiguration | null

Disallow else block when the if block breaks early.

noVar RuleFixConfiguration | null

Disallow the use of var

recommended boolean | null

It enables the recommended rules for this group

useAsConstAssertion RuleFixConfiguration | null

Enforce the use of as const over literal type and type annotation.

useBlockStatements RuleFixConfiguration | null

Requires following curly brace conventions.

useCollapsedElseIf RuleFixConfiguration | null

Enforce using else if instead of nested if in else clauses.

useConsistentArrayType ConsistentArrayTypeConfiguration | null

Require consistently using either T[] or Array<T>

useConst RuleFixConfiguration | null

Require const declarations for variables that are only assigned once.

useDefaultParameterLast RuleFixConfiguration | null

Enforce default function parameters and optional function parameters to be last.

useEnumInitializers RuleFixConfiguration | null

Require that each enum member value be explicitly initialized.

useExponentiationOperator RuleFixConfiguration | null

Disallow the use of Math.pow in favor of the ** operator.

useExportType RuleFixConfiguration | null

Promotes the use of export type for types.

useFilenamingConvention FilenamingConventionConfiguration | null

Enforce naming conventions for JavaScript and TypeScript filenames.

useForOf RuleConfiguration | null

This rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array.

useFragmentSyntax RuleFixConfiguration | null

This rule enforces the use of <>...</> over <Fragment>...</Fragment>.

useImportType RuleFixConfiguration | null

Promotes the use of import type for types.

useLiteralEnumMembers RuleConfiguration | null

Require all enum members to be literal values.

useNamingConvention NamingConventionConfiguration | null

Enforce naming conventions for everything across a codebase.

useNodeAssertStrict RuleFixConfiguration | null

Promotes the usage of node:assert/strict over node:assert.

useNodejsImportProtocol RuleFixConfiguration | null

Enforces using the node: protocol for Node.js builtin modules.

useNumberNamespace RuleFixConfiguration | null

Use the Number properties instead of global ones.

useNumericLiterals RuleFixConfiguration | null

Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals

useSelfClosingElements RuleFixConfiguration | null

Prevent extra closing tags for components without children

useShorthandArrayType RuleFixConfiguration | null

When expressing array types, this rule promotes the usage of T[] shorthand instead of Array<T>.

useShorthandAssign RuleFixConfiguration | null

Require assignment operator shorthand where possible.

useShorthandFunctionType RuleFixConfiguration | null

Enforce using function types instead of object type with call signatures.

useSingleCaseStatement RuleFixConfiguration | null

Enforces switch clauses have a single statement, emits a quick fix wrapping the statements in a block.

useSingleVarDeclarator RuleFixConfiguration | null

Disallow multiple variable declarations in the same variable statement

useTemplate RuleFixConfiguration | null

Prefer template literals over string concatenation.

useWhile RuleFixConfiguration | null

Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed.

Suspicious object

A list of rules that belong to this group

all boolean | null

It enables ALL rules for this group.

noApproximativeNumericConstant RuleFixConfiguration | null

Use standard constants instead of approximated literals.

noArrayIndexKey RuleConfiguration | null

Discourage the usage of Array index in keys.

noAssignInExpressions RuleConfiguration | null

Disallow assignments in expressions.

noAsyncPromiseExecutor RuleConfiguration | null

Disallows using an async function as a Promise executor.

noCatchAssign RuleConfiguration | null

Disallow reassigning exceptions in catch clauses.

noClassAssign RuleConfiguration | null

Disallow reassigning class members.

noCommentText RuleFixConfiguration | null

Prevent comments from being inserted as text nodes

noCompareNegZero RuleFixConfiguration | null

Disallow comparing against -0

noConfusingLabels RuleConfiguration | null

Disallow labeled statements that are not loops.

noConfusingVoidType RuleFixConfiguration | null

Disallow void type outside of generic or return types.

noConsoleLog RuleFixConfiguration | null

Disallow the use of console.log

noConstEnum RuleFixConfiguration | null

Disallow TypeScript const enum

noControlCharactersInRegex RuleConfiguration | null

Prevents from having control characters and some escape sequences that match control characters in regular expressions.

noDebugger RuleFixConfiguration | null

Disallow the use of debugger

noDoubleEquals RuleFixConfiguration | null

Require the use of === and !==

noDuplicateCase RuleConfiguration | null

Disallow duplicate case labels.

noDuplicateClassMembers RuleConfiguration | null

Disallow duplicate class members.

noDuplicateJsxProps RuleConfiguration | null

Prevents JSX properties to be assigned multiple times.

noDuplicateObjectKeys RuleFixConfiguration | null

Prevents object literals having more than one property declaration for the same name.

noDuplicateParameters RuleConfiguration | null

Disallow duplicate function parameter name.

noDuplicateTestHooks RuleConfiguration | null

A describe block should not contain duplicate hooks.

noEmptyBlockStatements RuleConfiguration | null

Disallow empty block statements and static blocks.

noEmptyInterface RuleFixConfiguration | null

Disallow the declaration of empty interfaces.

noExplicitAny RuleConfiguration | null

Disallow the any type usage.

noExportsInTest RuleConfiguration | null

Disallow using export or module.exports in files containing tests

noExtraNonNullAssertion RuleFixConfiguration | null

Prevents the wrong usage of the non-null assertion operator (!) in TypeScript files.

noFallthroughSwitchClause RuleConfiguration | null

Disallow fallthrough of switch clauses.

noFocusedTests RuleFixConfiguration | null

Disallow focused tests.

noFunctionAssign RuleConfiguration | null

Disallow reassigning function declarations.

noGlobalAssign RuleConfiguration | null

Disallow assignments to native objects and read-only global variables.

noGlobalIsFinite RuleFixConfiguration | null

Use Number.isFinite instead of global isFinite.

noGlobalIsNan RuleFixConfiguration | null

Use Number.isNaN instead of global isNaN.

noImplicitAnyLet RuleConfiguration | null

Disallow use of implicit any type on variable declarations.

noImportAssign RuleConfiguration | null

Disallow assigning to imported bindings

noLabelVar RuleConfiguration | null

Disallow labels that share a name with a variable

noMisleadingCharacterClass RuleFixConfiguration | null

Disallow characters made with multiple code points in character class syntax.

noMisleadingInstantiator RuleConfiguration | null

Enforce proper usage of new and constructor.

noMisrefactoredShorthandAssign RuleFixConfiguration | null

Disallow shorthand assign when variable appears on both sides.

noPrototypeBuiltins RuleConfiguration | null

Disallow direct use of Object.prototype builtins.

noRedeclare RuleConfiguration | null

Disallow variable, function, class, and type redeclarations in the same scope.

noRedundantUseStrict RuleFixConfiguration | null

Prevents from having redundant "use strict".

noSelfCompare RuleConfiguration | null

Disallow comparisons where both sides are exactly the same.

noShadowRestrictedNames RuleConfiguration | null

Disallow identifiers from shadowing restricted names.

noSkippedTests RuleFixConfiguration | null

Disallow disabled tests.

noSparseArray RuleFixConfiguration | null

Disallow sparse arrays

noSuspiciousSemicolonInJsx RuleConfiguration | null

It detects possible "wrong" semicolons inside JSX elements.

noThenProperty RuleConfiguration | null

Disallow then property.

noUnsafeDeclarationMerging RuleConfiguration | null

Disallow unsafe declaration merging between interfaces and classes.

noUnsafeNegation RuleFixConfiguration | null

Disallow using unsafe negation.

recommended boolean | null

It enables the recommended rules for this group

useAwait RuleConfiguration | null

Ensure async functions utilize await.

useDefaultSwitchClauseLast RuleConfiguration | null

Enforce default clauses in switch statements to be last

useGetterReturn RuleConfiguration | null

Enforce get methods to always return a value.

useIsArray RuleFixConfiguration | null

Use Array.isArray() instead of instanceof Array.

useNamespaceKeyword RuleFixConfiguration | null

Require using the namespace keyword over the module keyword to declare TypeScript namespaces.

useValidTypeof RuleFixConfiguration | null

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

TrailingCommas string | string | string

Print trailing commas wherever possible in multi-line comma-separated syntactic structures.

TrailingCommas2 string | string
UtilityClassSortingConfiguration RulePlainConfiguration | RuleWithUtilityClassSortingOptions
UtilityClassSortingOptions object
attributes array | null

Additional attributes that will be sorted.

functions array | null

Names of the functions or tagged templates that will be sorted.

ValidAriaRoleConfiguration RulePlainConfiguration | RuleWithValidAriaRoleOptions
ValidAriaRoleOptions object
allowInvalidRoles string[] required
ignoreNonDom boolean required
VcsClientKind string
VcsConfiguration object

Set of properties to integrate Biome with a VCS software.

clientKind VcsClientKind | null

The kind of client.

defaultBranch string | null

The main branch of the project

enabled boolean | null

Whether Biome should integrate itself with the VCS client

root string | null

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

useIgnoreFile boolean | null

Whether Biome should use the VCS ignore file. When [true], Biome will ignore the files specified in the ignore file.