Core

Ultracite's base configuration with framework-agnostic linting rules.

The core Ultracite configuration provides a comprehensive set of framework-agnostic linting rules and formatting settings. This is the foundation that all other framework-specific configurations extend.

Installation

The core configuration is automatically included when you run:

npx ultracite init

Or add it manually to your biome.jsonc:

biome.jsonc
{
  "extends": ["ultracite/core"]
}

Overview

The core configuration includes hundreds of strict linting rules covering:

  • Accessibility (a11y): Enforce ARIA attributes, semantic HTML, and keyboard navigation
  • Complexity: Reduce cognitive complexity and enforce best practices
  • Correctness: Prevent common errors and enforce type safety
  • Performance: Optimize code for better runtime performance
  • Security: Prevent security vulnerabilities
  • Style: Enforce consistent code style
  • Suspicious: Catch suspicious patterns that might indicate bugs

Formatter Settings

  • Indentation: 2 spaces
  • Line Width: 80 characters
  • Line Ending: LF (Unix-style)
  • Semicolons: Always required
  • Quotes: Single quotes for JavaScript/TypeScript, double quotes for JSON
  • Trailing Commas: ES5 style (multi-line arrays/objects)
  • Arrow Parentheses: Always include parentheses

Key Features

TypeScript Strictness

The core configuration enables TypeScript's strict checks:

  • Discourages use of any (noExplicitAny: error)
  • Requires handling of null/undefined
  • Prefers explicit types in certain situations
  • Enforces type safety across the codebase

Common best-practice rules are included:

  • No unused variables (noUnusedVariables: error)
  • No unused imports (noUnusedImports: error)
  • No explicit eval (noGlobalEval: error)
  • No prototype pollution (noPrototypeBuiltins: error)

Accessibility by Default

Rules equivalent to accessibility standards:

  • ARIA attributes must be valid
  • Semantic HTML elements preferred
  • Keyboard navigation support required
  • Alt text for images required

Node.js Support

Environment-specific handling:

  • Recognizes Node.js globals (module, process)
  • Enforces node: protocol for built-in modules
  • Supports both CommonJS and ESM

Complete Rule Reference

Accessibility (a11y)

RuleSettingDescription
noAccessKeyerrorEnforce that the accessKey attribute is not used on any HTML element.
noAriaHiddenOnFocusableerrorEnforce that aria-hidden="true" is not set on focusable elements.
noAriaUnsupportedElementserrorEnforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
noAutofocusoffEnforce that autoFocus prop is not used on elements.
noDistractingElementserrorEnforces that no distracting elements are used.
noHeaderScopeerrorThe scope prop should be used only on <th> elements.
noInteractiveElementToNoninteractiveRoleerrorEnforce that non-interactive ARIA roles are not assigned to interactive HTML elements.
noLabelWithoutControlerrorEnforce that a label element or component has a text label and an associated input.
noNoninteractiveElementInteractionserrorDisallow use event handlers on non-interactive elements.
noNoninteractiveElementToInteractiveRoleerrorEnforce that interactive ARIA roles are not assigned to non-interactive HTML elements.
noNoninteractiveTabindexerrorEnforce that tabIndex is not assigned to non-interactive HTML elements.
noPositiveTabindexerrorPrevent the usage of positive integers on tabIndex property.
noRedundantAlterrorEnforce img alt prop does not contain the word image, picture, or photo.
noRedundantRoleserrorEnforce explicit role property is not the same as implicit/default role property on an element.
noStaticElementInteractionserrorEnforce that static, visible elements (such as <div>) that have click handlers use the valid role attribute.
noSvgWithoutTitleerrorEnforces the usage of the title element for the svg element.
useAltTexterrorEnforce that all elements that require alternative text have meaningful information to relay back to the end user.
useAnchorContenterrorEnforce that anchors have content and that the content is accessible to screen readers.
useAriaActivedescendantWithTabindexerrorEnforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant.
useAriaPropsForRoleerrorEnforce that elements with ARIA roles must have all required ARIA attributes for that role.
useAriaPropsSupportedByRoleerrorEnforce that ARIA properties are valid for the roles that are supported by the element.
useButtonTypeerrorEnforces the usage of the attribute type for the element button.
useFocusableInteractiveerrorElements with an interactive role and interaction handlers must be focusable.
useHeadingContenterrorEnforce that heading elements (h1, h2, etc.) have content and that the content is accessible to screen readers.
useHtmlLangerrorEnforce that html element has lang attribute.
useIframeTitleerrorEnforces the usage of the attribute title for the element iframe.
useKeyWithClickEventserrorEnforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress.
useKeyWithMouseEventserrorEnforce onMouseOver / onMouseOut are accompanied by onFocus / onBlur.
useMediaCaptionerrorEnforces that audio and video elements must have a track for captions.
useSemanticElementserrorIt detects the use of role attributes in JSX elements and suggests using semantic elements instead.
useValidAnchorerrorEnforce that all anchors are valid, and they are navigable elements.
useValidAriaPropserrorEnsures that ARIA properties aria-* are all valid.
useValidAriaRoleerrorElements with ARIA roles must use a valid, non-abstract ARIA role.
useValidAriaValueserrorEnforce that ARIA state and property values are valid.
useValidAutocompleteerrorUse valid values for the autocomplete attribute on input elements.
useValidLangerrorEnsure that the attribute passed to the lang attribute is a correct ISO language and/or country.
useGenericFontNameserrorDisallow a missing generic family keyword within font families (CSS).

