From 203520b312f270a0fa0fcdd8702e70f94c4b890b Mon Sep 17 00:00:00 2001 From: Antonin Rouxel Date: Tue, 28 Apr 2026 14:43:49 +0200 Subject: [PATCH 01/17] feat: add APM package and CLI binaries for multiple platforms - Introduced the main APM package with version 0.10.0 and its metadata. - Added scripts for generating platform-specific packages and updating versions. - Created package.json files for CLI binaries targeting darwin (arm64 and x64), linux (arm64 and x64), and win32 (x64). - Implemented workspace configuration for pnpm to manage packages efficiently. Co-authored-by: Copilot --- .github/workflows/build-release.yml | 48 + package.json | 10 + packages/@apm/apm/bin/apm | 87 + packages/@apm/apm/configuration_schema.json | 16010 ++++++++++++++++ packages/@apm/apm/package.json | 44 + .../@apm/apm/scripts/generate-packages.mjs | 119 + .../@apm/apm/scripts/update-beta-version.mjs | 27 + .../apm/scripts/update-preview-version.mjs | 23 + packages/@apm/cli-darwin-arm64/package.json | 19 + packages/@apm/cli-darwin-x64/package.json | 19 + packages/@apm/cli-linux-arm64/package.json | 19 + packages/@apm/cli-linux-x64/package.json | 19 + packages/@apm/cli-win32-x64/package.json | 19 + pnpm-workspace.yaml | 5 + 14 files changed, 16468 insertions(+) create mode 100644 package.json create mode 100755 packages/@apm/apm/bin/apm create mode 100644 packages/@apm/apm/configuration_schema.json create mode 100644 packages/@apm/apm/package.json create mode 100644 packages/@apm/apm/scripts/generate-packages.mjs create mode 100644 packages/@apm/apm/scripts/update-beta-version.mjs create mode 100644 packages/@apm/apm/scripts/update-preview-version.mjs create mode 100644 packages/@apm/cli-darwin-arm64/package.json create mode 100644 packages/@apm/cli-darwin-x64/package.json create mode 100644 packages/@apm/cli-linux-arm64/package.json create mode 100644 packages/@apm/cli-linux-x64/package.json create mode 100644 packages/@apm/cli-win32-x64/package.json create mode 100644 pnpm-workspace.yaml diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index c80f9b58..ca579d90 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -821,3 +821,51 @@ jobs: "windows_x86_64": "${{ steps.checksums.outputs.windows-x86_64-sha }}" } } + + publish-npm: + name: Publish to npm + runs-on: ubuntu-latest + needs: [build-and-test, build-and-validate-macos-intel, build-and-validate-macos-arm, integration-tests, release-validation, create-release] + if: github.ref_type == 'tag' && needs.create-release.outputs.is_private_repo != 'true' && needs.create-release.outputs.is_prerelease != 'true' + environment: + name: npm-publish + url: https://www.npmjs.com/package/@apm/apm + permissions: + contents: read + id-token: write # Required for npm provenance (publishConfig.provenance: true) + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Download all build artifacts + uses: actions/download-artifact@v4 + with: + path: ./artifacts + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: '24' + registry-url: 'https://registry.npmjs.org' + + # Extracts each platform binary into its packages/@apm/cli-* folder + # and syncs the version across all package.json files. + - name: Generate npm packages + run: node packages/@apm/apm/scripts/generate-packages.mjs + + # Publish platform packages first, then the main wrapper that lists + # them as optionalDependencies. + - name: Publish npm packages + run: | + for package in \ + packages/@apm/cli-linux-x64 \ + packages/@apm/cli-linux-arm64 \ + packages/@apm/cli-darwin-x64 \ + packages/@apm/cli-darwin-arm64 \ + packages/@apm/cli-win32-x64 \ + packages/@apm/apm; do + npm publish "$package" --tag latest --access public + done + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 00000000..06610b47 --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "name": "@apm/monorepo", + "version": "0.0.0", + "private": true, + "type": "module", + "keywords": [], + "author": "", + "license": "MIT", + "packageManager": "pnpm@10.33.2" +} diff --git a/packages/@apm/apm/bin/apm b/packages/@apm/apm/bin/apm new file mode 100755 index 00000000..913662eb --- /dev/null +++ b/packages/@apm/apm/bin/apm @@ -0,0 +1,87 @@ +#!/usr/bin/env node +const { platform, arch, env, version, release } = process; +const { execSync } = require("child_process"); + +function isMusl() { + let stderr; + try { + stderr = execSync("ldd --version", { + stdio: ['pipe', 'pipe', 'pipe'] + }); + } catch (err) { + stderr = err.stderr; + } + if (stderr.indexOf("musl") > -1) { + return true; + } + return false; +} + +const PLATFORMS = { + win32: { + x64: "@apm/cli-win32-x64/apm.exe", + }, + darwin: { + x64: "@apm/cli-darwin-x64/apm", + arm64: "@apm/cli-darwin-arm64/apm", + }, + linux: { + x64: "@apm/cli-linux-x64/apm", + arm64: "@apm/cli-linux-arm64/apm", + }, +}; + +const binPath = env.APM_BINARY || + PLATFORMS?.[platform]?.[arch]; + +if (binPath) { + const packageManager = detectPackageManager(); + const result = require("child_process").spawnSync( + require.resolve(binPath), + process.argv.slice(2), + { + shell: false, + stdio: "inherit", + env: { + ...env, + JS_RUNTIME_VERSION: version, + JS_RUNTIME_NAME: release.name, + ...(packageManager != null + ? { NODE_PACKAGE_MANAGER: packageManager } + : {}), + }, + }, + ); + + if (result.error) { + throw result.error; + } + + process.exitCode = result.status; +} else { + console.error( + "The APM CLI package doesn't ship with prebuilt binaries for your platform yet. " + + "You can still use the CLI by cloning the microsoft/apm repo from GitHub, " + + "and follow the instructions there to build the CLI for your platform.", + ); + process.exitCode = 1; +} + +/** + * NPM, Yarn, and other package manager set the `npm_config_user_agent`. It has the following format: + * + * ``` + * "npm/8.3.0 node/v16.13.2 win32 x64 workspaces/false + * ``` + * + * @returns The package manager string (`npm/8.3.0`) or null if the user agent string isn't set. + */ +function detectPackageManager() { + const userAgent = env.npm_config_user_agent; + + if (userAgent == null) { + return null; + } + + return userAgent.split(" ")[0]; +} diff --git a/packages/@apm/apm/configuration_schema.json b/packages/@apm/apm/configuration_schema.json new file mode 100644 index 00000000..8387c8da --- /dev/null +++ b/packages/@apm/apm/configuration_schema.json @@ -0,0 +1,16010 @@ +{ + "$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 \\ 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 \\
) 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"] }, + "AvailabilityNamed": { + "description": "Named Baseline availability tiers.", + "oneOf": [ + { + "description": "Warn on anything not Baseline widely available (default).", + "type": "string", + "const": "widely" + }, + { + "description": "Warn on anything not at least Baseline newly available.", + "type": "string", + "const": "newly" + } + ] + }, + "AvailabilityTarget": { + "description": "The Baseline availability level to target.\n\n- `\"widely\"` – warn on anything not Baseline widely available.\n- `\"newly\"` – warn on anything not at least Baseline newly available.\n- A year (e.g. `2023`) – warn on anything whose `baseline_low_date` is after\n that year (i.e. became newly available after that year).", + "anyOf": [ + { + "description": "A named tier: `\"widely\"` or `\"newly\"`.", + "$ref": "#/$defs/AvailabilityNamed" + }, + { + "description": "A year cutoff (e.g. `2023`).", + "type": "integer", + "format": "uint16", + "maximum": 65535, + "minimum": 0 + } + ] + }, + "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`", + "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 \\ elements have both width and height attributes.\nSee https://biomejs.dev/linter/rules/use-image-size", + "anyOf": [ + { "$ref": "#/$defs/UseImageSizeConfiguration" }, + { "type": "null" } + ] + }, + "useImportExtensions": { + "description": "Enforce file extensions for relative imports.\nSee https://biomejs.dev/linter/rules/use-import-extensions", + "anyOf": [ + { "$ref": "#/$defs/UseImportExtensionsConfiguration" }, + { "type": "null" } + ] + }, + "useIsNan": { + "description": "Require calls to isNaN() when checking for NaN.\nSee https://biomejs.dev/linter/rules/use-is-nan", + "anyOf": [ + { "$ref": "#/$defs/UseIsNanConfiguration" }, + { "type": "null" } + ] + }, + "useJsonImportAttributes": { + "description": "Enforces the use of with { type: \"json\" } for JSON module imports.\nSee https://biomejs.dev/linter/rules/use-json-import-attributes", + "anyOf": [ + { "$ref": "#/$defs/UseJsonImportAttributesConfiguration" }, + { "type": "null" } + ] + }, + "useJsxKeyInIterable": { + "description": "Disallow missing key props in iterators/collection literals.\nSee https://biomejs.dev/linter/rules/use-jsx-key-in-iterable", + "anyOf": [ + { "$ref": "#/$defs/UseJsxKeyInIterableConfiguration" }, + { "type": "null" } + ] + }, + "useParseIntRadix": { + "description": "Enforce the consistent use of the radix argument when using parseInt().\nSee https://biomejs.dev/linter/rules/use-parse-int-radix", + "anyOf": [ + { "$ref": "#/$defs/UseParseIntRadixConfiguration" }, + { "type": "null" } + ] + }, + "useQwikClasslist": { + "description": "Prefer using the class prop as a classlist over the classnames helper.\nSee https://biomejs.dev/linter/rules/use-qwik-classlist", + "anyOf": [ + { "$ref": "#/$defs/UseQwikClasslistConfiguration" }, + { "type": "null" } + ] + }, + "useQwikMethodUsage": { + "description": "Disallow use* hooks outside of component$ or other use* hooks in Qwik applications.\nSee https://biomejs.dev/linter/rules/use-qwik-method-usage", + "anyOf": [ + { "$ref": "#/$defs/UseQwikMethodUsageConfiguration" }, + { "type": "null" } + ] + }, + "useQwikValidLexicalScope": { + "description": "Disallow unserializable expressions in Qwik dollar ($) scopes.\nSee https://biomejs.dev/linter/rules/use-qwik-valid-lexical-scope", + "anyOf": [ + { "$ref": "#/$defs/UseQwikValidLexicalScopeConfiguration" }, + { "type": "null" } + ] + }, + "useSingleJsDocAsterisk": { + "description": "Enforce JSDoc comment lines to start with a single asterisk, except for the first one.\nSee https://biomejs.dev/linter/rules/use-single-js-doc-asterisk", + "anyOf": [ + { "$ref": "#/$defs/UseSingleJsDocAsteriskConfiguration" }, + { "type": "null" } + ] + }, + "useUniqueElementIds": { + "description": "Prevent the usage of static string literal id attribute on elements.\nSee https://biomejs.dev/linter/rules/use-unique-element-ids", + "anyOf": [ + { "$ref": "#/$defs/UseUniqueElementIdsConfiguration" }, + { "type": "null" } + ] + }, + "useValidForDirection": { + "description": "Enforce \"for\" loop update clause moving the counter in the right direction.\nSee https://biomejs.dev/linter/rules/use-valid-for-direction", + "anyOf": [ + { "$ref": "#/$defs/UseValidForDirectionConfiguration" }, + { "type": "null" } + ] + }, + "useValidTypeof": { + "description": "This rule checks that the result of a typeof expression is compared to a valid value.\nSee https://biomejs.dev/linter/rules/use-valid-typeof", + "anyOf": [ + { "$ref": "#/$defs/UseValidTypeofConfiguration" }, + { "type": "null" } + ] + }, + "useYield": { + "description": "Require generator functions to contain yield.\nSee https://biomejs.dev/linter/rules/use-yield", + "anyOf": [ + { "$ref": "#/$defs/UseYieldConfiguration" }, + { "type": "null" } + ] + } + }, + "additionalProperties": false + }, + "CssAssistConfiguration": { + "description": "Options that changes how the CSS assist behaves", + "type": "object", + "properties": { + "enabled": { + "description": "Control the assist for CSS files.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + } + }, + "additionalProperties": false + }, + "CssConfiguration": { + "description": "Options applied to CSS files", + "type": "object", + "properties": { + "assist": { + "description": "CSS assist options", + "anyOf": [ + { "$ref": "#/$defs/CssAssistConfiguration" }, + { "type": "null" } + ], + "default": null + }, + "formatter": { + "description": "CSS formatter options", + "anyOf": [ + { "$ref": "#/$defs/CssFormatterConfiguration" }, + { "type": "null" } + ], + "default": null + }, + "globals": { + "description": "CSS globals", + "type": ["array", "null"], + "items": { "type": "string" }, + "uniqueItems": true + }, + "linter": { + "description": "CSS linter options", + "anyOf": [ + { "$ref": "#/$defs/CssLinterConfiguration" }, + { "type": "null" } + ], + "default": null + }, + "parser": { + "description": "CSS parsing options", + "anyOf": [ + { "$ref": "#/$defs/CssParserConfiguration" }, + { "type": "null" } + ], + "default": null + } + }, + "additionalProperties": false + }, + "CssFormatterConfiguration": { + "description": "Options that changes how the CSS formatter behaves", + "type": "object", + "properties": { + "enabled": { + "description": "Control the formatter for CSS (and its super languages) files.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + }, + "indentStyle": { + "description": "The indent style applied to CSS (and its super languages) files.", + "anyOf": [{ "$ref": "#/$defs/IndentStyle" }, { "type": "null" }] + }, + "indentWidth": { + "description": "The size of the indentation applied to CSS (and its super languages) files. Default to 2.", + "anyOf": [{ "$ref": "#/$defs/IndentWidth" }, { "type": "null" }] + }, + "lineEnding": { + "description": "The type of line ending applied to CSS (and its super languages) files. `auto` uses CRLF on Windows and LF on other platforms.", + "anyOf": [{ "$ref": "#/$defs/LineEnding" }, { "type": "null" }] + }, + "lineWidth": { + "description": "What's the max width of a line applied to CSS (and its super languages) files. Defaults to 80.", + "anyOf": [{ "$ref": "#/$defs/LineWidth" }, { "type": "null" }] + }, + "quoteStyle": { + "description": "The type of quotes used in CSS code. Defaults to double.", + "anyOf": [{ "$ref": "#/$defs/QuoteStyle" }, { "type": "null" }] + }, + "trailingNewline": { + "description": "Whether to add a trailing newline at the end of the file.\n\nSetting this option to `false` is **highly discouraged** because it could cause many problems with other tools:\n- https://thoughtbot.com/blog/no-newline-at-end-of-file\n- https://callmeryan.medium.com/no-newline-at-end-of-file-navigating-gits-warning-for-android-developers-af14e73dd804\n- https://unix.stackexchange.com/questions/345548/how-to-cat-files-together-adding-missing-newlines-at-end-of-some-files\n\nDisable the option at your own risk.\n\nDefaults to true.", + "anyOf": [{ "$ref": "#/$defs/TrailingNewline" }, { "type": "null" }] + } + }, + "additionalProperties": false + }, + "CssLinterConfiguration": { + "description": "Options that changes how the CSS linter behaves", + "type": "object", + "properties": { + "enabled": { + "description": "Control the linter for CSS files.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + } + }, + "additionalProperties": false + }, + "CssParserConfiguration": { + "description": "Options that changes how the CSS parser behaves", + "type": "object", + "properties": { + "allowWrongLineComments": { + "description": "Allow comments to appear on incorrect lines in `.css` files", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + }, + "cssModules": { + "description": "Enables parsing of CSS Modules specific features. Enable this feature only\nwhen your files don't end in `.module.css`.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + }, + "tailwindDirectives": { + "description": "Enables parsing of Tailwind CSS 4.0 directives and functions.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }], + "default": null + } + }, + "additionalProperties": false + }, + "CustomRestrictedElements": { + "description": "Elements to restrict. Each key is the element name, and the value is the message to show when the element is used.", + "type": "object", + "additionalProperties": { "type": "string" }, + "minProperties": 1 + }, + "CustomRestrictedType": { + "anyOf": [ + { "type": "string" }, + { "$ref": "#/$defs/CustomRestrictedTypeOptions" } + ] + }, + "CustomRestrictedTypeOptions": { + "type": "object", + "properties": { + "message": { "type": "string", "default": "" }, + "use": { "type": ["string", "null"], "default": null } + }, + "additionalProperties": false + }, + "DeclarationStyle": { + "oneOf": [ + { + "description": "defineProps<{...}>()", + "type": "string", + "const": "type" + }, + { + "description": "defineProps({...})", + "type": "string", + "const": "runtime" + } + ] + }, + "DependencyAvailability": { + "oneOf": [ + { + "description": "This type of dependency will be always available or unavailable.", + "type": "boolean" + }, + { + "description": "This type of dependency will be available only if the linted file matches any of the globs.", + "type": "array", + "items": { "type": "string" }, + "minItems": 1 + } + ] + }, + "Expand": { + "oneOf": [ + { + "description": "Objects are expanded when the first property has a leading newline. Arrays are always\nexpanded if they are shorter than the line width.", + "type": "string", + "const": "auto" + }, + { + "description": "Objects and arrays are always expanded.", + "type": "string", + "const": "always" + }, + { + "description": "Objects and arrays are never expanded, if they are shorter than the line width.", + "type": "string", + "const": "never" + } + ] + }, + "Extends": { + "anyOf": [ + { "type": "array", "items": { "type": "string" } }, + { "type": "string" } + ] + }, + "FilenameCase": { + "description": "Supported cases for file names.", + "oneOf": [ + { "description": "camelCase", "type": "string", "const": "camelCase" }, + { + "description": "Match an export name", + "type": "string", + "const": "export" + }, + { + "description": "kebab-case", + "type": "string", + "const": "kebab-case" + }, + { + "description": "PascalCase", + "type": "string", + "const": "PascalCase" + }, + { "description": "snake_case", "type": "string", "const": "snake_case" } + ] + }, + "FilenameCases": { + "type": "array", + "items": { "$ref": "#/$defs/FilenameCase" }, + "uniqueItems": true + }, + "FilesConfiguration": { + "description": "The configuration of the filesystem", + "type": "object", + "properties": { + "experimentalScannerIgnores": { + "description": "**Deprecated:** Please use _force-ignore syntax_ in `files.includes`\ninstead: \n\nSet of file and folder names that should be unconditionally ignored by\nBiome's scanner.", + "type": ["array", "null"], + "items": { "type": "string" } + }, + "ignoreUnknown": { + "description": "Tells Biome to not emit diagnostics when handling files that it doesn't know", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + }, + "includes": { + "description": "A list of glob patterns. Biome will handle only those files/folders that will\nmatch these patterns.", + "type": ["array", "null"], + "items": { "$ref": "#/$defs/NormalizedGlob" } + }, + "maxSize": { + "description": "The maximum allowed size for source code files in bytes. Files above\nthis limit will be ignored for performance reasons. Defaults to 1 MiB", + "anyOf": [{ "$ref": "#/$defs/MaxSize" }, { "type": "null" }] + } + }, + "additionalProperties": false + }, + "FixKind": { + "description": "Used to identify the kind of code action emitted by a rule", + "oneOf": [ + { + "description": "The rule doesn't emit code actions.", + "type": "string", + "const": "none" + }, + { + "description": "The rule emits a code action that is safe to apply. Usually these fixes don't change the semantic of the program.", + "type": "string", + "const": "safe" + }, + { + "description": "The rule emits a code action that is _unsafe_ to apply. Usually these fixes remove comments, or change\nthe semantic of the program.", + "type": "string", + "const": "unsafe" + } + ] + }, + "Format": { + "description": "Supported cases.", + "type": "string", + "enum": ["camelCase", "CONSTANT_CASE", "PascalCase", "snake_case"] + }, + "Formats": { + "type": "array", + "items": { "$ref": "#/$defs/Format" }, + "uniqueItems": true + }, + "FormatterConfiguration": { + "description": "Generic options applied to all files", + "type": "object", + "properties": { + "attributePosition": { + "description": "The attribute position style in HTML-ish languages. Defaults to auto.", + "anyOf": [{ "$ref": "#/$defs/AttributePosition" }, { "type": "null" }] + }, + "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).", + "anyOf": [{ "$ref": "#/$defs/BracketSameLine" }, { "type": "null" }] + }, + "bracketSpacing": { + "description": "Whether to insert spaces around brackets in object literals. Defaults to true.", + "anyOf": [{ "$ref": "#/$defs/BracketSpacing" }, { "type": "null" }] + }, + "enabled": { + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + }, + "expand": { + "description": "Whether to expand arrays and objects on multiple lines.\nWhen set to `auto`, object literals are formatted on multiple lines if the first property has a newline,\nand array literals are formatted on a single line if it fits in the line.\nWhen set to `always`, these literals are formatted on multiple lines, regardless of length of the list.\nWhen set to `never`, these literals are formatted on a single line if it fits in the line.\nWhen formatting `package.json`, Biome will use `always` unless configured otherwise. Defaults to \"auto\".", + "anyOf": [{ "$ref": "#/$defs/Expand" }, { "type": "null" }] + }, + "formatWithErrors": { + "description": "Whether formatting should be allowed to proceed if a given file\nhas syntax errors", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + }, + "includes": { + "description": "A list of glob patterns. The formatter will include files/folders that will\nmatch these patterns.", + "type": ["array", "null"], + "items": { "$ref": "#/$defs/NormalizedGlob" } + }, + "indentStyle": { + "description": "The indent style.", + "anyOf": [{ "$ref": "#/$defs/IndentStyle" }, { "type": "null" }] + }, + "indentWidth": { + "description": "The size of the indentation, 2 by default", + "anyOf": [{ "$ref": "#/$defs/IndentWidth" }, { "type": "null" }] + }, + "lineEnding": { + "description": "The type of line ending.", + "anyOf": [{ "$ref": "#/$defs/LineEnding" }, { "type": "null" }] + }, + "lineWidth": { + "description": "What's the max width of a line. Defaults to 80.", + "anyOf": [{ "$ref": "#/$defs/LineWidth" }, { "type": "null" }] + }, + "trailingNewline": { + "description": "Whether to add a trailing newline at the end of the file.\n\nSetting this option to `false` is **highly discouraged** because it could cause many problems with other tools:\n- https://thoughtbot.com/blog/no-newline-at-end-of-file\n- https://callmeryan.medium.com/no-newline-at-end-of-file-navigating-gits-warning-for-android-developers-af14e73dd804\n- https://unix.stackexchange.com/questions/345548/how-to-cat-files-together-adding-missing-newlines-at-end-of-some-files\n\nDisable the option at your own risk.\n\nDefaults to true.", + "anyOf": [{ "$ref": "#/$defs/TrailingNewline" }, { "type": "null" }] + }, + "useEditorconfig": { + "description": "Use any `.editorconfig` files to configure the formatter. Configuration\nin `biome.json` will override `.editorconfig` configuration.\n\nDefault: `false`.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + } + }, + "additionalProperties": false + }, + "Glob": { "type": "string" }, + "GraphqlAssistConfiguration": { + "description": "Options that changes how the GraphQL linter behaves", + "type": "object", + "properties": { + "enabled": { + "description": "Control the formatter for GraphQL files.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }], + "default": null + } + }, + "additionalProperties": false + }, + "GraphqlConfiguration": { + "description": "Options applied to GraphQL files", + "type": "object", + "properties": { + "assist": { + "description": "Assist options", + "anyOf": [ + { "$ref": "#/$defs/GraphqlAssistConfiguration" }, + { "type": "null" } + ] + }, + "formatter": { + "description": "GraphQL formatter options", + "anyOf": [ + { "$ref": "#/$defs/GraphqlFormatterConfiguration" }, + { "type": "null" } + ] + }, + "linter": { + "anyOf": [ + { "$ref": "#/$defs/GraphqlLinterConfiguration" }, + { "type": "null" } + ] + } + }, + "additionalProperties": false + }, + "GraphqlFormatterConfiguration": { + "description": "Options that changes how the GraphQL formatter behaves", + "type": "object", + "properties": { + "bracketSpacing": { + "description": "Whether to insert spaces around brackets in object literals. Defaults to true.", + "anyOf": [{ "$ref": "#/$defs/BracketSpacing" }, { "type": "null" }], + "default": null + }, + "enabled": { + "description": "Control the formatter for GraphQL files.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }], + "default": null + }, + "indentStyle": { + "description": "The indent style applied to GraphQL files.", + "anyOf": [{ "$ref": "#/$defs/IndentStyle" }, { "type": "null" }], + "default": null + }, + "indentWidth": { + "description": "The size of the indentation applied to GraphQL files. Default to 2.", + "anyOf": [{ "$ref": "#/$defs/IndentWidth" }, { "type": "null" }], + "default": null + }, + "lineEnding": { + "description": "The type of line ending applied to GraphQL files. `auto` uses CRLF on Windows and LF on other platforms.", + "anyOf": [{ "$ref": "#/$defs/LineEnding" }, { "type": "null" }], + "default": null + }, + "lineWidth": { + "description": "What's the max width of a line applied to GraphQL files. Defaults to 80.", + "anyOf": [{ "$ref": "#/$defs/LineWidth" }, { "type": "null" }], + "default": null + }, + "quoteStyle": { + "description": "The type of quotes used in GraphQL code. Defaults to double.", + "anyOf": [{ "$ref": "#/$defs/QuoteStyle" }, { "type": "null" }], + "default": null + }, + "trailingNewline": { + "description": "Whether to add a trailing newline at the end of the file.\n\nSetting this option to `false` is **highly discouraged** because it could cause many problems with other tools:\n- https://thoughtbot.com/blog/no-newline-at-end-of-file\n- https://callmeryan.medium.com/no-newline-at-end-of-file-navigating-gits-warning-for-android-developers-af14e73dd804\n- https://unix.stackexchange.com/questions/345548/how-to-cat-files-together-adding-missing-newlines-at-end-of-some-files\n\nDisable the option at your own risk.\n\nDefaults to true.", + "anyOf": [{ "$ref": "#/$defs/TrailingNewline" }, { "type": "null" }] + } + }, + "additionalProperties": false + }, + "GraphqlLinterConfiguration": { + "description": "Options that change how the GraphQL linter behaves.", + "type": "object", + "properties": { + "enabled": { + "description": "Control the formatter for GraphQL files.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }], + "default": null + } + }, + "additionalProperties": false + }, + "GritAssistConfiguration": { + "type": "object", + "properties": { + "enabled": { + "description": "Control the assist functionality for Grit files.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + } + }, + "additionalProperties": false + }, + "GritConfiguration": { + "description": "Options applied to GritQL files", + "type": "object", + "properties": { + "assist": { + "description": "Assist options", + "anyOf": [ + { "$ref": "#/$defs/GritAssistConfiguration" }, + { "type": "null" } + ] + }, + "formatter": { + "description": "Formatting options", + "anyOf": [ + { "$ref": "#/$defs/GritFormatterConfiguration" }, + { "type": "null" } + ] + }, + "linter": { + "description": "Formatting options", + "anyOf": [ + { "$ref": "#/$defs/GritLinterConfiguration" }, + { "type": "null" } + ] + } + }, + "additionalProperties": false + }, + "GritFormatterConfiguration": { + "type": "object", + "properties": { + "enabled": { + "description": "Control the formatter for Grit files.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + }, + "indentStyle": { + "description": "The indent style applied to Grit files.", + "anyOf": [{ "$ref": "#/$defs/IndentStyle" }, { "type": "null" }] + }, + "indentWidth": { + "description": "The size of the indentation applied to Grit files. Default to 2.", + "anyOf": [{ "$ref": "#/$defs/IndentWidth" }, { "type": "null" }] + }, + "lineEnding": { + "description": "The type of line ending applied to Grit files.", + "anyOf": [{ "$ref": "#/$defs/LineEnding" }, { "type": "null" }] + }, + "lineWidth": { + "description": "What's the max width of a line applied to Grit files. Defaults to 80.", + "anyOf": [{ "$ref": "#/$defs/LineWidth" }, { "type": "null" }] + }, + "trailingNewline": { + "description": "Whether to add a trailing newline at the end of the file.\n\nSetting this option to `false` is **highly discouraged** because it could cause many problems with other tools:\n- https://thoughtbot.com/blog/no-newline-at-end-of-file\n- https://callmeryan.medium.com/no-newline-at-end-of-file-navigating-gits-warning-for-android-developers-af14e73dd804\n- https://unix.stackexchange.com/questions/345548/how-to-cat-files-together-adding-missing-newlines-at-end-of-some-files\n\nDisable the option at your own risk.\n\nDefaults to true.", + "anyOf": [{ "$ref": "#/$defs/TrailingNewline" }, { "type": "null" }] + } + }, + "additionalProperties": false + }, + "GritLinterConfiguration": { + "type": "object", + "properties": { + "enabled": { + "description": "Control the linter for Grit files.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + } + }, + "additionalProperties": false + }, + "GroupMatcher": { + "anyOf": [ + { "$ref": "#/$defs/ImportMatcher" }, + { "$ref": "#/$defs/SourceMatcher" } + ] + }, + "GroupPlainConfiguration": { + "oneOf": [ + { + "description": "It disables all the rules of this group", + "type": "string", + "const": "off" + }, + { + "description": "It enables all the rules of this group, with their default severity", + "type": "string", + "const": "on" + }, + { + "description": "It enables all the rules of this group, and set their severity to \"info\"", + "type": "string", + "const": "info" + }, + { + "description": "It enables all the rules of this group, and set their severity to \"warn\"", + "type": "string", + "const": "warn" + }, + { + "description": "It enables all the rules of this group, and set their severity to \"error+\"", + "type": "string", + "const": "error" + } + ] + }, + "Hook": { + "type": "object", + "properties": { + "closureIndex": { + "description": "The \"position\" of the closure function, starting from zero.\n\nFor example, for React's `useEffect()` hook, the closure index is 0.", + "type": ["integer", "null"], + "format": "uint8", + "default": null, + "maximum": 255, + "minimum": 0 + }, + "dependenciesIndex": { + "description": "The \"position\" of the array of dependencies, starting from zero.\n\nFor example, for React's `useEffect()` hook, the dependencies index is 1.", + "type": ["integer", "null"], + "format": "uint8", + "default": null, + "maximum": 255, + "minimum": 0 + }, + "name": { + "description": "The name of the hook.", + "type": "string", + "default": "" + }, + "stableResult": { + "description": "Whether the result of the hook is stable.\n\nSet to `true` to mark the identity of the hook's return value as stable,\nor use a number/an array of numbers to mark the \"positions\" in the\nreturn array as stable.\n\nFor example, for React's `useRef()` hook the value would be `true`,\nwhile for `useState()` it would be `[1]`.", + "anyOf": [{ "$ref": "#/$defs/StableHookResult" }, { "type": "null" }], + "default": null + } + }, + "additionalProperties": false + }, + "HtmlAssistConfiguration": { + "description": "Options that changes how the HTML assist behaves", + "type": "object", + "properties": { + "enabled": { + "description": "Control the assist for HTML (and its super languages) files.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + } + }, + "additionalProperties": false + }, + "HtmlConfiguration": { + "description": "Options applied to HTML files", + "type": "object", + "properties": { + "assist": { + "anyOf": [ + { "$ref": "#/$defs/HtmlAssistConfiguration" }, + { "type": "null" } + ] + }, + "experimentalFullSupportEnabled": { + "description": "Enables full support for HTML, Vue, Svelte and Astro files.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + }, + "formatter": { + "description": "HTML formatter options", + "anyOf": [ + { "$ref": "#/$defs/HtmlFormatterConfiguration" }, + { "type": "null" } + ] + }, + "linter": { + "description": "HTML linter options", + "anyOf": [ + { "$ref": "#/$defs/HtmlLinterConfiguration" }, + { "type": "null" } + ] + }, + "parser": { + "description": "HTML parsing options", + "anyOf": [ + { "$ref": "#/$defs/HtmlParserConfiguration" }, + { "type": "null" } + ] + } + }, + "additionalProperties": false + }, + "HtmlFormatterConfiguration": { + "description": "Options that changes how the HTML formatter behaves", + "type": "object", + "properties": { + "attributePosition": { + "description": "The attribute position style in HTML elements. Defaults to auto.", + "anyOf": [{ "$ref": "#/$defs/AttributePosition" }, { "type": "null" }] + }, + "bracketSameLine": { + "description": "Whether to hug the closing bracket of multiline HTML tags to the end of the last line, rather than being alone on the following line. Defaults to false.", + "anyOf": [{ "$ref": "#/$defs/BracketSameLine" }, { "type": "null" }] + }, + "enabled": { + "description": "Control the formatter for HTML (and its super languages) files.", + "anyOf": [{ "$ref": "#/$defs/Bool" }, { "type": "null" }] + }, + "indentScriptAndStyle": { + "description": "Whether to indent the `