UNPKG

@biomejs/biome

Version:

Biome is a toolchain for the web: formatter, linter and more

1,249 lines 496 kB
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Configuration", "description": "The configuration that is contained inside the file `biome.json`", "type": "object", "properties": { "$schema": { "description": "A field for the [JSON schema](https://json-schema.org/) specification", "anyOf": [{ "$ref": "#/$defs/Schema" }, { "type": "null" }] }, "assist": { "description": "Specific configuration for assists", "anyOf": [{ "$ref": "#/$defs/AssistConfiguration" }, { "type": "null" }] }, "css": { "description": "Specific configuration for the Css language", "anyOf": [{ "$ref": "#/$defs/CssConfiguration" }, { "type": "null" }] }, "extends": { "description": "A list of paths to other JSON files, used to extends the current configuration.", "anyOf": [{ "$ref": "#/$defs/Extends" }, { "type": "null" }] }, "files": { "description": "The configuration of the filesystem", "anyOf": [{ "$ref": "#/$defs/FilesConfiguration" }, { "type": "null" }] }, "formatter": { "description": "The configuration of the formatter", "anyOf": [ { "$ref": "#/$defs/FormatterConfiguration" }, { "type": "null" } ] }, "graphql": { "description": "Specific configuration for the GraphQL language", "anyOf": [{ "$ref": "#/$defs/GraphqlConfiguration" }, { "type": "null" }] }, "grit": { "description": "Specific configuration for the GraphQL language", "anyOf": [{ "$ref": "#/$defs/GritConfiguration" }, { "type": "null" }] }, "html": { "description": "Specific configuration for the HTML language", "anyOf": [{ "$ref": "#/$defs/HtmlConfiguration" }, { "type": "null" }] }, "javascript": { "description": "Specific configuration for the JavaScript language", "anyOf": [{ "$ref": "#/$defs/JsConfiguration" }, { "type": "null" }] }, "json": { "description": "Specific configuration for the Json language", "anyOf": [{ "$ref": "#/$defs/JsonConfiguration" }, { "type": "null" }] }, "linter": { "description": "The configuration for the linter", "anyOf": [{ "$ref": "#/$defs/LinterConfiguration" }, { "type": "null" }] }, "overrides": { "description": "A list of granular patterns that should be applied only to a sub set of files", "anyOf": [{ "$ref": "#/$defs/Overrides" }, { "type": "null" }] }, "plugins": { "description": "List of plugins to load.", "anyOf": [{ "$ref": "#/$defs/Plugins" }, { "type": "null" }] }, "root": { "description": "Indicates whether this configuration file is at the root of a Biome\nproject. By default, this is `true`.", "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] }, "vcs": { "description": "The configuration of the VCS integration", "anyOf": [{ "$ref": "#/$defs/VcsConfiguration" }, { "type": "null" }] } }, "additionalProperties": false, "$defs": { "A11y": { "description": "A list of rules that belong to this group", "type": "object", "properties": { "noAccessKey": { "description": "Enforce that the accesskey attribute is not used on any HTML element.\nSee https://biomejs.dev/linter/rules/no-access-key", "anyOf": [ { "$ref": "#/$defs/NoAccessKeyConfiguration" }, { "type": "null" } ] }, "noAriaHiddenOnFocusable": { "description": "Enforce that aria-hidden=\"true\" is not set on focusable elements.\nSee https://biomejs.dev/linter/rules/no-aria-hidden-on-focusable", "anyOf": [ { "$ref": "#/$defs/NoAriaHiddenOnFocusableConfiguration" }, { "type": "null" } ] }, "noAriaUnsupportedElements": { "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.\nSee https://biomejs.dev/linter/rules/no-aria-unsupported-elements", "anyOf": [ { "$ref": "#/$defs/NoAriaUnsupportedElementsConfiguration" }, { "type": "null" } ] }, "noAutofocus": { "description": "Enforce that the autofocus attribute is not used on elements.\nSee https://biomejs.dev/linter/rules/no-autofocus", "anyOf": [ { "$ref": "#/$defs/NoAutofocusConfiguration" }, { "type": "null" } ] }, "noDistractingElements": { "description": "Enforces that no distracting elements are used.\nSee https://biomejs.dev/linter/rules/no-distracting-elements", "anyOf": [ { "$ref": "#/$defs/NoDistractingElementsConfiguration" }, { "type": "null" } ] }, "noHeaderScope": { "description": "The scope prop should be used only on \\<th> elements.\nSee https://biomejs.dev/linter/rules/no-header-scope", "anyOf": [ { "$ref": "#/$defs/NoHeaderScopeConfiguration" }, { "type": "null" } ] }, "noInteractiveElementToNoninteractiveRole": { "description": "Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements.\nSee https://biomejs.dev/linter/rules/no-interactive-element-to-noninteractive-role", "anyOf": [ { "$ref": "#/$defs/NoInteractiveElementToNoninteractiveRoleConfiguration" }, { "type": "null" } ] }, "noLabelWithoutControl": { "description": "Enforce that a label element or component has a text label and an associated input.\nSee https://biomejs.dev/linter/rules/no-label-without-control", "anyOf": [ { "$ref": "#/$defs/NoLabelWithoutControlConfiguration" }, { "type": "null" } ] }, "noNoninteractiveElementInteractions": { "description": "Disallow use event handlers on non-interactive elements.\nSee https://biomejs.dev/linter/rules/no-noninteractive-element-interactions", "anyOf": [ { "$ref": "#/$defs/NoNoninteractiveElementInteractionsConfiguration" }, { "type": "null" } ] }, "noNoninteractiveElementToInteractiveRole": { "description": "Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.\nSee https://biomejs.dev/linter/rules/no-noninteractive-element-to-interactive-role", "anyOf": [ { "$ref": "#/$defs/NoNoninteractiveElementToInteractiveRoleConfiguration" }, { "type": "null" } ] }, "noNoninteractiveTabindex": { "description": "Enforce that tabIndex is not assigned to non-interactive HTML elements.\nSee https://biomejs.dev/linter/rules/no-noninteractive-tabindex", "anyOf": [ { "$ref": "#/$defs/NoNoninteractiveTabindexConfiguration" }, { "type": "null" } ] }, "noPositiveTabindex": { "description": "Prevent the usage of positive integers on tabindex attribute.\nSee https://biomejs.dev/linter/rules/no-positive-tabindex", "anyOf": [ { "$ref": "#/$defs/NoPositiveTabindexConfiguration" }, { "type": "null" } ] }, "noRedundantAlt": { "description": "Enforce img alt prop does not contain the word \"image\", \"picture\", or \"photo\".\nSee https://biomejs.dev/linter/rules/no-redundant-alt", "anyOf": [ { "$ref": "#/$defs/NoRedundantAltConfiguration" }, { "type": "null" } ] }, "noRedundantRoles": { "description": "Enforce explicit role property is not the same as implicit/default role property on an element.\nSee https://biomejs.dev/linter/rules/no-redundant-roles", "anyOf": [ { "$ref": "#/$defs/NoRedundantRolesConfiguration" }, { "type": "null" } ] }, "noStaticElementInteractions": { "description": "Enforce that static, visible elements (such as \\<div>) that have click handlers use the valid role attribute.\nSee https://biomejs.dev/linter/rules/no-static-element-interactions", "anyOf": [ { "$ref": "#/$defs/NoStaticElementInteractionsConfiguration" }, { "type": "null" } ] }, "noSvgWithoutTitle": { "description": "Enforces the usage of the title element for the svg element.\nSee https://biomejs.dev/linter/rules/no-svg-without-title", "anyOf": [ { "$ref": "#/$defs/NoSvgWithoutTitleConfiguration" }, { "type": "null" } ] }, "recommended": { "description": "Enables the recommended rules for this group", "type": ["boolean", "null"] }, "useAltText": { "description": "Enforce that all elements that require alternative text have meaningful information to relay back to the end user.\nSee https://biomejs.dev/linter/rules/use-alt-text", "anyOf": [ { "$ref": "#/$defs/UseAltTextConfiguration" }, { "type": "null" } ] }, "useAnchorContent": { "description": "Enforce that anchors have content and that the content is accessible to screen readers.\nSee https://biomejs.dev/linter/rules/use-anchor-content", "anyOf": [ { "$ref": "#/$defs/UseAnchorContentConfiguration" }, { "type": "null" } ] }, "useAriaActivedescendantWithTabindex": { "description": "Enforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant.\nSee https://biomejs.dev/linter/rules/use-aria-activedescendant-with-tabindex", "anyOf": [ { "$ref": "#/$defs/UseAriaActivedescendantWithTabindexConfiguration" }, { "type": "null" } ] }, "useAriaPropsForRole": { "description": "Enforce that elements with ARIA roles must have all required ARIA attributes for that role.\nSee https://biomejs.dev/linter/rules/use-aria-props-for-role", "anyOf": [ { "$ref": "#/$defs/UseAriaPropsForRoleConfiguration" }, { "type": "null" } ] }, "useAriaPropsSupportedByRole": { "description": "Enforce that ARIA properties are valid for the roles that are supported by the element.\nSee https://biomejs.dev/linter/rules/use-aria-props-supported-by-role", "anyOf": [ { "$ref": "#/$defs/UseAriaPropsSupportedByRoleConfiguration" }, { "type": "null" } ] }, "useButtonType": { "description": "Enforces the usage and validity of the attribute type for the element button.\nSee https://biomejs.dev/linter/rules/use-button-type", "anyOf": [ { "$ref": "#/$defs/UseButtonTypeConfiguration" }, { "type": "null" } ] }, "useFocusableInteractive": { "description": "Elements with an interactive role and interaction handlers must be focusable.\nSee https://biomejs.dev/linter/rules/use-focusable-interactive", "anyOf": [ { "$ref": "#/$defs/UseFocusableInteractiveConfiguration" }, { "type": "null" } ] }, "useGenericFontNames": { "description": "Disallow a missing generic family keyword within font families.\nSee https://biomejs.dev/linter/rules/use-generic-font-names", "anyOf": [ { "$ref": "#/$defs/UseGenericFontNamesConfiguration" }, { "type": "null" } ] }, "useHeadingContent": { "description": "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.\nSee https://biomejs.dev/linter/rules/use-heading-content", "anyOf": [ { "$ref": "#/$defs/UseHeadingContentConfiguration" }, { "type": "null" } ] }, "useHtmlLang": { "description": "Enforce that html element has lang attribute.\nSee https://biomejs.dev/linter/rules/use-html-lang", "anyOf": [ { "$ref": "#/$defs/UseHtmlLangConfiguration" }, { "type": "null" } ] }, "useIframeTitle": { "description": "Enforces the usage of the attribute title for the element iframe.\nSee https://biomejs.dev/linter/rules/use-iframe-title", "anyOf": [ { "$ref": "#/$defs/UseIframeTitleConfiguration" }, { "type": "null" } ] }, "useKeyWithClickEvents": { "description": "Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress.\nSee https://biomejs.dev/linter/rules/use-key-with-click-events", "anyOf": [ { "$ref": "#/$defs/UseKeyWithClickEventsConfiguration" }, { "type": "null" } ] }, "useKeyWithMouseEvents": { "description": "Enforce onMouseOver / onMouseOut are accompanied by onFocus / onBlur.\nSee https://biomejs.dev/linter/rules/use-key-with-mouse-events", "anyOf": [ { "$ref": "#/$defs/UseKeyWithMouseEventsConfiguration" }, { "type": "null" } ] }, "useMediaCaption": { "description": "Enforces that audio and video elements must have a track for captions.\nSee https://biomejs.dev/linter/rules/use-media-caption", "anyOf": [ { "$ref": "#/$defs/UseMediaCaptionConfiguration" }, { "type": "null" } ] }, "useSemanticElements": { "description": "It detects the use of role attributes in JSX elements and suggests using semantic elements instead.\nSee https://biomejs.dev/linter/rules/use-semantic-elements", "anyOf": [ { "$ref": "#/$defs/UseSemanticElementsConfiguration" }, { "type": "null" } ] }, "useValidAnchor": { "description": "Enforce that all anchors are valid, and they are navigable elements.\nSee https://biomejs.dev/linter/rules/use-valid-anchor", "anyOf": [ { "$ref": "#/$defs/UseValidAnchorConfiguration" }, { "type": "null" } ] }, "useValidAriaProps": { "description": "Ensures that ARIA properties aria-* are all valid.\nSee https://biomejs.dev/linter/rules/use-valid-aria-props", "anyOf": [ { "$ref": "#/$defs/UseValidAriaPropsConfiguration" }, { "type": "null" } ] }, "useValidAriaRole": { "description": "Elements with ARIA roles must use a valid, non-abstract ARIA role.\nSee https://biomejs.dev/linter/rules/use-valid-aria-role", "anyOf": [ { "$ref": "#/$defs/UseValidAriaRoleConfiguration" }, { "type": "null" } ] }, "useValidAriaValues": { "description": "Enforce that ARIA state and property values are valid.\nSee https://biomejs.dev/linter/rules/use-valid-aria-values", "anyOf": [ { "$ref": "#/$defs/UseValidAriaValuesConfiguration" }, { "type": "null" } ] }, "useValidAutocomplete": { "description": "Use valid values for the autocomplete attribute on input elements.\nSee https://biomejs.dev/linter/rules/use-valid-autocomplete", "anyOf": [ { "$ref": "#/$defs/UseValidAutocompleteConfiguration" }, { "type": "null" } ] }, "useValidLang": { "description": "Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.\nSee https://biomejs.dev/linter/rules/use-valid-lang", "anyOf": [ { "$ref": "#/$defs/UseValidLangConfiguration" }, { "type": "null" } ] } }, "additionalProperties": false }, "Accessibility": { "type": "string", "enum": ["noPublic", "explicit", "none"] }, "Actions": { "type": "object", "properties": { "recommended": { "description": "It enables the assist actions recommended by Biome. `true` by default.", "type": ["boolean", "null"] }, "source": { "anyOf": [{ "$ref": "#/$defs/Source" }, { "type": "null" }] } }, "additionalProperties": false }, "ArrowParentheses": { "type": "string", "enum": ["always", "asNeeded"] }, "AssistConfiguration": { "type": "object", "properties": { "actions": { "description": "Whether Biome should fail in CLI if the assist were not applied to the code.", "anyOf": [{ "$ref": "#/$defs/Actions" }, { "type": "null" }] }, "enabled": { "description": "Whether Biome should enable assist via LSP and CLI.", "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] }, "includes": { "description": "A list of glob patterns. Biome will include files/folders that will\nmatch these patterns.", "type": ["array", "null"], "items": { "$ref": "#/$defs/NormalizedGlob" } } }, "additionalProperties": false }, "AttributePosition": { "type": "string", "enum": ["auto", "multiline"] }, "Bool": { "type": "boolean" }, "BracketSameLine": { "description": "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).", "type": "boolean" }, "BracketSpacing": { "type": "boolean" }, "CheckInputType": { "oneOf": [ { "description": "Don't check the input type", "type": "string", "const": "off" }, { "description": "Check the input type (case-insensitive)", "type": "string", "const": "loose" }, { "description": "Check the input type (case-sensitive)", "type": "string", "const": "strict" } ] }, "Complexity": { "description": "A list of rules that belong to this group", "type": "object", "properties": { "noAdjacentSpacesInRegex": { "description": "Disallow unclear usage of consecutive space characters in regular expression literals.\nSee https://biomejs.dev/linter/rules/no-adjacent-spaces-in-regex", "anyOf": [ { "$ref": "#/$defs/NoAdjacentSpacesInRegexConfiguration" }, { "type": "null" } ] }, "noArguments": { "description": "Disallow the use of arguments.\nSee https://biomejs.dev/linter/rules/no-arguments", "anyOf": [ { "$ref": "#/$defs/NoArgumentsConfiguration" }, { "type": "null" } ] }, "noBannedTypes": { "description": "Disallow primitive type aliases and misleading types.\nSee https://biomejs.dev/linter/rules/no-banned-types", "anyOf": [ { "$ref": "#/$defs/NoBannedTypesConfiguration" }, { "type": "null" } ] }, "noCommaOperator": { "description": "Disallow comma operator.\nSee https://biomejs.dev/linter/rules/no-comma-operator", "anyOf": [ { "$ref": "#/$defs/NoCommaOperatorConfiguration" }, { "type": "null" } ] }, "noEmptyTypeParameters": { "description": "Disallow empty type parameters in type aliases and interfaces.\nSee https://biomejs.dev/linter/rules/no-empty-type-parameters", "anyOf": [ { "$ref": "#/$defs/NoEmptyTypeParametersConfiguration" }, { "type": "null" } ] }, "noExcessiveCognitiveComplexity": { "description": "Disallow functions that exceed a given Cognitive Complexity score.\nSee https://biomejs.dev/linter/rules/no-excessive-cognitive-complexity", "anyOf": [ { "$ref": "#/$defs/NoExcessiveCognitiveComplexityConfiguration" }, { "type": "null" } ] }, "noExcessiveLinesPerFunction": { "description": "Restrict the number of lines of code in a function.\nSee https://biomejs.dev/linter/rules/no-excessive-lines-per-function", "anyOf": [ { "$ref": "#/$defs/NoExcessiveLinesPerFunctionConfiguration" }, { "type": "null" } ] }, "noExcessiveNestedTestSuites": { "description": "This rule enforces a maximum depth to nested describe() in test files.\nSee https://biomejs.dev/linter/rules/no-excessive-nested-test-suites", "anyOf": [ { "$ref": "#/$defs/NoExcessiveNestedTestSuitesConfiguration" }, { "type": "null" } ] }, "noExtraBooleanCast": { "description": "Disallow unnecessary boolean casts.\nSee https://biomejs.dev/linter/rules/no-extra-boolean-cast", "anyOf": [ { "$ref": "#/$defs/NoExtraBooleanCastConfiguration" }, { "type": "null" } ] }, "noFlatMapIdentity": { "description": "Disallow to use unnecessary callback on flatMap.\nSee https://biomejs.dev/linter/rules/no-flat-map-identity", "anyOf": [ { "$ref": "#/$defs/NoFlatMapIdentityConfiguration" }, { "type": "null" } ] }, "noForEach": { "description": "Prefer for...of statement instead of Array.forEach.\nSee https://biomejs.dev/linter/rules/no-for-each", "anyOf": [ { "$ref": "#/$defs/NoForEachConfiguration" }, { "type": "null" } ] }, "noImplicitCoercions": { "description": "Disallow shorthand type conversions.\nSee https://biomejs.dev/linter/rules/no-implicit-coercions", "anyOf": [ { "$ref": "#/$defs/NoImplicitCoercionsConfiguration" }, { "type": "null" } ] }, "noImportantStyles": { "description": "Disallow the use of the !important style.\nSee https://biomejs.dev/linter/rules/no-important-styles", "anyOf": [ { "$ref": "#/$defs/NoImportantStylesConfiguration" }, { "type": "null" } ] }, "noStaticOnlyClass": { "description": "This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.\nSee https://biomejs.dev/linter/rules/no-static-only-class", "anyOf": [ { "$ref": "#/$defs/NoStaticOnlyClassConfiguration" }, { "type": "null" } ] }, "noThisInStatic": { "description": "Disallow this and super in static contexts.\nSee https://biomejs.dev/linter/rules/no-this-in-static", "anyOf": [ { "$ref": "#/$defs/NoThisInStaticConfiguration" }, { "type": "null" } ] }, "noUselessCatch": { "description": "Disallow unnecessary catch clauses.\nSee https://biomejs.dev/linter/rules/no-useless-catch", "anyOf": [ { "$ref": "#/$defs/NoUselessCatchConfiguration" }, { "type": "null" } ] }, "noUselessCatchBinding": { "description": "Disallow unused catch bindings.\nSee https://biomejs.dev/linter/rules/no-useless-catch-binding", "anyOf": [ { "$ref": "#/$defs/NoUselessCatchBindingConfiguration" }, { "type": "null" } ] }, "noUselessConstructor": { "description": "Disallow unnecessary constructors.\nSee https://biomejs.dev/linter/rules/no-useless-constructor", "anyOf": [ { "$ref": "#/$defs/NoUselessConstructorConfiguration" }, { "type": "null" } ] }, "noUselessContinue": { "description": "Avoid using unnecessary continue.\nSee https://biomejs.dev/linter/rules/no-useless-continue", "anyOf": [ { "$ref": "#/$defs/NoUselessContinueConfiguration" }, { "type": "null" } ] }, "noUselessEmptyExport": { "description": "Disallow empty exports that don't change anything in a module file.\nSee https://biomejs.dev/linter/rules/no-useless-empty-export", "anyOf": [ { "$ref": "#/$defs/NoUselessEmptyExportConfiguration" }, { "type": "null" } ] }, "noUselessEscapeInRegex": { "description": "Disallow unnecessary escape sequence in regular expression literals.\nSee https://biomejs.dev/linter/rules/no-useless-escape-in-regex", "anyOf": [ { "$ref": "#/$defs/NoUselessEscapeInRegexConfiguration" }, { "type": "null" } ] }, "noUselessFragments": { "description": "Disallow unnecessary fragments.\nSee https://biomejs.dev/linter/rules/no-useless-fragments", "anyOf": [ { "$ref": "#/$defs/NoUselessFragmentsConfiguration" }, { "type": "null" } ] }, "noUselessLabel": { "description": "Disallow unnecessary labels.\nSee https://biomejs.dev/linter/rules/no-useless-label", "anyOf": [ { "$ref": "#/$defs/NoUselessLabelConfiguration" }, { "type": "null" } ] }, "noUselessLoneBlockStatements": { "description": "Disallow unnecessary nested block statements.\nSee https://biomejs.dev/linter/rules/no-useless-lone-block-statements", "anyOf": [ { "$ref": "#/$defs/NoUselessLoneBlockStatementsConfiguration" }, { "type": "null" } ] }, "noUselessRename": { "description": "Disallow renaming import, export, and destructured assignments to the same name.\nSee https://biomejs.dev/linter/rules/no-useless-rename", "anyOf": [ { "$ref": "#/$defs/NoUselessRenameConfiguration" }, { "type": "null" } ] }, "noUselessStringConcat": { "description": "Disallow unnecessary concatenation of string or template literals.\nSee https://biomejs.dev/linter/rules/no-useless-string-concat", "anyOf": [ { "$ref": "#/$defs/NoUselessStringConcatConfiguration" }, { "type": "null" } ] }, "noUselessStringRaw": { "description": "Disallow unnecessary String.raw function in template string literals without any escape sequence.\nSee https://biomejs.dev/linter/rules/no-useless-string-raw", "anyOf": [ { "$ref": "#/$defs/NoUselessStringRawConfiguration" }, { "type": "null" } ] }, "noUselessSwitchCase": { "description": "Disallow useless case in switch statements.\nSee https://biomejs.dev/linter/rules/no-useless-switch-case", "anyOf": [ { "$ref": "#/$defs/NoUselessSwitchCaseConfiguration" }, { "type": "null" } ] }, "noUselessTernary": { "description": "Disallow ternary operators when simpler alternatives exist.\nSee https://biomejs.dev/linter/rules/no-useless-ternary", "anyOf": [ { "$ref": "#/$defs/NoUselessTernaryConfiguration" }, { "type": "null" } ] }, "noUselessThisAlias": { "description": "Disallow useless this aliasing.\nSee https://biomejs.dev/linter/rules/no-useless-this-alias", "anyOf": [ { "$ref": "#/$defs/NoUselessThisAliasConfiguration" }, { "type": "null" } ] }, "noUselessTypeConstraint": { "description": "Disallow using any or unknown as type constraint.\nSee https://biomejs.dev/linter/rules/no-useless-type-constraint", "anyOf": [ { "$ref": "#/$defs/NoUselessTypeConstraintConfiguration" }, { "type": "null" } ] }, "noUselessUndefined": { "description": "Disallow the use of useless undefined.\nSee https://biomejs.dev/linter/rules/no-useless-undefined", "anyOf": [ { "$ref": "#/$defs/NoUselessUndefinedConfiguration" }, { "type": "null" } ] }, "noUselessUndefinedInitialization": { "description": "Disallow initializing variables to undefined.\nSee https://biomejs.dev/linter/rules/no-useless-undefined-initialization", "anyOf": [ { "$ref": "#/$defs/NoUselessUndefinedInitializationConfiguration" }, { "type": "null" } ] }, "noVoid": { "description": "Disallow the use of void operators, which is not a familiar operator.\nSee https://biomejs.dev/linter/rules/no-void", "anyOf": [ { "$ref": "#/$defs/NoVoidConfiguration" }, { "type": "null" } ] }, "recommended": { "description": "Enables the recommended rules for this group", "type": ["boolean", "null"] }, "useArrowFunction": { "description": "Use arrow functions over function expressions.\nSee https://biomejs.dev/linter/rules/use-arrow-function", "anyOf": [ { "$ref": "#/$defs/UseArrowFunctionConfiguration" }, { "type": "null" } ] }, "useDateNow": { "description": "Use Date.now() to get the number of milliseconds since the Unix Epoch.\nSee https://biomejs.dev/linter/rules/use-date-now", "anyOf": [ { "$ref": "#/$defs/UseDateNowConfiguration" }, { "type": "null" } ] }, "useFlatMap": { "description": "Promotes the use of .flatMap() when map().flat() are used together.\nSee https://biomejs.dev/linter/rules/use-flat-map", "anyOf": [ { "$ref": "#/$defs/UseFlatMapConfiguration" }, { "type": "null" } ] }, "useIndexOf": { "description": "Prefer Array#{indexOf,lastIndexOf}() over Array#{findIndex,findLastIndex}() when looking for the index of an item.\nSee https://biomejs.dev/linter/rules/use-index-of", "anyOf": [ { "$ref": "#/$defs/UseIndexOfConfiguration" }, { "type": "null" } ] }, "useLiteralKeys": { "description": "Enforce the usage of a literal access to properties over computed property access.\nSee https://biomejs.dev/linter/rules/use-literal-keys", "anyOf": [ { "$ref": "#/$defs/UseLiteralKeysConfiguration" }, { "type": "null" } ] }, "useMaxParams": { "description": "Enforce a maximum number of parameters in function definitions.\nSee https://biomejs.dev/linter/rules/use-max-params", "anyOf": [ { "$ref": "#/$defs/UseMaxParamsConfiguration" }, { "type": "null" } ] }, "useNumericLiterals": { "description": "Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals.\nSee https://biomejs.dev/linter/rules/use-numeric-literals", "anyOf": [ { "$ref": "#/$defs/UseNumericLiteralsConfiguration" }, { "type": "null" } ] }, "useOptionalChain": { "description": "Enforce using concise optional chain instead of chained logical expressions.\nSee https://biomejs.dev/linter/rules/use-optional-chain", "anyOf": [ { "$ref": "#/$defs/UseOptionalChainConfiguration" }, { "type": "null" } ] }, "useRegexLiterals": { "description": "Enforce the use of the regular expression literals instead of the RegExp constructor if possible.\nSee https://biomejs.dev/linter/rules/use-regex-literals", "anyOf": [ { "$ref": "#/$defs/UseRegexLiteralsConfiguration" }, { "type": "null" } ] }, "useSimpleNumberKeys": { "description": "Disallow number literal object member names which are not base 10 or use underscore as separator.\nSee https://biomejs.dev/linter/rules/use-simple-number-keys", "anyOf": [ { "$ref": "#/$defs/UseSimpleNumberKeysConfiguration" }, { "type": "null" } ] }, "useSimplifiedLogicExpression": { "description": "Discard redundant terms from logical expressions.\nSee https://biomejs.dev/linter/rules/use-simplified-logic-expression", "anyOf": [ { "$ref": "#/$defs/UseSimplifiedLogicExpressionConfiguration" }, { "type": "null" } ] }, "useWhile": { "description": "Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed.\nSee https://biomejs.dev/linter/rules/use-while", "anyOf": [ { "$ref": "#/$defs/UseWhileConfiguration" }, { "type": "null" } ] } }, "additionalProperties": false }, "ConsistentArrayType": { "oneOf": [ { "description": "`ItemType[]`", "type": "string", "const": "shorthand" }, { "description": "`Array<ItemType>`", "type": "string", "const": "generic" } ] }, "ConsistentTypeDefinition": { "oneOf": [ { "description": "Prefer using `interface` for object type definitions", "type": "string", "const": "interface" }, { "description": "Prefer using `type` for object type definitions", "type": "string", "const": "type" } ] }, "Convention": { "type": "object", "properties": { "formats": { "description": "String cases to enforce", "$ref": "#/$defs/Formats" }, "match": { "description": "Regular expression to enforce", "anyOf": [{ "$ref": "#/$defs/Regex" }, { "type": "null" }] }, "selector": { "description": "Declarations concerned by this convention", "$ref": "#/$defs/Selector" } }, "additionalProperties": false }, "Correctness": { "description": "A list of rules that belong to this group", "type": "object", "properties": { "noChildrenProp": { "description": "Prevent passing of children as props.\nSee https://biomejs.dev/linter/rules/no-children-prop", "anyOf": [ { "$ref": "#/$defs/NoChildrenPropConfiguration" }, { "type": "null" } ] }, "noConstAssign": { "description": "Prevents from having const variables being re-assigned.\nSee https://biomejs.dev/linter/rules/no-const-assign", "anyOf": [ { "$ref": "#/$defs/NoConstAssignConfiguration" }, { "type": "null" } ] }, "noConstantCondition": { "description": "Disallow constant expressions in conditions.\nSee https://biomejs.dev/linter/rules/no-constant-condition", "anyOf": [ { "$ref": "#/$defs/NoConstantConditionConfiguration" }, { "type": "null" } ] }, "noConstantMathMinMaxClamp": { "description": "Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant.\nSee https://biomejs.dev/linter/rules/no-constant-math-min-max-clamp", "anyOf": [ { "$ref": "#/$defs/NoConstantMathMinMaxClampConfiguration" }, { "type": "null" } ] }, "noConstructorReturn": { "description": "Disallow returning a value from a constructor.\nSee https://biomejs.dev/linter/rules/no-constructor-return", "anyOf": [ { "$ref": "#/$defs/NoConstructorReturnConfiguration" }, { "type": "null" } ] }, "noEmptyCharacterClassInRegex": { "description": "Disallow empty character classes in regular expression literals.\nSee https://biomejs.dev/linter/rules/no-empty-character-class-in-regex", "anyOf": [ { "$ref": "#/$defs/NoEmptyCharacterClassInRegexConfiguration" }, { "type": "null" } ] }, "noEmptyPattern": { "description": "Disallows empty destructuring patterns.\nSee https://biomejs.dev/linter/rules/no-empty-pattern", "anyOf": [ { "$ref": "#/$defs/NoEmptyPatternConfiguration" }, { "type": "null" } ] }, "noGlobalDirnameFilename": { "description": "Disallow the use of __dirname and __filename in the global scope.\nSee https://biomejs.dev/linter/rules/no-global-dirname-filename", "anyOf": [ { "$ref": "#/$defs/NoGlobalDirnameFilenameConfiguration" }, { "type": "null" } ] }, "noGlobalObjectCalls": { "description": "Disallow calling global object properties as functions.\nSee https://biomejs.dev/linter/rules/no-global-object-calls", "anyOf": [ { "$ref": "#/$defs/NoGlobalObjectCallsConfiguration" }, { "type": "null" } ] }, "noInnerDeclarations": { "description": "Disallow function and var declarations that are accessible outside their block.\nSee https://biomejs.dev/linter/rules/no-inner-declarations", "anyOf": [ { "$ref": "#/$defs/NoInnerDeclarationsConfiguration" }, { "type": "null" } ] }, "noInvalidBuiltinInstantiation": { "description": "Ensure that builtins are correctly instantiated.\nSee https://biomejs.dev/linter/rules/no-invalid-builtin-instantiation", "anyOf": [ { "$ref": "#/$defs/NoInvalidBuiltinInstantiationConfiguration" }, { "type": "null" } ] }, "noInvalidConstructorSuper": { "description": "Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.\nSee https://biomejs.dev/linter/rules/no-invalid-constructor-super", "anyOf": [ { "$ref": "#/$defs/NoInvalidConstructorSuperConfiguration" }, { "type": "null" } ] }, "noInvalidDirectionInLinearGradient": { "description": "Disallow non-standard direction values for linear gradient functions.\nSee https://biomejs.dev/linter/rules/no-invalid-direction-in-linear-gradient", "anyOf": [ { "$ref": "#/$defs/NoInvalidDirectionInLinearGradientConfiguration" }, { "type": "null" } ] }, "noInvalidGridAreas": { "description": "Disallows invalid named grid areas in CSS Grid Layouts.\nSee https://biomejs.dev/linter/rules/no-invalid-grid-areas", "anyOf": [ { "$ref": "#/$defs/NoInvalidGridAreasConfiguration" }, { "type": "null" } ] }, "noInvalidPositionAtImportRule": { "description": "Disallow the use of @import at-rules in invalid positions.\nSee https://biomejs.dev/linter/rules/no-invalid-position-at-import-rule", "anyOf": [ { "$ref": "#/$defs/NoInvalidPositionAtImportRuleConfiguration" }, { "type": "null" } ] }, "noInvalidUseBeforeDeclaration": { "description": "Disallow the use of variables, function parameters, classes, and enums before their declaration.\nSee https://biomejs.dev/linter/rules/no-invalid-use-before-declaration", "anyOf": [ { "$ref": "#/$defs/NoInvalidUseBeforeDeclarationConfiguration" }, { "type": "null" } ] }, "noMissingVarFunction": { "description": "Disallow missing var function for css variables.\nSee https://biomejs.dev/linter/rules/no-missing-var-function", "anyOf": [ { "$ref": "#/$defs/NoMissingVarFunctionConfiguration" }, { "type": "null" } ] }, "noNestedComponentDefinitions": { "description": "Disallows defining React components inside other components.\nSee https://biomejs.dev/linter/rules/no-nested-component-definitions", "anyOf": [ { "$ref": "#/$defs/NoNestedComponentDefinitionsConfiguration" }, { "type": "null" } ] }, "noNextAsyncClientComponent": { "description": "Prevent client components from being async functions.\nSee https://biomejs.dev/linter/rules/no-next-async-client-component", "anyOf": [ { "$ref": "#/$defs/NoNextAsyncClientComponentConfiguration" }, { "type": "null" } ] }, "noNodejsModules": { "description": "Forbid the use of Node.js builtin modules.\nSee https://biomejs.dev/linter/rules/no-nodejs-modules", "anyOf": [ { "$ref": "#/$defs/NoNodejsModulesConfiguration" }, { "type": "null" } ] }, "noNonoctalDecimalEscape": { "description": "Disallow \\8 and \\9 escape sequences in string literals.\nSee https://biomejs.dev/linter/rules/no-nonoctal-decimal-escape", "anyOf": [ { "$ref": "#/$defs/NoNonoctalDecimalEscapeConfiguration" }, { "type": "null" } ] }, "noPrecisionLoss": { "description": "Disallow literal numbers that lose precision.\nSee https://biomejs.dev/linter/rules/no-precision-loss", "anyOf": [ { "$ref": "#/$defs/NoPrecisionLossConfiguration" }, { "type": "null" } ] }, "noPrivateImports": { "description": "Restrict imports of private exports.\nSee https://biomejs.dev/linter/rules/no-private-imports", "anyOf": [ { "$ref": "#/$defs/NoPrivateImportsConfiguration" }, { "type": "null" } ] }, "noProcessGlobal": { "description": "Disallow the use of process global.\nSee https://biomejs.dev/linter/rules/no-process-global", "anyOf": [ { "$ref": "#/$defs/NoProcessGlobalConfiguration" }, { "type": "null" } ] }, "noQwikUseVisibleTask": { "description": "Disallow useVisibleTask$() functions in Qwik components.\nSee https://biomejs.dev/linter/rules/no-qwik-use-visible-task", "anyOf": [ { "$ref": "#/$defs/NoQwikUseVisibleTaskConfiguration" }, { "type": "null" } ] }, "noReactPropAssignments": { "description": "Disallow assigning to React component props.\nSee https://biomejs.dev/linter/rules/no-react-prop-assignments", "anyOf": [ { "$ref": "#/$defs/NoReactPropAssignmentsConfiguration" }, { "type": "null" } ] }, "noRenderReturnValue": { "description": "Prevent the usage of the return value of React.render.\nSee https://biomejs.dev/linter/rules/no-render-return-value", "anyOf": [ { "$ref": "#/$defs/NoRenderReturnValueConfiguration" }, { "type": "null" } ] }, "noRestrictedElements": { "description": "Disallow the use of configured elements.\nSee https://biomejs.dev/linter/rules/no-restricted-elements", "anyOf": [ { "$ref": "#/$defs/NoRestrictedElementsConfiguration" }, { "type": "null" } ] }, "noSelfAssign": { "description": "Disallow assignments where both sides are exactly the same.\nSee https://biomejs.dev/linter/rules/no-self-assign", "anyOf": [ { "$ref": "#/$defs/NoSelfAssignConfiguration" }, { "type": "null" } ] }, "noSetterReturn": { "description": "Disallow returning a value from a setter.\nSee https://biomejs.dev/linter/rules/no-setter-return", "anyOf": [ { "$ref": "#/$defs/NoSetterReturnConfiguration" }, { "type": "null" } ] }, "noSolidDestructuredProps": { "description": "Disallow destructuring props inside JSX components in Solid projects.\nSee https://biomejs.dev/linter/rules/no-solid-destructured-props", "anyOf": [ { "$ref": "#/$defs/NoSolidDestructuredPropsConfiguration" }, { "type": "null" } ] }, "noStringCaseMismatch": { "description": "Disallow comparison of expressions modifying the string case with non-compliant value.\nSee https://biomejs.dev/linter/rules/no-string-case-mismatch", "anyOf": [ { "$ref": "#/$defs/NoStringCaseMismatchConfiguration" }, { "type": "null" } ] }, "noSwitchDeclarations": { "description": "Disallow lexical declarations in switch clauses.\nSee https://biomejs.dev/linter/rules/no-switch-declarations", "anyOf": [ { "$ref": "#/$defs/NoSwitchDeclarationsConfiguration" }, { "type": "null" } ] }, "noUndeclaredDependencies": { "description": "Disallow the use of dependencies that aren't specified in the package.json.\nSee https://biomejs.dev/linter/rules/no-undeclared-dependencies", "anyOf": [ { "$ref": "#/$defs/NoUndeclaredDependenciesConfiguration" }, { "type": "null" } ] }, "noUndeclaredVariables": { "description": "Prevents the usage of variables that haven't been declared inside the document.\nSee https://biomejs.dev/linter/rules/no-undeclared-variables", "anyOf": [ { "$ref": "#/$defs/NoUndeclaredVariablesConfiguration" }, { "type": "null" } ] }, "noUnknownFunction": { "description": "Disallow unknown CSS value functions.\nSee https://biomejs.dev/linter/rules/no-unknown-function", "anyOf": [ { "$ref": "#/$defs/NoUnknownFunctionConfiguration" }, { "type": "null" } ] }, "noUnknownMediaFeatureName": { "description": "Disallow unknown media feature names.\nSee https://biomejs.dev/linter/rules/no-unknown-media-feature-name", "anyOf": [ { "$ref": "#/$defs/NoUnknownMediaFeatureNameConfiguration" }, { "type": "null" } ] }, "noUnknownProperty": { "description": "Disallow unknown properties.\nSee https://biomejs.dev/linter/rules/no-unknown-property", "anyOf": [ { "$ref": "#/$defs/NoUnknownPropertyConfiguration" }, { "type": "null" } ] }, "noUnknownPseudoClass": { "description": "Disallow unknown pseudo-class selectors.\nSee https://biomejs.dev/linter/rules/no-unknown-pseudo-class", "anyOf": [ { "$ref": "#/$defs/NoUnknownPseudoClassConfiguration" }, { "type": "null" } ] }, "noUnknownPseudoElement": { "description": "Disallow unknown pseudo-element selectors.\nSee https://biomejs.dev/linter/rules/no-unknown-pseudo-element", "anyOf": [ { "$ref": "#/$defs/NoUnknownPseudoElementConfiguration" }, { "type": "null" } ] }, "noUnknownTypeSelector": { "description": "Disallow unknown type selectors.\nSee https://biomejs.dev/linter/rules/no-unknown-type-selector", "anyOf": [ { "$ref": "#/$defs/NoUnknownTypeSelectorConfiguration" }, { "type": "null" } ] }, "noUnknownUnit": { "description": "Disallow unknown CSS units.\nSee https://biomejs.dev/linter/rules/no-unknown-unit", "anyOf": [ { "$ref": "#/$defs/NoUnknownUnitConfiguration" }, { "type": "null" } ] }, "noUnmatchableAnbSelector": { "description": "Disallow unmatchable An+B selectors.\nSee https://biomejs.dev/linter/rules/no-unmatchable-anb-selector", "anyOf": [ { "$ref": "#/$defs/NoUnmatchableAnbSelectorConfiguration" }, { "type": "null" } ] }, "noUnreachable": { "description": "Disallow unreachable code.\nSee https://biomejs.dev/linter/rules/no-unreachable", "anyOf": [ { "$ref": "#/$defs/NoUnreachableConfiguration" }, { "type": "null" } ] }, "noUnreachableSuper": { "description": "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.\nSee https://biomejs.dev/linter/rules/no-unreachable-super", "anyOf": [ { "$ref": "#/$defs/NoUnreachableSuperConfiguration" }, { "type": "null" } ] }, "noUnresolvedImports": { "description": "Warn when importing non-existing exports.\nSee https://biomejs.dev/linter/rules/no-unresolved-imports", "anyOf": [ { "$ref": "#/$defs/NoUnresolvedImportsConfiguration" }, { "type": "null" } ] }, "noUnsafeFinally": { "description": "Disallow control flow statements in finally blocks.\nSee https://biomejs.dev/linter/rules/no-unsafe-finally", "anyOf": [ { "$ref": "#/$defs/NoUnsafeFinallyConfiguration" }, { "type": "null" } ] }, "noUnsafeOptionalChaining": { "description": "Disallow the use of optional chaining in contexts where the undefined value is not allowed.\nSee https://biomejs.dev/linter/rules/no-unsafe-optional-chaining", "anyOf": [ { "$ref": "#/$defs/NoUnsafeOptionalChainingConfiguration" }, { "type": "null" } ] }, "noUnusedFunctionParameters": { "description": "Disallow unused function parameters.\nSee https://biomejs.dev/linter/rules/no-unused-function-parameters", "anyOf": [ { "$ref": "#/$defs/NoUnusedFunctionParametersConfiguration" }, { "type": "null" } ] }, "noUnusedImports": { "description": "Disallow unused imports.\nSee https://biomejs.dev/linter/rules/no-unused-imports", "anyOf": [ { "$ref": "#/$defs/NoUnusedImportsConfiguration" }, { "type": "null" } ] }, "noUnusedLabels": { "description": "Disallow unused labels.\nSee https://biomejs.dev/linter/rules/no-unused-labels", "anyOf": [ { "$ref": "#/$defs/NoUnusedLabelsConfiguration" }, { "type": "null" } ] }, "noUnusedPrivateClassMembers": { "description": "Disallow unused private class members.\nSee https://biomejs.dev/linter/rules/no-unused-private-class-members", "anyOf": [ { "$ref": "#/$defs/NoUnusedPrivateClassMembersConfiguration" }, { "type": "null" } ] }, "noUnusedVariables": { "description": "Disallow unused variables.\nSee https://biomejs.dev/linter/rules/no-unused-variables", "anyOf": [ { "$ref": "#/$defs/NoUnusedVariablesConfiguration" }, { "type": "null" } ] }, "noVoidElementsWithChildren": { "description": "This rules prevents void elements (AKA self-closing elements) from having children.\nSee https://biomejs.dev/linter/rules/no-void-elements-with-children", "anyOf": [ { "$ref": "#/$defs/NoVoidElementsWithChildrenConfiguration" }, { "type": "null" } ] }, "noVoidTypeReturn": { "description": "Disallow returning a value from a function with the return type 'void'.\nSee https://biomejs.dev/linter/rules/no-void-type-return", "anyOf": [ { "$ref": "#/$defs/NoVoidTypeReturnConfiguration" }, { "type": "null" } ] }, "noVueDataObjectDeclaration": { "description": "Enforce that Vue component data options are declared as functions.\nSee https://biomejs.dev/linter/rules/no-vue-data-object-declaration", "anyOf": [ { "$ref": "#/$defs/NoVueDataObjectDeclarationConfiguration" }, { "type": "null" } ] }, "noVueDuplicateKeys": { "description": "Disallow duplicate keys in Vue component data, methods, computed properties, and other options.\nSee https://biomejs.dev/linter/rules/no-vue-duplicate-keys", "anyOf": [ { "$ref": "#/$defs/NoVueDuplicateKeysConfiguration" }, { "type": "null" } ] }, "noVueReservedKeys": { "description": "Disallow reserved keys in Vue component data and computed properties.\nSee https://biomejs.dev/linter/rules/no-vue-reserved-keys", "anyOf": [ { "$ref": "#/$defs/NoVueReservedKeysConfiguration" }, { "type": "null" } ] }, "noVueReservedProps": { "description": "Disallow reserved names to be used as props.\nSee https://biomejs.dev/linter/rules/no-vue-reserved-props", "anyOf": [ { "$ref": "#/$defs/NoVueReservedPropsConfiguration" }, { "type": "null" } ] }, "noVueSetupPropsReactivityLoss": { "description": "Disallow destructuring of props passed to setup in Vue projects.\nSee https://biomejs.dev/linter/rules/no-vue-setup-props-reactivity-loss", "anyOf": [ { "$ref": "#/$defs/NoVueSetupPropsReactivityLossConfiguration" }, { "type": "null" } ] }, "recommended": { "description": "Enables the recommended rules for this group", "type": ["boolean", "null"] }, "useExhaustiveDependencies": { "description": "Enforce correct dependency usage within React hooks.\nSee https://biomejs.dev/linter/rules/use-exhaustive-dependencies", "anyOf": [ { "$ref": "#/$defs/UseExhaustiveDependenciesConfiguration" }, { "type": "null" } ] }, "useGraphqlNamedOperations": { "description": "Enforce specifying the name of GraphQL operations.\nSee https://biomejs.dev/linter/rules/use-graphql-named-operations", "anyOf": [ { "$ref": "#/$defs/UseGraphqlNamedOperationsConfiguration" }, { "type": "null" } ] }, "useHookAtTopLevel": { "description": "Enforce that all React hooks are being called from the Top Level component functions.\nSee https://biomejs.dev/linter/rules/use-hook-at-top-level", "anyOf": [ { "$ref": "#/$defs/UseHookAtTopLevelConfiguration" }, { "type": "null" } ] }, "useImageSize": { "description": "Enforces that \\<img> elements have both width and height attributes.\nSee https://biomejs.dev/linter/rules/use-image-siz