Complexity

RuleSettingDescription
noAdjacentSpacesInRegexerrorDisallow unclear usage of consecutive space characters in regular expression literals.
noArgumentserrorDisallow the use of arguments.
noBannedTypeserrorDisallow primitive type aliases and misleading types.
noCommaOperatorerrorDisallow comma operator.
noEmptyTypeParameterserrorDisallow empty type parameters in type aliases and interfaces.
noExcessiveCognitiveComplexityerrorDisallow functions that exceed a given Cognitive Complexity score.
noExcessiveLinesPerFunctionoffRestrict the number of lines of code in a function.
noExcessiveNestedTestSuiteserrorThis rule enforces a maximum depth to nested describe() in test files.
noExtraBooleanCasterrorDisallow unnecessary boolean casts.
noFlatMapIdentityerrorDisallow to use unnecessary callback on flatMap.
noForEacherrorPrefer for...of statement instead of Array.forEach.
noImplicitCoercionsoffDisallow shorthand type conversions.
noImportantStylesoffDisallow the use of the !important style (CSS).
noStaticOnlyClasserrorThis rule reports when a class has no non-static members.
noThisInStaticerrorDisallow this and super in static contexts.
noUselessCatcherrorDisallow unnecessary catch clauses.
noUselessConstructorerrorDisallow unnecessary constructors.
noUselessContinueerrorAvoid using unnecessary continue.
noUselessEmptyExporterrorDisallow empty exports that don't change anything in a module file.
noUselessEscapeInRegexerrorDisallow unnecessary escape sequence in regular expression literals.
noUselessFragmentserrorDisallow unnecessary fragments.
noUselessLabelerrorDisallow unnecessary labels.
noUselessLoneBlockStatementserrorDisallow unnecessary nested block statements.
noUselessRenameerrorDisallow renaming import, export, and destructured assignments to the same name.
noUselessStringConcaterrorDisallow unnecessary concatenation of string or template literals.
noUselessStringRawerrorDisallow unnecessary String.raw function in template string literals without any escape sequence.
noUselessSwitchCaseerrorDisallow useless case in switch statements.
noUselessTernaryerrorDisallow ternary operators when simpler alternatives exist.
noUselessThisAliaserrorDisallow useless this aliasing.
noUselessTypeConstrainterrorDisallow using any or unknown as type constraint.
noUselessUndefinedInitializationerrorDisallow initializing variables to undefined.
noVoiderrorDisallow the use of void operators, which is not a familiar operator.
useArrowFunctionerrorUse arrow functions over function expressions.
useDateNowerrorUse Date.now() to get the number of milliseconds since the Unix Epoch.
useFlatMaperrorPromotes the use of .flatMap() when map().flat() are used together.
useIndexOferrorPrefer Array#{indexOf,lastIndexOf}() over Array#{findIndex,findLastIndex}() when looking for the index of an item.
useLiteralKeyserrorEnforce the usage of a literal access to properties over computed property access.
useNumericLiteralserrorDisallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals.
useOptionalChainerrorEnforce using concise optional chain instead of chained logical expressions.
useRegexLiteralserrorEnforce the use of the regular expression literals instead of the RegExp constructor if possible.
useSimpleNumberKeyserrorDisallow number literal object member names which are not base 10 or use underscore as separator.
useSimplifiedLogicExpressionerrorDiscard redundant terms from logical expressions.
useWhileerrorEnforce the use of while loops instead of for loops when the initializer and update expressions are not needed.

Correctness

RuleSettingDescription
noConstAssignerrorPrevents from having const variables being re-assigned.
noConstantConditionerrorDisallow constant expressions in conditions.
noConstantMathMinMaxClamperrorDisallow the use of Math.min and Math.max to clamp a value where the result itself is constant.
noConstructorReturnerrorDisallow returning a value from a constructor.
noEmptyCharacterClassInRegexerrorDisallow empty character classes in regular expression literals.
noEmptyPatternerrorDisallows empty destructuring patterns.
noGlobalDirnameFilenameerrorDisallow the use of __dirname and __filename in the global scope.
noGlobalObjectCallserrorDisallow calling global object properties as functions.
noInnerDeclarationserrorDisallow function and var declarations that are accessible outside their block.
noInvalidBuiltinInstantiationerrorEnsure that builtins are correctly instantiated.
noInvalidConstructorSupererrorPrevents the incorrect use of super() inside classes.
noInvalidDirectionInLinearGradienterrorDisallow non-standard direction values for linear gradient functions (CSS).
noInvalidGridAreaserrorDisallows invalid named grid areas in CSS Grid Layouts (CSS).
noInvalidPositionAtImportRuleerrorDisallow the use of @import at-rules in invalid positions (CSS).
noInvalidUseBeforeDeclarationerrorDisallow the use of variables and function parameters before their declaration.
noMissingVarFunctionerrorDisallow missing var function for css variables (CSS).
noNodejsModulesoffForbid the use of Node.js builtin modules.
noNonoctalDecimalEscapeerrorDisallow \8 and \9 escape sequences in string literals.
noPrecisionLosserrorDisallow literal numbers that lose precision.
noPrivateImportsoffRestrict imports of private exports.
noProcessGlobaloffDisallow the use of process global.
noRestrictedElementserrorDisallow the use of configured elements.
noSelfAssignerrorDisallow assignments where both sides are exactly the same.
noSetterReturnerrorDisallow returning a value from a setter.
noStringCaseMismatcherrorDisallow comparison of expressions modifying the string case with non-compliant value.
noSwitchDeclarationserrorDisallow lexical declarations in switch clauses.
noUndeclaredDependenciesoffDisallow the use of dependencies that aren't specified in the package.json.
noUndeclaredVariableserrorPrevents the usage of variables that haven't been declared inside the document.
noUnknownFunctionerrorDisallow unknown CSS value functions (CSS).
noUnknownMediaFeatureNameerrorDisallow unknown media feature names (CSS).
noUnknownPropertyerrorDisallow unknown properties (CSS).
noUnknownPseudoClasserrorDisallow unknown pseudo-class selectors (CSS).
noUnknownPseudoElementerrorDisallow unknown pseudo-element selectors (CSS).
noUnknownTypeSelectorerrorDisallow unknown type selectors (CSS).
noUnknownUniterrorDisallow unknown CSS units (CSS).
noUnmatchableAnbSelectorerrorDisallow unmatchable An+B selectors (CSS).
noUnreachableerrorDisallow unreachable code.
noUnreachableSupererrorEnsures the super() constructor is called exactly once on every code path in a class constructor before this is accessed.
noUnsafeFinallyerrorDisallow control flow statements in finally blocks.
noUnsafeOptionalChainingerrorDisallow the use of optional chaining in contexts where the undefined value is not allowed.
noUnusedFunctionParameterserrorDisallow unused function parameters.
noUnusedImportserror (safe fix override)Disallow unused imports.
noUnusedLabelserrorDisallow unused labels.
noUnusedPrivateClassMemberserrorDisallow unused private class members.
noUnusedVariableserrorDisallow unused variables.
noVoidTypeReturnerrorDisallow returning a value from a function with the return type void.
useExhaustiveDependencieserrorEnforce all dependencies are correctly specified in a React hook.
useGraphqlNamedOperationserrorEnforce specifying the name of GraphQL operations.
useHookAtTopLevelerrorEnforce that all React hooks are being called from the Top Level component functions.
useImportExtensionsoffEnforce file extensions for relative imports.
useIsNanerrorRequire calls to isNaN() when checking for NaN.
useJsonImportAttributesoffEnforces the use of with { type: "json" } for JSON module imports.
useParseIntRadixerrorEnforce the consistent use of the radix argument when using parseInt().
useSingleJsDocAsteriskerrorEnforce JSDoc comment lines to start with a single asterisk, except for the first one.
useUniqueElementIdsoffPrevent the usage of static string literal id attribute on elements.
useValidForDirectionerrorEnforce for loop update clause moving the counter in the right direction.
useValidTypeoferrorThis rule checks that the result of a typeof expression is compared to a valid value.
useYielderrorRequire generator functions to contain yield.

Nursery

RuleSettingDescription
noDeprecatedImportsoffRestrict imports of deprecated exports.
noDuplicateDependencieserrorPrevent the listing of duplicate dependencies.
noFloatingPromisesoffRequire Promise-like statements to be handled appropriately.
noImportCyclesoffPrevent import cycles.
noJsxLiteralsoffDisallow string literals inside JSX elements.
noMisusedPromisesoffDisallow Promises to be used in places where they are almost certainly a mistake.
noNonNullAssertedOptionalChainerrorDisallow non-null assertions after optional chaining expressions.
noSecretsoffDisallow usage of sensitive data such as API keys and tokens.
noShadowerrorDisallow variable declarations from shadowing variables declared in the outer scope.
noUnnecessaryConditionsoffDisallow unnecessary type-based conditions that can be statically determined as redundant.
noUnresolvedImportsoffWarn when importing non-existing exports.
noUnusedExpressionserrorDisallow expression statements that are neither a function call nor an assignment.
noUselessCatchBindingoffDisallow unused catch bindings.
noUselessUndefinederrorDisallow the use of useless undefined.
useAnchorHreferrorEnforces href attribute for <a> elements.
useConsistentArrowReturnerrorEnforce consistent arrow function bodies.
useConsistentTypeDefinitionserror (type)Enforce type definitions to consistently use either interface or type.
useDeprecatedDateerrorRequire the @deprecated directive to specify a deletion date.
useExhaustiveSwitchCasesoffRequire switch-case statements to be exhaustive.
useExplicitTypeoffEnforce types in functions, methods, variables, and parameters.
useImageSizeerrorEnforces that <img> elements have both width and height attributes.
useMaxParamserrorEnforce a maximum number of parameters in function definitions.
useSortedClasseserror (safe fix override)Enforce the sorting of CSS utility classes.

Performance

RuleSettingDescription
noAccumulatingSpreaderrorDisallow the use of spread (...) syntax on accumulators.
noAwaitInLoopsoffDisallow await inside loops.
noBarrelFileerrorDisallow the use of barrel file.
noDeleteerrorDisallow the use of the delete operator.
noDynamicNamespaceImportAccesserrorDisallow accessing namespace imports dynamically.
noNamespaceImporterrorDisallow the use of namespace imports.
noReExportAlloffAvoid re-export all.
noUnwantedPolyfillioerrorPrevent duplicate polyfills from Polyfill.io.
useGoogleFontPreconnecterrorEnsure the preconnect attribute is used when using Google Fonts.
useTopLevelRegexerrorRequire regex literals to be declared at the top level.

Security

RuleSettingDescription
noBlankTargeterrorDisallow target="_blank" attribute without rel="noopener".
noDangerouslySetInnerHtmlerrorPrevent the usage of dangerous JSX props.
noDangerouslySetInnerHtmlWithChildrenerrorReport when a DOM element or a component uses both children and dangerouslySetInnerHTML prop.
noGlobalEvalerrorDisallow the use of global eval().

Style

RuleSettingDescription
noCommonJsoffDisallow use of Common JS module system in favor of ESM style imports.
noDefaultExportoffDisallow default exports.
noDoneCallbackerrorDisallow using a callback in asynchronous tests and hooks.
noEnumerrorDisallow TypeScript enum.
noExportedImportserrorDisallow exporting an imported variable.
noImplicitBooleanoffDisallow implicit true values on JSX boolean attributes.
noInferrableTypeserrorDisallow type annotations for variables, parameters, and class properties initialized with a literal expression.
noMagicNumberserrorReports usage of "magic numbers" — numbers used directly instead of being assigned to named constants.
noNamespaceerrorDisallow the use of TypeScript's namespaces.
noNegationElseerrorDisallow negation in the condition of an if statement if it has an else clause.
noNestedTernaryerrorDisallow nested ternary expressions.
noNonNullAssertionerrorDisallow non-null assertions using the ! postfix operator.
noParameterAssignerrorDisallow reassigning function parameters.
noParameterPropertieserrorDisallow the use of parameter properties in class constructors.
noProcessEnvoffDisallow the use of process.env.
noRestrictedGlobalserrorThis rule allows you to specify global variable names that you don't want to use in your application.
noRestrictedImportserrorDisallow specified modules when loaded by import or require.
noRestrictedTypeserrorDisallow user defined types.
noShoutyConstantserrorDisallow the use of constants which its value is the upper-case version of its name.
noSubstrerrorEnforce the use of String.slice() over String.substr() and String.substring().
noUnusedTemplateLiteralerrorDisallow template literals if interpolation and special-character handling are not needed.
noUselessElseerrorDisallow else block when the if block breaks early.
noYodaExpressionerrorDisallow the use of yoda expressions.
useArrayLiteralserrorDisallow Array constructors.
useAsConstAssertionerrorEnforce the use of as const over literal type and type annotation.
useAtIndexerrorUse at() instead of integer index access.
useBlockStatementserrorRequires following curly brace conventions.
useCollapsedElseIferrorEnforce using else if instead of nested if in else clauses.
useCollapsedIferrorEnforce using single if instead of nested if clauses.
useComponentExportOnlyModulesoffEnforce declaring components only within modules that export React Components exclusively.
useConsistentArrayTypeerrorRequire consistently using either T[] or Array<T>.
useConsistentBuiltinInstantiationerrorEnforce the use of new for all builtins, except String, Number and Boolean.
useConsistentCurlyBracesoffThis rule enforces consistent use of curly braces inside JSX attributes and JSX children.
useConsistentMemberAccessibilityerrorRequire consistent accessibility modifiers on class properties and methods.
useConsistentObjectDefinitionserrorRequire the consistent declaration of object literals.
useConsterrorRequire const declarations for variables that are only assigned once.
useDefaultParameterLasterrorEnforce default function parameters and optional function parameters to be last.
useDefaultSwitchClauseerrorRequire the default clause in switch statements.
useDeprecatedReasonerrorRequire specifying the reason argument when using @deprecated directive.
useEnumInitializerserrorRequire that each enum member value be explicitly initialized.
useExplicitLengthCheckoffEnforce explicitly comparing the length, size, byteLength or byteOffset property of a value.
useExponentiationOperatorerrorDisallow the use of Math.pow in favor of the ** operator.
useExportTypeerrorPromotes the use of export type for types.
useExportsLastoffRequire that all exports are declared after all non-export statements.
useFilenamingConventionerrorEnforce naming conventions for JavaScript and TypeScript filenames (kebab-case, ASCII).
useForOferrorThis rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array.
useFragmentSyntaxerrorThis rule enforces the use of <>...</> over <Fragment>...</Fragment>.
useGraphqlNamingConventionerrorValidates that all enum values are capitalized.
useGroupedAccessorPairserrorEnforce that getters and setters for the same property are adjacent in class and object definitions.
useImportTypeerrorPromotes the use of import type for types.
useLiteralEnumMemberserrorRequire all enum members to be literal values.
useNamingConventionoffNaming convention rule (disabled).
useNodeAssertStricterrorPromotes the usage of node:assert/strict over node:assert.
useNodejsImportProtocolerrorEnforces using the node: protocol for Node.js builtin modules.
useNumberNamespaceerrorUse the Number properties instead of global ones.
useNumericSeparatorserrorEnforce the use of numeric separators in numeric literals.
useObjectSpreaderrorPrefer object spread over Object.assign() when constructing new objects.
useReadonlyClassPropertieserrorEnforce marking members as readonly if they are never modified outside the constructor.
useSelfClosingElementserrorPrevent extra closing tags for components without children.
useShorthandAssignerrorRequire assignment operator shorthand where possible.
useShorthandFunctionTypeerrorEnforce using function types instead of object type with call signatures.
useSingleVarDeclaratoroffDisallow multiple variable declarations in the same variable statement.
useSymbolDescriptionerrorRequire a description parameter for the Symbol().
useTemplateerrorPrefer template literals over string concatenation.
useThrowNewErrorerrorRequire new when throwing an error.
useThrowOnlyErrorerrorDisallow throwing non-Error values.
useTrimStartEnderrorEnforce the use of String.trimStart() and String.trimEnd() over String.trimLeft() and String.trimRight().
useUnifiedTypeSignatureserrorDisallow overload signatures that can be unified into a single signature.
noDescendingSpecificityerrorDisallow a lower specificity selector from coming after a higher specificity selector (CSS).
noValueAtRuleerrorDisallow use of @value rule in css modules (CSS).

Suspicious

RuleSettingDescription
noAlerterrorDisallow the use of alert, confirm, and prompt.
noApproximativeNumericConstanterrorUse standard constants instead of approximated literals.
noAssignInExpressionserrorDisallow assignments in expressions.
noAsyncPromiseExecutorerrorDisallows using an async function as a Promise executor.
noBiomeFirstExceptionerrorPrevents the use of the ! pattern in the first position of files.includes in the configuration file.
noBitwiseOperatorserrorDisallow bitwise operators.
noCatchAssignerrorDisallow reassigning exceptions in catch clauses.
noClassAssignerrorDisallow reassigning class members.
noCommentTexterrorPrevent comments from being inserted as text nodes.
noCompareNegZeroerrorDisallow comparing against -0.
noConfusingLabelserrorDisallow labeled statements that are not loops.
noConfusingVoidTypeerrorDisallow void type outside of generic or return types.
noConsoleerrorDisallow the use of console.
noConstEnumerrorDisallow TypeScript const enum.
noConstantBinaryExpressionserrorDisallow expressions where the operation doesn't affect the value.
noControlCharactersInRegexerrorPrevents from having control characters and some escape sequences that match control characters in regular expression literals.
noDebuggererrorDisallow the use of debugger.
noDocumentCookieerrorDisallow direct assignments to document.cookie.
noDoubleEqualserrorRequire the use of === and !==.
noDuplicateAtImportRuleserrorDisallow duplicate @import rules (CSS).
noDuplicateCaseerrorDisallow duplicate case labels.
noDuplicateClassMemberserrorDisallow duplicate class members.
noDuplicateCustomPropertieserrorDisallow duplicate custom properties within declaration blocks (CSS).
noDuplicateElseIferrorDisallow duplicate conditions in if-else-if chains.
noDuplicateFieldserrorDisallow duplicated fields in GraphQL operations.
noDuplicateFontNameserrorDisallow duplicate names within font families (CSS).
noDuplicateObjectKeyserrorDisallow two keys with the same name inside objects.
noDuplicateParameterserrorDisallow duplicate function parameter name.
noDuplicatePropertieserrorDisallow duplicate properties within declaration blocks (CSS).
noDuplicateSelectorsKeyframeBlockerrorDisallow duplicate selectors within keyframe blocks (CSS).
noDuplicateTestHookserrorA describe block should not contain duplicate hooks.
noEmptyBlockerrorDisallow CSS empty blocks (CSS).
noEmptyBlockStatementserrorDisallow empty block statements and static blocks.
noEmptyInterfaceerrorDisallow the declaration of empty interfaces.
noEvolvingTypeserrorDisallow variables from evolving into any type through reassignments.
noExplicitAnyerrorDisallow the any type usage.
noExportsInTesterrorDisallow using export or module.exports in files containing tests.
noExtraNonNullAssertionerrorPrevents the wrong usage of the non-null assertion operator ! in TypeScript files.
noFallthroughSwitchClauseerrorDisallow fallthrough of switch clauses.
noFocusedTestserrorDisallow focused tests.
noFunctionAssignerrorDisallow reassigning function declarations.
noGlobalAssignerrorDisallow assignments to native objects and read-only global variables.
noGlobalIsFiniteerrorUse Number.isFinite instead of global isFinite.
noGlobalIsNanerrorUse Number.isNaN instead of global isNaN.
noImplicitAnyLeterrorDisallow use of implicit any type on variable declarations.
noImportAssignerrorDisallow assigning to imported bindings.
noImportantInKeyframeerrorDisallow invalid !important within keyframe declarations (CSS).
noIrregularWhitespaceerrorDisallows the use of irregular whitespace characters.
noLabelVarerrorDisallow labels that share a name with a variable.
noMisleadingCharacterClasserrorDisallow characters made with multiple code points in character class syntax.
noMisleadingInstantiatorerrorEnforce proper usage of new and constructor.
noMisplacedAssertionerrorChecks that the assertion function, for example expect, is placed inside an it() function call.
noMisrefactoredShorthandAssignerrorDisallow shorthand assign when variable appears on both sides.
noOctalEscapeerrorDisallow octal escape sequences in string literals.
noPrototypeBuiltinserrorDisallow direct use of Object.prototype builtins.
noQuickfixBiomeerrorDisallow the use if quickfix.biome inside editor settings file.
noRedeclareerrorDisallow variable, function, class, and type redeclarations in the same scope.
noRedundantUseStricterrorPrevents from having redundant use strict.
noSelfCompareerrorDisallow comparisons where both sides are exactly the same.
noShadowRestrictedNameserrorDisallow identifiers from shadowing restricted names.
noShorthandPropertyOverrideserrorDisallow shorthand properties that override related longhand properties (CSS).
noSkippedTestserrorDisallow disabled tests.
noSparseArrayerrorPrevents the use of sparse arrays (arrays with holes).
noTemplateCurlyInStringerrorDisallow template literal placeholder syntax in regular strings.
noThenPropertyerrorDisallow then property.
noTsIgnoreerrorPrevents the use of the TypeScript directive @ts-ignore.
noUnassignedVariableserrorDisallow let or var variables that are read but never assigned.
noUnknownAtRuleserrorDisallow unknown at-rules (CSS).
noUnsafeDeclarationMergingerrorDisallow unsafe declaration merging between interfaces and classes.
noUnsafeNegationerrorDisallow using unsafe negation (!).
noUselessEscapeInStringerrorDisallow unnecessary escapes in string literals.
noUselessRegexBackrefserrorDisallow useless backreferences in regular expression literals that always match an empty string.
noVarerrorDisallow the use of var.
noWitherrorDisallow with statements in non-strict contexts.
useAdjacentOverloadSignatureserrorDisallow the use of overload signatures that are not next to each other.
useAwaiterrorEnsure async functions utilize await.
useBiomeIgnoreFoldererrorPromotes the correct usage for ignoring folders in the configuration file.
useDefaultSwitchClauseLasterrorEnforce default clauses in switch statements to be last.
useErrorMessageerrorEnforce passing a message value when creating a built-in error.
useGetterReturnerrorEnforce get methods to always return a value.
useGoogleFontDisplayerrorEnforces the use of a recommended display strategy with Google Fonts.
useGuardForInerrorRequire for-in loops to include an if statement.
useIsArrayerrorUse Array.isArray() instead of instanceof Array.
useIterableCallbackReturnerrorEnforce consistent return values in iterable callbacks.
useNamespaceKeyworderrorRequire using the namespace keyword over the module keyword to declare TypeScript namespaces.
useNumberToFixedDigitsArgumenterrorEnforce using the digits argument with Number#toFixed().
useStaticResponseMethodserrorUse static Response methods instead of new Response() constructor when possible.
useStrictModeerrorEnforce the use of the directive use strict in script files.

Notes

Certain rules are disabled because they are too slow to run with the Scanner. As noted in the Biome docs, project rules enabled are known to cause performance overhead in return for more advanced analysis.

In our testing, we have found these rules can make the difference between a 300ms and a 13s lint.

How is this guide?