diff --git a/codegen/src/main.rs b/codegen/src/main.rs index b6072bd79..f82b01ed2 100644 --- a/codegen/src/main.rs +++ b/codegen/src/main.rs @@ -24,6 +24,7 @@ fn main() -> anyhow::Result<()> { CodegenCommand::Metadata => generate_json_metadata()?, CodegenCommand::Env => { generate_env_variables()?; + } CodegenCommand::Diagnostics => { generate_diagnostics()?; } diff --git a/src/assets/blog/biome-v1-9/biome-monthly-npm-downloads.svg b/src/assets/blog/biome-v1-9/biome-monthly-npm-downloads.svg new file mode 100644 index 000000000..00b4cbbfa --- /dev/null +++ b/src/assets/blog/biome-v1-9/biome-monthly-npm-downloads.svg @@ -0,0 +1 @@ +SepOctNovDecJanFebMarAprMayJunJulAug0500.0001.000.0001.500.0002.000.0002.500.0003.000.000Biome monthly NPM downloads \ No newline at end of file diff --git a/src/components/generated/DefaultConfiguration.mdx b/src/components/generated/DefaultConfiguration.mdx index 995e0e6eb..39ca01486 100644 --- a/src/components/generated/DefaultConfiguration.mdx +++ b/src/components/generated/DefaultConfiguration.mdx @@ -1,11 +1,20 @@ ```json title="biome.json" { + "$schema": "https://biomejs.dev/schemas/1.9.0/schema.json", + "vcs": { + "enabled": false, + "clientKind": "git", + "useIgnoreFile": false + }, + "files": { "ignoreUnknown": false, "ignore": [] }, + "formatter": { "enabled": true, "indentStyle": "tab" }, "organizeImports": { "enabled": true }, "linter": { "enabled": true, "rules": { "recommended": true } - } + }, + "javascript": { "formatter": { "quoteStyle": "double" } } } ``` diff --git a/src/content/blog/biome-v1-9.md b/src/content/blog/biome-v1-9.md new file mode 100644 index 000000000..4fe06a1e0 --- /dev/null +++ b/src/content/blog/biome-v1-9.md @@ -0,0 +1,295 @@ +--- +title: Biome v1.9 Anniversary Release +description: First year of Biome and release of Biome 1.9 that brings CSS formatting and linting by default, a new search command +summary: | + TODO +authors: + - conaclos + - team +pubDate: 2024-09-12 +coverImage: + lightSrc: "@/assets/blog/roadmap-2024/banner-light.png" + darkSrc: "@/assets/blog/roadmap-2024/banner-dark.png" + alt: The brand of the project. It says "Biome, toolchain of the web" +socialImage: "@/assets/social-logo.png" +--- + +Today weโ€™re excited to announce the release of Biome v1.9 and to celebrate the first anniversary of Biome ๐ŸŽŠ +Let's take a look back at the first year of Biome and then explore the new features in Biome 1.9. + + +## One year of Biome + +We officially [announced Biome](/blog/annoucing-biome/) on 29 August 2023. +From its inception, Biome has been a free open source software driven by its community. +We have a [governance](https://github.com/biomejs/biome/blob/main/GOVERNANCE.md) and a solid base of contributors to ensure the longevity of the project. + +In October 2023, one of the creators of [Prettier](https://prettier.io/) launched [the Prettier challenge](https://console.algora.io/challenges/prettier) that rewarded any project written in Rust that passes at least 95% of the Prettier tests for JavaScript. +The aim of this challenge was to create a fast competitor to Prettier in order to stimulate improvements in Prettier's performance. +We quickly organized ourselves to get there as soon as possible. +By the end of November, we [surpassed this goal](/blog/biome-wins-prettier-challenge/) by passing 97% of the Prettier tests for JavaScript, as well as TypeScript, JSX and TSX! +The Biome formatter is really fast: it can format a large code base in less than 1 second. +In the process, we identified several formatting issues in Prettier. +This has also pushed contributions to Prettier that greatly improved its performance. +This challenge was a win for the whole web ecosystem! + +By winning the challenge, we brought Biome to light. +Many developers were excited to discover a fast alternative to Prettier, but also a fast alternative to [ESLint](https://eslint.org/)! +The approach of bundling both a formatter and a linter in one tool provides a unified and consistent experience with minimal configuration. +Biome has been quickly adopted by many projects, including big ones such as [Ant Design](https://ant.design/), [Astro](https://astro.build/), [Sentry](https://sentry.io/), [daisyUI](https://daisyui.com/), [Refine](https://refine.dev/), [Discord](https://discord.com/), [Pulumi](https://www.pulumi.com/), [Label Studio](https://labelstud.io/), [Spicetify](https://spicetify.app/), [Apify](https://apify.com/), [Slint](https://slint.dev/), [Rspack](https://rspack.dev/), [FluidFramework](https://fluidframework.com/), [and others](https://sourcegraph.com/search?q=file:biome.json&patternType=literal&sm=0). +Biome surpassed 2.7 million monthly NPM downloads in August 2024. + +![Biome monthly NPM downloads](../../assets/blog/biome-v1-9/biome-monthly-npm-downloads.svg) + +We gained sponsorship, notably [Shiguredo](https://shiguredo.jp/), [l2BEAT](https://l2beat.com/), [Phoenix Labs](https://www.phoenixlabs.dev/), [KANAME](https://kanamekey.com/), [Nanabit](https://nanabit.dev/), [Vital](https://vital.io/), [CodeRabbit](https://coderabbit.ai/), and [Forge42](https://forge42.dev/). +These sponsorships have helped move the project forward by rewarding contributors and even paying for maintenance work in recent months. +We would like to reward and encourage more contributions, then if you use Biome, please consider [sponsoring us](https://opencollective.com/biome)! + +We also gained many new contributors. +Contributors who have made a significant contribution are regularly invited to join the Biome team. +We started with a team of 5 core contributors, and we are now a team of [8 core contributors and 10 maintainers](https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#current-members). + +In June 2024, Biome won the [JSNation's productivity booster Open Source Award](https://x.com/thejsnation/status/1805561129915060248). + + +## Biome v1.9 + +As we celebrate Biome's first year, we're pleased to announce the release of Biome 1.9, which brings many new features and bug fixes. + +Once you have upgraded to Biome v1.9.0, migrate your Biome configuration to the new version by running the `migarte` command: + +```shell +biome migrate +``` + +### Stable CSS formatter and linter + +We are thrilled to announce that Biome's CSS formatter and linter are now considered stable and are **enabled by default**. +Do note that Biome only parses **standard CSS syntax** so far, and doesn't yet handle CSS dialects such as SCSS. As this is brand new functionality, you may also still run into some rough edges. Please report any problems you encounter! + +The CSS linter provides 15 stable lint rules that were ported from [stylelint](https://stylelint.io/): + +- [a11y/useGenericFontNames](https://biomejs.dev/linter/rules/use-generic-font-names/) +- [correctness/noInvalidDirectionInLinearGradient](https://biomejs.dev/linter/rules/no-invalid-direction-in-linear-gradient/) +- [correctness/noInvalidGridAreas](https://biomejs.dev/linter/rules/no-invalid-grid-areas/) +- [correctness/noInvalidPositionAtImportRule](https://biomejs.dev/linter/rules/no-invalid-position-at-import-rule/) +- [correctness/noUnknownFunction](https://biomejs.dev/linter/rules/no-unknown-function/) +- [correctness/noUnknownMediaFeatureName](https://biomejs.dev/linter/rules/no-unknown-media-feature-name/) +- [correctness/noUnknownProperty](https://biomejs.dev/linter/rules/no-unknown-property/) +- [correctness/noUnknownUnit](https://biomejs.dev/linter/rules/no-unknown-unit/) +- [correctness/noUnmatchableAnbSelector](https://biomejs.dev/linter/rules/no-unmatchable-anb-selector/) +- [suspicious/noDuplicateAtImportRules](https://biomejs.dev/linter/rules/no-duplicate-at-import-rules/) +- [suspicious/noDuplicateFontNames](https://biomejs.dev/linter/rules/no-duplicate-font-names/) +- [suspicious/noDuplicateSelectorsKeyframeBlock](https://biomejs.dev/linter/rules/no-duplicate-selectors-keyframe-block/) +- [suspicious/noEmptyBlock](https://biomejs.dev/linter/rules/no-empty-block/) +- [suspicious/noImportantInKeyframe](https://biomejs.dev/linter/rules/no-important-in-keyframe/) +- [suspicious/noShorthandPropertyOverrides](https://biomejs.dev/linter/rules/no-shorthand-property-overrides/) + +It also provides the following nursery lint rules: + +- [nursery/noDuplicateCustomProperties](https://biomejs.dev/linter/rules/no-duplicate-custom-properties/) +- [nursery/noIrregularWhitespace](https://biomejs.dev/linter/rules/no-irregular-whitespace/) +- [nursery/noUnknownPseudoClass](https://biomejs.dev/linter/rules/no-unknown-pseudo-class/) +- [nursery/noUnknownPseudoElement](https://biomejs.dev/linter/rules/no-unknown-pseudo-element/) +- [nursery/noValueAtRule](https://biomejs.dev/linter/rules/no-value-at-rule/) + +If you don't want Biome to format and lint your CSS files, +you can disable the CSS formatter and linter in the Biome configuration file: + +```json +{ + "css": { + "formatter": { "enabled": false }, + "linter": { "enabled": false } + } +} +``` + +or on the command line: + +```shell +biome format --css-formatter-enabled=false +biome lint --css-linter-enabled=false +biome check --css-formatter-enabled=false --css-linter-enabled=false +``` + +Special thanks to [Denis Bezrukov @denbezrukov](https://github.com/denbezrukov), [Jon Egeland @faultyserver](https://github.com/faultyserver) and [Yoshiaki Togami @togami2864](https://github.com/togami2864) for coordinating and implementing most of the features related to CSS. + +### Stable GraphQL formatter and linter + +Another brand new feature: Biome now formats and lints [GraphQL](https://graphql.org/) files by default. + +For now, Biome provides only two nursery lint rules: + +- [nursery/noDuplicateFields](https://biomejs.dev/linter/rules/no-duplicate-fields/) +- [nursery/useDeprecatedReason](https://biomejs.dev/linter/rules/use-deprecated-reason/) + +If you don't want Biome to format and lint your GraphQL files, +you can disable the GraphQL formatter and linter in the Biome configuration file: + +```json +{ + "graphql": { + "formatter": { "enabled": false }, + "linter": { "enabled": false } + } +} +``` + +or on the command line: + +```shell +biome format --graphql-formatter-enabled=false +biome lint --graphql-linter-enabled=false +biome check --graphql-formatter-enabled=false --css-linter-enabled=false +``` + +Special thanks to [Swan](https://www.swan.io/) that funded the implementation of the GraphQL formatter and to [Vรต Hoร ng Long @vohoanglong0107](https://github.com/vohoanglong0107) for implementing most of the features related to GraphQL. + +### Search command + +Back in February, one of our Core Contributors published [a proposal for plugin support](https://github.com/biomejs/biome/discussions/1762). +One of the highlights was the use of GritQL as a foundation for our plugin system. + +[GritQL](https://docs.grit.io/language/overview) is a powerful query language that lets you do structural searches on your codebase. +This means that trivia such as whitespace or even the type of string quotes used will be ignored in your search query. +It also has many features for querying the structure of your code, making it much more elegant for searching code than regular expressions. + +Integrating a query language such as GritQL is no easy feat, and throughout the year we published [multiple](https://github.com/biomejs/biome/discussions/2286) [status](https://github.com/biomejs/biome/discussions/2585) [updates](https://github.com/biomejs/biome/discussions/3392). +Today, we release the first product of this effort: A new `biome search` command. + +While we believe this command may already be useful to users in some situations (especially when it gets integrated in our IDE extensions!), this command is really a stepping stone towards our plugin efforts. +By allowing our users to try it out in a first iteration, we hope to gain insight into the type of queries you want to do, as well as the bugs we need to focus on. + +For now, the `search` command is explicitly marked as **EXPERIMENTAL**, since many limitations are yet to be fixed or explored. +Keep this in mind when you try it out, and please let us know what you think! +For an overview of specific limitations, please see the [dedicated issue](https://github.com/biomejs/biome/issues/2582). + +Even though there are still plenty of limitations, we do believe the integration has progressed far enough that we can shift our focus towards the integration of actual plugins. +We cannot yet promise a timeline, but we'll keep you posted! + +PS.: GritQL escapes code snippets using backticks, but most shells interpret backticks as command invocations. +To avoid this, it's best to put single quotes around your Grit queries. +For instance, the following command search for all `console.log` invocations: + +```shell +biome search '`console.$method($args)` where { $method <: or { `log`, `info` } }' ./ +``` + +
./benchmark/bench.js:38:3 search โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
+
+  38 โ”‚ 	console.info(`\nโŒ› repository: ${name}`);
+
+./packages/@biomejs/js-api/scripts/update-nightly-version.mjs:27:1 search โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
+
+  27 โ”‚  console.log(`version=${version}`);
+
+Searched 67 files in 1034ms. Found 2 matches.
+
+ +Special thanks to [Grit](https://grit.io) for open-sourcing GritQL, [Arend van Beelen @arendjr](https://github.com/arendjr) for integrating the GritQL engine into Biome, and to [@BackupMiles](https://github.com/BackupMiles/) for implementing the formatting of search results in the `biome search` command! + +### `.editorconfig` support + +Biome is now able to take the [`.editorconfig`](https://editorconfig.org/) of your project into account. +This is an opt-in feature. You have to turn it on in your Biome configuration file: + +```json title="biome.json" +{ + "formatter": { + "useEditorconfig": true + } +} +``` + +Note that all options specified in the Biome configuration file override the ones specified in `.editorconfig`. +For now, only the `.editorconfig` at the root of your project is taken into account. + +Special thanks to [Carson McManus @dyc3](https://github.com/dyc3) for implementing this feature! + +### JavaScript formatter and linter + +We updated the JavaScript formatter to match [Prettier v3.3](https://github.com/prettier/prettier/blob/main/CHANGELOG.md#333). +The most significant change is adding parentheses around nullish coalescing in ternaries. +This change adds clarity to operator precedence. + +```js +// Input +foo ? bar ?? foo : baz; + +// Biome 1.8.3 and Prettier 3.3.2 +foo ? bar ?? foo : baz; + +// Biome 1.9 and Prettier 3.3.3 +foo ? (bar ?? foo) : baz; +``` + +Regarding the linter, we stabilized the following lint rules: + +- [a11y/noLabelWithoutControl](https://biomejs.dev/linter/rules/no-label-without-control/) +- [a11y/useFocusableInteractive](https://biomejs.dev/linter/rules/use-focusable-interactive/) +- [accessibility/useSemanticElements](https://biomejs.dev/linter/rules/use-semantic-elements/) +- [complexity/noUselessStringConcat](https://biomejs.dev/linter/rules/no-useless-string-concat/) +- [complexity/noUselessUndefinedInitialization](https://biomejs.dev/linter/rules/no-useless-undefined-initialization/) +- [complexity/useDateNow](https://biomejs.dev/linter/rules/use-date-now/) +- [correctness/noUndeclaredDependencies](https://biomejs.dev/linter/rules/no-undeclared-dependencies/) +- [correctness/noInvalidBuiltinInstantiation](https://biomejs.dev/linter/rules/no-invalid-builtin-instantiation/) +- [correctness/noUnusedFunctionParameters](https://biomejs.dev/linter/rules/no-unused-function-parameters/) +- [correctness/useImportExtensions](https://biomejs.dev/linter/rules/use-import-extensions/) +- [performance/useTopLevelRegex](https://biomejs.dev/linter/rules/use-top-level-regex/) +- [style/noDoneCallback](https://biomejs.dev/linter/rules/no-done-callback/) +- [style/noYodaExpression](https://biomejs.dev/linter/rules/no-yoda-expression/) +- [style/useConsistentBuiltinInstantiation](https://biomejs.dev/linter/rules/use-consistent-builtin-instantiation/) +- [style/useDefaultSwitchClause](https://biomejs.dev/linter/rules/use-default-switch-clause/) +- [style/useExplicitLengthCheck](https://biomejs.dev/linter/rules/use-explicit-length-check/) +- [style/useThrowNewError](https://biomejs.dev/linter/rules/use-throw-new-error/) +- [style/useThrowOnlyError](https://biomejs.dev/linter/rules/use-throw-only-error/) +- [suspicious/noConsole](https://biomejs.dev/linter/rules/no-console/) +- [suspicious/noEvolvingTypes](https://biomejs.dev/linter/rules/no-evolving-types/) +- [suspicious/noMisplacedAssertion](https://biomejs.dev/linter/rules/no-misplaced-assertion/) +- [suspicious/noReactSpecificProps](https://biomejs.dev/linter/rules/no-react-specific-props/) +- [suspicious/useErrorMessage](https://biomejs.dev/linter/rules/use-error-message/) +- [suspicious/useNumberToFixedDigitsArgument](https://biomejs.dev/linter/rules/use-number-to-fixed-digits-argument/) + +We added the following new rules: + +- [nursery/noCommonJs](https://biomejs.dev/linter/rules/no-common-js/) +- [nursery/noDuplicateCustomProperties](https://biomejs.dev/linter/rules/no-duplicate-custom-properties/) +- [nursery/noDynamicNamespaceImportAccess](https://biomejs.dev/linter/no-dynamic-namespace-import-access/) +- [nursery/noEnum](https://biomejs.dev/linter/rules/no-enum/) +- [nursery/noIrregularWhitespace](https://biomejs.dev/linter/rules/no-irregular-whitespace) +- [nursery/noRestrictedTypes](https://biomejs.dev/linter/no-restricted-types/) +- [nursery/noSecrets](https://biomejs.dev/linter/rules/no-secrets/) +- [nursery/noUselessEscapeInRegex](https://biomejs.dev/linter/rules/no-useless-escape-in-regex/) +- [nursery/useConsistentMemberAccessibility](https://biomejs.dev/linter/rules/use-consistent-member-accessibility/) +- [nursery/useTrimStartEnd](https://biomejs.dev/linter/rules/use-trim-start-end/) + +And we deprecated the following rules: + +- `correctness/noInvalidNewBuiltin`. Use [correctness/noInvalidBuiltinInstantiation](https://biomejs.dev/linter/rules/no-invalid-builtin-instantiation/) instead. +- `style/useSingleCaseStatement`. Use [correctness/noSwitchDeclarations](https://biomejs.dev/linter/rules/no-switch-declarations/) instead. +- `suspicious/noConsoleLog`. Use [suspicious/noConsole](https://biomejs.dev/linter/rules/no-console/) instead. + +Our linter has now more than 250 rules! +Most of the ESLint rules and rules from some plugins have been ported. +We are close to completing the port of ESLint. + +### And more! + +For the full list of changes, please refer to our [changelog](/internals/changelog/). + +## What's next + +### VSCode plugin v3 + +[Nicolas Hedger @nhedger](https://github.com/nhedger) is working on a new version of our first-party VSCode plugin. +This new version will improve workspace support and fix some long-standing issues. + +### Biome 2.0 + +During this first year, we have discovered a number of issues that cannot be solved without introducing small breaking changes. +For example, we rely on a glob library that sometimes doesn't behave as users expect. +We feel it is time to address these long-standing issues. +Following our [versioning philosophy](https://biomejs.dev/internals/versioning/), these small breaking changes cannot be made without releasing a major release. +Therefore, the next release of Biome will be a major release: Biome 2.0. +We will use this opportunity to remove deprecated features. diff --git a/src/content/docs/internals/changelog.md b/src/content/docs/internals/changelog.md index 1c4d22b11..7427c8e82 100644 --- a/src/content/docs/internals/changelog.md +++ b/src/content/docs/internals/changelog.md @@ -15,6 +15,678 @@ New entries must be placed in a section entitled `Unreleased`. Read our [guidelines for writing a good changelog entry](https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#changelog). +## v1.9.0 (2024-09-12) + +### Analyzer + +- Implement the [semantic model for CSS](https://github.com/biomejs/biome/pull/3546). Contributed by @togami2864 + +### CLI + +#### New features + +- Add `--graphql-linter-enabled` option, to control whether the linter should be enabled or not for GraphQL files. Contributed by @ematipico + +- New EXPERIMENTAL `search` command. The search command allows you to search a Biome project using [GritQL syntax](https://biomejs.dev/reference/gritql). + + GritQL is a powerful language that lets you do _structural_ searches on your codebase. This means that trivia such as whitespace or even the type of strings quotes used will be ignored in your search query. It also has many features for querying the structure of your code, making it much more elegant for searching code than regular expressions. + + While we believe this command may already be useful to users in some situations (especially when integrated in the IDE extensions!), we also had an ulterior motive for adding this command: We intend to utilize GritQL for our plugin efforts, and by allowing our users to try it out in a first iteration, we hope to gain insight in the type of queries you want to do, as well as the bugs we need to focus on. + + For now, the `search` command is explicitly marked as EXPERIMENTAL, since many bugs remain. Keep this in mind when you try it out, and please [let us know](https://github.com/biomejs/biome/issues) your issues! + + Note: GritQL escapes code snippets using backticks, but most shells interpret backticks as command invocations. To avoid this, it's best to put _single quotes_ around your Grit queries. + + ```shell + biome search '`console.log($message)`' # find all `console.log` invocations + ``` + + Contributed by @arendjr and @BackupMiles + +- The option `--max-diagnostics` now accept a `none` value, which lifts the limit of diagnostics shown. Contributed by @ematipico + - Add a new reporter `--reporter=gitlab`, that emits diagnostics for using the [GitLab Code Quality report](https://docs.gitlab.com/ee/ci/testing/code_quality.html#implement-a-custom-tool). + + ```json + [ + { + "description": "Use === instead of ==. == is only allowed when comparing against `null`", + "check_name": "lint/suspicious/noDoubleEquals", + "fingerprint": "6143155163249580709", + "severity": "critical", + "location": { + "path": "main.ts", + "lines": { + "begin": 4 + } + } + } + ] + ``` + + Contributed by @NiclasvanEyk + +- Add new options to the `lsp-proxy` and `start` commands: + - `--log-path`: a directory where to store the daemon logs. The commands also accepts the environment variable `BIOME_LOG_PATH`. + - `--log-prefix-name`: a prefix that's added to the file name of the logs. It defaults to `server.log`. The commands also accepts the environment variable `BIOME_LOG_PREFIX_NAME`. + + @Contributed by @ematipico + +#### Enhancements + +- When a `--reporter` is provided, and it's different from the default one, the value provided by via `--max-diagnostics` is ignored and **the limit is lifted**. Contributed by @ematipico + +- `biome init` now generates a new config file with more options set. + This change intends to improve discoverability of the options and to set the more commonly used options to their default values. + Contributed by @Conaclos + +- The `--verbose` flag now reports the list of files that were evaluated, and the list of files that were fixed. + The **evaluated** files are the those files that can be handled by Biome, files that are ignored, don't have an extension or have an extension that Biome can't evaluate are excluded by this list. + The **fixed** files are those files that were handled by Biome and *changed*. Files that stays the same after the process are excluded from this list. + + ```shell + VERBOSE โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” + + โ„น Files processed: + + - biome/biome.json + - biome/packages/@biomejs/cli-win32-arm64/package.json + - biome/packages/tailwindcss-config-analyzer/package.json + + VERBOSE โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” + + โ„น Files fixed: + + - biome/biome/packages/tailwindcss-config-analyzer/src/generate-tailwind-preset.ts + ``` + + Contributed by @ematipico + +- Allow passing `nursery` to the `--only` and `--skip` filters. + + The `--only` option allows you to run a given rule or rule group. + The `--skip` option allows you to skip the execution of a given group or a given rule. + + Previously, it was not possible to pass `nursery`. + This restriction is now removed, as it may make sense to skip the nursery rules that a project has enabled. + + Contributed by @Conaclos + +- The CLI now returns an error code when calling a command in `stdin` mode, and the contents of the files aren't fixed. For example, the following example will result in an error code of `1` because the `lint` command triggers some lint rules: + + ```shell + echo "let x = 1" | biome lint --stdin-file-path=stdin.js + ``` + + Contributed by @ematipico + +#### Bug fixes + +- `biome lint --write` now takes `--only` and `--skip` into account ([#3470](https://github.com/biomejs/biome/issues/3470)). Contributed by @Conaclos + +- Fix [#3368](https://github.com/biomejs/biome/issues/3368), now the reporter `github` tracks the diagnostics that belong to formatting and organize imports. Contributed by @ematipico + +- Fix [#3545](https://github.com/biomejs/biome/issues/3545), display a warning, 'Avoid using unnecessary Fragment,' when a Fragment contains only one child element that is placed on a new line. Contributed by @satojin219 + +- Migrating from Prettier or ESLint no longer overwrite the `overrides` field from the configuration ([#3544](https://github.com/biomejs/biome/issues/3544)). Contributed by @Conaclos + +- Fix JSX expressions for `noAriaHiddenOnFocusable` ([#3708](https://github.com/biomejs/biome/pull/3708)). Contributed by @anthonyshew + +- Fix edge case for `` elements that use `role="img"` ([#3728](https://github.com/biomejs/biome/pull/3728)). Contributed by @anthonyshew + +- Fix [#3633](https://github.com/biomejs/biome/issues/3633), where diagnostics where incorrectly printed if the code has errors. Contributed by @ematipico + +- Allow `aria-label` on heading to prevent `useHeadingContent` diagnostic ([#3767](https://github.com/biomejs/biome/pull/3767)). Contributed by @anthonyshew + +- Fix edge case [#3791](https://github.com/biomejs/biome/issues/3791) for rule `noFocusedTests` being used with non-string-like expressions ([#3793](https://github.com/biomejs/biome/pull/3793)). Contributed by @h-a-n-a + +### Configuration + +- Add support for loading configuration from `.editorconfig` files ([#1724](https://github.com/biomejs/biome/issues/1724)). + + Configuration supplied in `.editorconfig` will be overridden by the configuration in `biome.json`. Support is disabled by default and can be enabled by adding the following to your formatter configuration in `biome.json`: + + ```json + { + "formatter": { + "useEditorconfig": true + } + } + ``` + + Contributed by @dyc3 + +- `overrides` from an extended configuration is now merged with the `overrides` of the extension. + + Given the following shared configuration `biome.shared.json`: + + ```json5 + { + "overrides": [ + { + "include": ["**/*.json"], + // ... + } + ] + } + ``` + + and the following configuration: + + ```json5 + { + "extends": ["./biome.shared.json"], + "overrides": [ + { + "include": ["**/*.ts"], + // ... + } + ] + } + ``` + + Previously, the `overrides` from `biome.shared.json` was overwritten. + It is now merged and results in the following configuration: + + ```json5 + { + "extends": ["./biome.shared.json"], + "overrides": [ + { + "include": ["**/*.json"], + // ... + }, + { + "include": ["**/*.ts"], + // ... + } + ] + } + ``` + + Contributed by @Conaclos + +### Editors + +- Fix [#3577](https://github.com/biomejs/biome/issues/3577), where the update of the configuration file was resulting in the creation of a new internal project. Contributed by @ematipico + +- Fix [#3696](https://github.com/biomejs/biome/issues/3696), where `biome.jsonc` was incorrectly parsed with incorrect options. Contributed by @ematipico + +### Formatter + +- The CSS formatter is enabled by default. Which means that you don't need to opt-in anymore using the configuration file `biome.json`: + + ```diff + { + - "css": { + - "formatter": { + - "enabled": true + - } + - } + } + ``` + + Contributed by @ematipico + +- Add parentheses for nullcoalescing in ternaries. + + This change aligns on [Prettier 3.3.3](https://github.com/prettier/prettier/blob/main/CHANGELOG.md#333). + This adds clarity to operator precedence. + + ```diff + - foo ? bar ?? foo : baz; + + foo ? (bar ?? foo) : baz; + ``` + + Contributed by @Conaclos + +- Keep the parentheses around `infer ... extends` declarations in type unions and type intersections ([#3419](https://github.com/biomejs/biome/issues/3419)). Contributed by @Conaclos + +- Keep parentheses around a `yield` expression inside a type assertion. + + Previously, Biome removed parentheses around some expressions that require them inside a type assertion. + For example, in the following code, Biome now preserves the parentheses. + + ```ts + function* f() { + return (yield 0); + } + ``` + + Contributed by @Conaclos + +- Remove parentheses around expressions that don't need them inside a decorator. + + Biome now matches Prettier in the following cases: + + ```diff + class { + - @(decorator) + + @decorator + method() {} + }, + class { + - @(decorator()) + + @decorator() + method() {} + }, + class { + @(decorator?.()) + method() {} + }, + ``` + + Contributed by @Conaclos + +- Keep parentheses around objects preceded with a `@satisfies` comment. + + In the following example, parentheses are no longer removed. + + ```ts + export const PROPS = /** @satisfies {Record} */ ({ + prop: 0, + }); + ``` + + Contributed by @Conaclos + +### Linter + +#### Promoted rules + +New rules are incubated in the nursery group. +Once stable, we promote them to a stable group. + +The following CSS rules are promoted: + +- [a11y/useGenericFontNames](https://biomejs.dev/linter/rules/use-generic-font-names/) +- [correctness/noInvalidDirectionInLinearGradient](https://biomejs.dev/linter/rules/no-invalid-direction-in-linear-gradient/) +- [correctness/noInvalidGridAreas](https://biomejs.dev/linter/rules/no-invalid-grid-areas/) +- [correctness/noInvalidPositionAtImportRule](https://biomejs.dev/linter/rules/no-invalid-position-at-import-rule/) +- [correctness/noUnknownFunction](https://biomejs.dev/linter/rules/no-unknown-function/) +- [correctness/noUnknownMediaFeatureName](https://biomejs.dev/linter/rules/no-unknown-media-feature-name/) +- [correctness/noUnknownProperty](https://biomejs.dev/linter/rules/no-unknown-property/) +- [correctness/noUnknownUnit](https://biomejs.dev/linter/rules/no-unknown-unit/) +- [correctness/noUnmatchableAnbSelector](https://biomejs.dev/linter/rules/no-unmatchable-anb-selector/) +- [suspicious/noDuplicateAtImportRules](https://biomejs.dev/linter/rules/no-duplicate-at-import-rules/) +- [suspicious/noDuplicateFontNames](https://biomejs.dev/linter/rules/no-duplicate-font-names/) +- [suspicious/noDuplicateSelectorsKeyframeBlock](https://biomejs.dev/linter/rules/no-duplicate-selectors-keyframe-block/) +- [suspicious/noEmptyBlock](https://biomejs.dev/linter/rules/no-empty-block/) +- [suspicious/noImportantInKeyframe](https://biomejs.dev/linter/rules/no-important-in-keyframe/) +- [suspicious/noShorthandPropertyOverrides](https://biomejs.dev/linter/rules/no-shorthand-property-overrides/) + +The following JavaScript rules are promoted: + +- [a11y/noLabelWithoutControl](https://biomejs.dev/linter/rules/no-label-without-control/) +- [a11y/useFocusableInteractive](https://biomejs.dev/linter/rules/use-focusable-interactive/) +- [accessibility/useSemanticElements](https://biomejs.dev/linter/rules/use-semantic-elements/) +- [complexity/noUselessStringConcat](https://biomejs.dev/linter/rules/no-useless-string-concat/) +- [complexity/noUselessUndefinedInitialization](https://biomejs.dev/linter/rules/no-useless-undefined-initialization/) +- [complexity/useDateNow](https://biomejs.dev/linter/rules/use-date-now/) +- [correctness/noUndeclaredDependencies](https://biomejs.dev/linter/rules/no-undeclared-dependencies/) +- [correctness/noInvalidBuiltinInstantiation](https://biomejs.dev/linter/rules/no-invalid-builtin-instantiation/) +- [correctness/noUnusedFunctionParameters](https://biomejs.dev/linter/rules/no-unused-function-parameters/) +- [correctness/useImportExtensions](https://biomejs.dev/linter/rules/use-import-extensions/) +- [performance/useTopLevelRegex](https://biomejs.dev/linter/rules/use-top-level-regex/) +- [style/noDoneCallback](https://biomejs.dev/linter/rules/no-done-callback/) +- [style/noYodaExpression](https://biomejs.dev/linter/rules/no-yoda-expression/) +- [style/useConsistentBuiltinInstantiation](https://biomejs.dev/linter/rules/use-consistent-builtin-instantiation/) +- [style/useDefaultSwitchClause](https://biomejs.dev/linter/rules/use-default-switch-clause/) +- [style/useExplicitLengthCheck](https://biomejs.dev/linter/rules/use-explicit-length-check/) +- [style/useThrowNewError](https://biomejs.dev/linter/rules/use-throw-new-error/) +- [style/useThrowOnlyError](https://biomejs.dev/linter/rules/use-throw-only-error/) +- [suspicious/noConsole](https://biomejs.dev/linter/rules/no-console/) +- [suspicious/noEvolvingTypes](https://biomejs.dev/linter/rules/no-evolving-types/) +- [suspicious/noMisplacedAssertion](https://biomejs.dev/linter/rules/no-misplaced-assertion/) +- [suspicious/noReactSpecificProps](https://biomejs.dev/linter/rules/no-react-specific-props/) +- [suspicious/useErrorMessage](https://biomejs.dev/linter/rules/use-error-message/) +- [suspicious/useNumberToFixedDigitsArgument](https://biomejs.dev/linter/rules/use-number-to-fixed-digits-argument/) + +#### Deprecated rules + +- `correctness/noInvalidNewBuiltin` is deprecated. Use [correctness/noInvalidBuiltinInstantiation](https://biomejs.dev/linter/rules/no-invalid-builtin-instantiation/) instead. +- `style/useSingleCaseStatement` is deprecated. Use [correctness/noSwitchDeclarations](https://biomejs.dev/linter/rules/no-switch-declarations/) instead. +- `suspicious/noConsoleLog` is deprecated. Use [suspicious/noConsole](https://biomejs.dev/linter/rules/no-console/) instead. + +#### New features + +- Implement [css suppression action](https://github.com/biomejs/biome/issues/3278). Contributed by @togami2864 + +- Add support for GraphQL linting. Contributed by @ematipico + +- Add [nursery/noCommonJs](https://biomejs.dev/linter/rules/no-common-js/). Contributed by @minht11 + +- Add [nursery/noDuplicateCustomProperties](https://biomejs.dev/linter/rules/no-duplicate-custom-properties/). Contributed by @chansuke + +- Add [nursery/noEnum](https://biomejs.dev/linter/rules/no-enum/). Contributed by @nickfla1 + +- Add [nursery/noDynamicNamespaceImportAccess](https://biomejs.dev/linter/no-dynamic-namespace-import-access/). Contributed by @minht11 + +- Add [nursery/noIrregularWhitespace](https://biomejs.dev/linter/rules/no-irregular-whitespace). Contributed by @michellocana + +- Add [nursery/noRestrictedTypes](https://biomejs.dev/linter/no-restricted-types/). Contributed by @minht11 + +- Add [nursery/noSecrets](https://biomejs.dev/linter/rules/no-secrets/). Contributed by @SaadBazaz + +- Add [nursery/noUselessEscapeInRegex](https://biomejs.dev/linter/rules/no-useless-escape-in-regex/). Contributed by @Conaclos + +- Add [nursery/noValueAtRule](https://biomejs.dev/linter/rules/no-value-at-rule/). Contributed by @rishabh3112 + +- Add [nursery/useAriaPropsSupportedByRole](https://biomejs.dev/linter/rules/use-aria-props-supported-by-role/). Contributed by @ryo-ebata + +- Add [nursery/useConsistentMemberAccessibility](https://biomejs.dev/linter/rules/use-consistent-member-accessibility/). Contributed by @seitarof + +- Add [nursery/useStrictMode](https://biomejs.dev/linter/rules/use-strict-mode/). Contributed by @ematipico + +- Add [nursery/useTrimStartEnd](https://biomejs.dev/linter/rules/use-trim-start-end/). Contributed by @chansuke + +- Add [nursery/noIrreguluarWhitespace](https://biomejs.dev/linter/rules/no-irreguluar-whitespace/). Contributed by @DerTimonius + +#### Enhancements + +- Rename `nursery/noUnknownSelectorPseudoElement` to `nursery/noUnknownPseudoElement`. Contributed by @togami2864 + +- The CSS linter is now enabled by default. Which means that you don't need to opt-in anymore using the configuration file `biome.json`: + + ```diff + { + - "css": { + - "linter": { + - "enabled": true + - } + - } + } + ``` + + Contributed by @ematipico + +- The JavaScript linter recognizes TypeScript 5.5 and 5.6 globals. Contributed by @Conaclos + +- [noBlankTarget](https://biomejs.dev/linter/rules/no-blank-target/) now supports an array of allowed domains. + + The following configuration allows `example.com` and `example.org` as blank targets. + + ```json + "linter": { + "rules": { + "a11y": { + "noBlankTarget": { + "level": "error", + "options": { + "allowDomains": ["example.com", "example.org"] + } + } + } + } + } + ``` + + Contributed by @Jayllyz + +- [noConsole](https://biomejs.dev/linter/rules/no-console/) now accepts an option that specifies some allowed calls on `console`. Contributed by @Conaclos + +- Add an `ignoreNull` option for [noDoubleEquals](https://biomejs.dev/linter/rules/no-double-equals/). + + By default the rule allows loose comparisons against `null`. + The option `ignoreNull` can be set to `false` for reporting loose comparison against `null`. + + Contributed by @peaBerberian. + +- [noDuplicateObjectKeys](https://biomejs.dev/linter/rules/no-duplicate-object-keys/) now works for JSON and JSONC files. Contributed by @ematipico + +- [noInvalidUseBeforeDeclaration](https://biomejs.dev/linter/rules/no-invalid-use-before-declaration) now reports direct use of an enum member before its declaration. + + In the following code, `A` is reported as use before its declaration. + + ```ts + enum E { + B = A << 1, + A = 1, + } + ``` + + Contributed by @Conaclos + +- [noNodejsModules](https://biomejs.dev/linter/rules/no-nodejs-modules/) now ignores imports of a package which has the same name as a Node.js module. Contributed by @Conaclos + +- [noNodejsModules](https://biomejs.dev/linter/rules/no-nodejs-modules/) now ignores type-only imports ([#1674](https://github.com/biomejs/biome/issues/1674)). + + The rule no longer reports type-only imports such as: + + ```ts + import type assert from "assert"; + import type * as assert2 from "assert"; + ``` + + Contributed by @Conaclos + +- [noRedundantUseStrict](https://biomejs.dev/linter/rules/no-redundant-use-strict/) no longer reports `"use strict"` directives when the `package.json` marks explicitly the file as a script using the field `"type": "commonjs"`. Contributed by @ematipico + +- [noStaticOnlyClass](https://biomejs.dev/linter/rules/no-static-only-class/) no longer reports a class that extends another class ([#3612](https://github.com/biomejs/biome/issues/3612)). Contributed by @errmayank + +- [noUndeclaredVariables](https://biomejs.dev/linter/rules/no-undeclared-variables/) no longer reports a direct reference to an enum member ([#2974](https://github.com/biomejs/biome/issues/2974)). + + In the following code, the `A` reference is no longer reported as an undeclared variable. + + ```ts + enum E { + A = 1, + B = A << 1, + } + ``` + + Contributed by @Conaclos + +- [noUndeclaredVariables](https://biomejs.dev/linter/rules/no-undeclared-variables/) recognized Svelte 5 runes in Svelte components and svelte files. + + Svelte 5 introduced runes. + The rule now recognizes Svelte 5 runes in files ending with the `.svelte`, `.svelte.js` or `.svelte.ts` extensions. + + Contributed by @Conaclos + +- [noUnusedVariables](https://biomejs.dev/linter/rules/no-unused-variables/) now checks TypeScript declaration files. + + This allows to report a type that is unused because it isn't exported. + Global declarations files (declarations files without exports and imports) are still ignored. + + Contributed by @Conaclos + +- [useFilenamingConvention](https://biomejs.dev/linter/rules/use-filenaming-convention) now supports [unicase](https://en.wikipedia.org/wiki/Unicase) letters. + + [unicase](https://en.wikipedia.org/wiki/Unicase) letters have a single case: they are neither uppercase nor lowercase. + Biome now accepts filenames in unicase. + For example, the filename `์•ˆ๋…•ํ•˜์„ธ์š”` is now accepted. + + We still reject a name that mixes unicase characters with lowercase or uppercase characters. + For example, the filename `A์•ˆ๋…•ํ•˜์„ธ์š”` is rejected. + + This change also fixes [#3353](https://github.com/biomejs/biome/issues/3353). + Filenames consisting only of numbers are now accepted. + + Contributed by @Conaclos + +- [useFilenamingConvention](https://biomejs.dev/linter/rules/use-filenaming-convention) now supports Next.js/Nuxt/Astro dynamic routes ([#3465](https://github.com/biomejs/biome/issues/3465)). + + [Next.js](https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes#catch-all-segments), [SolidStart](https://docs.solidjs.com/solid-start/building-your-application/routing#renaming-index), [Nuxt](https://nuxt.com/docs/guide/directory-structure/server#catch-all-route), and [Astro](https://docs.astro.build/en/guides/routing/#rest-parameters) support dynamic routes such as `[...slug].js` and `[[...slug]].js`. + + Biome now recognizes this syntax. `slug` must contain only alphanumeric characters. + + Contributed by @Conaclos + +- [useExportType](https://biomejs.dev/linter/rules/use-export-type/) no longer reports empty `export` ([#3535](https://github.com/biomejs/biome/issues/3535)). + + An empty `export {}` allows you to force TypeScript to consider a file with no imports and exports as an EcmaScript module. + While `export type {}` is valid, it is more common to use `export {}`. + Users may find it confusing that the linter asks them to convert it to `export type {}`. + Also, a bundler should be able to remove `export {}` as well as `export type {}`. + So it is not so useful to report `export {}`. + + Contributed by @Conaclos + +#### Bug fixes + +- [noControlCharactersInRegex](https://www.biomejs.dev/linter/rules/no-control-characters-in-regex) now corretcly handle `\u` escapes in unicode-aware regexes. + + Previously, the rule didn't consider regex with the `v` flags as unicode-aware regexes. + Moreover, `\uhhhh` was not handled in unicode-aware regexes. + + Contributed by @Conaclos + +- [noControlCharactersInRegex](https://www.biomejs.dev/linter/rules/no-control-characters-in-regex) now reports control characters and escape sequence of control characters in string regexes. Contributed by @Conaclos + +- `noExcessiveNestedTestSuites`: fix an edge case where the rule would alert on heavily nested zod schemas. Contributed by @dyc3 + +- `noExtraNonNullAssertion` no longer reports a single non-null assertion enclosed in parentheses ([#3352](https://github.com/biomejs/biome/issues/3352)). Contributed by @Conaclos + +- [noMultipleSpacesInRegularExpressionLiterals](https://biomejs.dev/linter/rules/no-multiple-spaces-in-regular-expression-literals/) now correctly provides a code fix when Unicode characters are used. Contributed by @Conaclos + +- [noRedeclare](https://biomejs.dev/linter/rules/no-redeclare/) no longer report redeclartions for lexically scoped function declarations [#3664](https://github.com/biomejs/biome/issues/3664). + + In JavaScript strict mode, function declarations are lexically scoped: + they cannot be accessed outside the block where they are declared. + + In non-strict mode, function declarations are hoisted to the top of the enclosing function or global scope. + + Previously Biome always hoisted function declarations. + It now takes into account whether the code is in strict or non strict mode. + + Contributed by @Conaclos + +- [noUndeclaredDependencies](https://biomejs.dev/linter/rules/no-undeclared-dependencies/) now ignores self package imports. + + Given teh following `package.json`: + + ```json + { + "name": "my-package", + "main": "index.js" + } + ``` + + The following import is no longer reported by the rule: + + ```js + import * as mod from "my-package"; + ``` + + Contributed by @Conaclos + +- Fix [[#3149](https://github.com/biomejs/biome/issues/3149)] crashes that occurred when applying the `noUselessFragments` unsafe fixes in certain scenarios. Contributed by @unvalley + +- [noRedeclare](https://biomejs.dev/linter/rules/no-redeclare/) no longer reports a variable named as the function expression where it is declared. Contributed by @Conaclos + +- `useAdjacentOverloadSignatures` no longer reports a `#private` class member and a public class member that share the same name ([#3309](https://github.com/biomejs/biome/issues/3309)). + + The following code is no longer reported: + + ```js + class C { + #f() {} + g() {} + f() {} + } + ``` + + Contributed by @Conaclos + +- [useAltText](https://www.biomejs.dev/linter/rules/use-alt-text) n olonger requests alt text for elements hidden from assistive technologies ([#3316](https://github.com/biomejs/biome/issues/3316)). Contributed by @robintown + +- [useNamingConvention](https://biomejs.dev/linter/rules/use-naming-convention/) now accepts applying custom convention on abstract classes. Contributed by @Conaclos + +- [useNamingConvention](https://biomejs.dev/linter/rules/use-naming-convention/) no longer suggests an empty fix when a name doesn't match strict Pascal case ([#3561](https://github.com/biomejs/biome/issues/3561)). + + Previously the following code led `useNamingConvention` to suggest an empty fix. + The rule no longer provides a fix for this case. + + ```ts + type AAb = any + ``` + + Contributed by @Conaclos + +- [useNamingConvention](https://biomejs.dev/linter/rules/use-naming-convention/) no longer provides fixes for global TypeScript declaration files. + + Global TypeScript declaration files have no epxorts and no imports. + All the declared types are available in all files of the project. + Thus, it is not safe to propose renaming only in the declaration file. + + Contributed by @Conaclos + +- [useSortedClasses](https://biomejs.dev/linter/rules/use-sorted-classes/) lint error with Template literals ([#3394](https://github.com/biomejs/biome/issues/3394)). Contributed by @hangaoke1 + +- [useValidAriaValues](https://biomejs.dev/linter/rules/use-valid-aria-values/) now correctly check property types ([3748](https://github.com/biomejs/biome/issues/3748)). + + Properties that expect a string now accept arbitrary text. + An identifiers can now be made up of any characters except ASCII whitespace. + An identifier list can now be separated by any ASCII whitespace. + + Contributed by @Conaclos + +### Parser + +#### Enhancements + +- The JSON parser now allows comments in `turbo.json` and `jest.config.json`. Contributed by @Netail and @Conaclos + +- The JSON parser now allows comments in files with the `.json` extension under the `.vscode` and `.zed` directories. + + Biome recognizes are well known JSON files that allows comments and/or trailing commas. + Previously, Biome did not recognize JSON files under the `.vscode` and the `.zed` directories as JSON files that allow comments. + You had to configure Biome to recognize them: + + ```json + { + "overrides": [ + { + "include": ["**/.vscode/*.json", "**/.zed/*.json"], + "json": { "parser": { "allowComments": true } } + } + ] + } + ``` + + This override is no longer needed! + Note that JSON files under the `.vscode` and the `.zed` directories don't accept trailing commas. + + Contributed by @Conaclos + +#### Bug fixes + +- The CSS parser now accepts emoji in identifiers ([3627](https://github.com/biomejs/biome/issues/3627)). + + The following code is now correctly parsed: + + ```css + p { + --๐Ÿฅ”-color: red; + color: var(--๐Ÿฅ”-color); + } + ``` + + Contributed by @Conaclos + +- Fix [#3287](https://github.com/biomejs/biome/issues/3287) nested selectors with pseudo-classes. Contributed by @denbezrukov + +- Fix [#3349](https://github.com/biomejs/biome/issues/3349) allow CSS multiple ampersand support. Contributed by @denbezrukov + + ```css + .class { + && { + color: red; + } + } + ``` + +- Fix [#3410](https://github.com/biomejs/biome/issues/3410) by correctly parsing break statements containing keywords. + ```js + out: while (true) { + break out; + } + ``` + Contributed by @ah-yu + +- Fix [#3464](https://github.com/biomejs/biome/issues/3464) by enabling JSX in `.vue` files that use the `lang='jsx'` or `lang='tsx'` attribute. Contributed by @ematipico + + ## v1.8.3 (2024-06-27) ### CLI @@ -45,6 +717,10 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b - Add `nursery/useDeprecatedReason` rule. Contributed by @vohoanglong0107. - Add [nursery/noExportedImports](https://biomejs.dev/linter/rules/no-exported-imports/). Contributed by @Conaclos +#### Enhancements + +- Implement [suggestedExtensions option](https://github.com/biomejs/biome/pull/3274) for `useImportExtensions` rule. Contributed by @drdaemos + #### Bug fixes - `useConsistentArrayType` and `useShorthandArrayType` now ignore `Array` in the `extends` and `implements` clauses. Fix [#3247](https://github.com/biomejs/biome/issues/3247). Contributed by @Conaclos @@ -147,8 +823,16 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b #### New features +- Add [nursery/noSubstr](https://biomejs.dev/linter/rules/no-substr/). Contributed by @chansuke + +- Add [nursery/useConsistentCurlyBraces](https://biomejs.dev/linter/rules/use-consistent-curly-braces/). Contributed by @dyc3 + - Add [nursery/useValidAutocomplete](https://biomejs.dev/linter/rules/use-valid-autocomplete/). Contributed by @unvalley +#### Enhancements + +- Add a code action for [noUselessCatch](https://biomejs.dev/linter/rules/no-useless-catch/). Contributed by @chansuke + #### Bug fixes - Add [nursery/noShorthandPropertyOverrides](https://biomejs.dev/linter/rules/no-shorthand-property-overrides). [#2958](https://github.com/biomejs/biome/issues/2958) Contributed by @neokidev @@ -223,6 +907,10 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b ### Linter +#### New features + +- Add [noUnknownPseudoClass](https://biomejs.dev/linter/rules/no-unknown-pseudo-class/). Contributed by @tunamaguro + #### Bug fixes - The `noEmptyBlock` css lint rule now treats empty blocks containing comments as valid ones. Contributed by @Sec-ant @@ -320,7 +1008,7 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b biome lint --skip=style --skip=suspicious/noExplicitAny ``` - You can also use `--only` and `--skip` together. `--skip` oevrrides `--only`. + You can also use `--only` and `--skip` together. `--skip` overrides `--only`. The following command executes only the rules from the `style` group, but the `style/useNamingConvention` rule. ```shell @@ -623,7 +1311,7 @@ New rules are incubated in the nursery group. Once stable, we promote them to a - Add [nursery/noUnknownFunction](https://biomejs.dev/linter/rules/no-unknown-function). [#2570](https://github.com/biomejs/biome/pull/2570) Contributed by @neokidev - Add [nursery/noUnknownMediaFeatureName](https://biomejs.dev/linter/rules/no-unknown-media-feature-name). [#2751](https://github.com/biomejs/biome/issues/2751) Contributed by @Kazuhiro-Mimaki - Add [nursery/noUnknownProperty](https://biomejs.dev/linter/rules/no-unknown-property). [#2755](https://github.com/biomejs/biome/pull/2755) Contributed by @chansuke -- Add [nursery/noUnknownSelectorPseudoElement](https://biomejs.dev/linter/rules/no-unknown-selector-pseudo-element). [#2655](https://github.com/biomejs/biome/issues/2655) Contributed by @keita-hino +- Add [nursery/noUnknownPseudoElement](https://biomejs.dev/linter/rules/no-unknown-selector-pseudo-element). [#2655](https://github.com/biomejs/biome/issues/2655) Contributed by @keita-hino - Add [nursery/noUnknownUnit](https://biomejs.dev/linter/rules/no-unknown-unit). [#2535](https://github.com/biomejs/biome/issues/2535) Contributed by @neokidev - Add [nursery/noUnmatchableAnbSelector](https://biomejs.dev/linter/rules/no-unmatchable-anb-selector). [#2706](https://github.com/biomejs/biome/issues/2706) Contributed by @togami2864 - Add [nursery/useGenericFontNames](https://biomejs.dev/linter/rules/use-generic-font-names). [#2573](https://github.com/biomejs/biome/pull/2573) Contributed by @togami2864 diff --git a/src/content/docs/internals/language-support.mdx b/src/content/docs/internals/language-support.mdx index 2b788e094..90a244214 100644 --- a/src/content/docs/internals/language-support.mdx +++ b/src/content/docs/internals/language-support.mdx @@ -17,25 +17,25 @@ Legend: | TSX | โœ… | โœ… | โœ… | | JSON | โœ… | โœ… | โœ… | | JSONC | โœ… | โœ… | โœ… | -| HTML | โŒ›๏ธ | ๐Ÿšซ | ๐Ÿšซ | +| HTML | โŒ›๏ธ | โŒ›๏ธ | ๐Ÿšซ | | [Vue](#html-super-languages-support) | โš ๏ธ | โš ๏ธ | โš ๏ธ | | [Svelte](#html-super-languages-support) | โš ๏ธ | โš ๏ธ | โš ๏ธ | | [Astro](#html-super-languages-support) | โš ๏ธ | โš ๏ธ | โš ๏ธ | -| CSS | โœ…๏ธ | โŒ›๏ธ | โŒ›๏ธ | +| CSS | โœ…๏ธ | โœ…๏ธ | โœ…๏ธ | | [YAML](https://github.com/biomejs/biome/issues/2365) | โŒ›๏ธ | ๐Ÿšซ | ๐Ÿšซ | -| [GraphQL](https://github.com/biomejs/biome/issues/1927) | โŒ›๏ธ | ๐Ÿšซ | ๐Ÿšซ | -| Markdown | ๐Ÿšซ | ๐Ÿšซ | ๐Ÿšซ | +| [GraphQL](https://github.com/biomejs/biome/issues/1927) | โœ…๏ธ | โœ…๏ธ | โœ…๏ธ +| Markdown | โŒ›๏ธ | ๐Ÿšซ | ๐Ÿšซ | ## JavaScript support -Biome supports the ES2023 version of the language. +Biome supports the ES2024 version of the language. Biome supports only the official syntax. The team starts development of the new syntax when a proposal reaches [Stage 3](https://github.com/tc39/proposals#stage-3). ## TypeScript support -Biome supports TypeScript version 5.2. +Biome supports TypeScript version 5.6. ## JSONC Support diff --git a/src/content/docs/ja/internals/language-support.mdx b/src/content/docs/ja/internals/language-support.mdx index 9035d22b5..3a56f2589 100644 --- a/src/content/docs/ja/internals/language-support.mdx +++ b/src/content/docs/ja/internals/language-support.mdx @@ -33,7 +33,7 @@ Biomeใฏใ€JavaScript๏ผˆES2023๏ผ‰ใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใพใ™ใ€‚ ## TypeScriptใฎใ‚ตใƒใƒผใƒˆ -Biomeใฏใ€TypeScriptใƒใƒผใ‚ธใƒงใƒณ5.2ใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใพใ™ใ€‚ +Biomeใฏใ€TypeScriptใƒใƒผใ‚ธใƒงใƒณ5.6ใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใพใ™ใ€‚ ## JSONCใ‚ตใƒใƒผใƒˆ diff --git a/src/content/docs/pt-br/internals/language-support.mdx b/src/content/docs/pt-br/internals/language-support.mdx index b90ab67e4..35a74d489 100644 --- a/src/content/docs/pt-br/internals/language-support.mdx +++ b/src/content/docs/pt-br/internals/language-support.mdx @@ -28,7 +28,7 @@ O Biome suporta apenas a sรญntaxe oficial. O time inicia o desenvolvimento de um ## Suporte a TypeScript -O Biome suporta a versรฃo 5.2 do TypeScript. +O Biome suporta a versรฃo 5.6 do TypeScript. ## Suporte a super linguagens no HTML diff --git a/src/content/docs/reference/cli.mdx b/src/content/docs/reference/cli.mdx index 935c0cb49..b917a920f 100644 --- a/src/content/docs/reference/cli.mdx +++ b/src/content/docs/reference/cli.mdx @@ -23,6 +23,7 @@ description: Available commands and arguments in the Biome CLI. * [`biome migrate`โ†ด](#biome-migrate) * [`biome migrate prettier`โ†ด](#biome-migrate-prettier) * [`biome migrate eslint`โ†ด](#biome-migrate-eslint) + * [`biome search`โ†ด](#biome-search) * [`biome explain`โ†ด](#biome-explain) * [`biome clean`โ†ด](#biome-clean) @@ -42,13 +43,13 @@ Biome official CLI. Use it to check the health of your project or run it to chec **Available commands:** - **`version`** — - Shows the Biome version information and quit + Shows the Biome version information and quit. - **`rage`** — - Prints information for debugging + Prints information for debugging. - **`start`** — - Start the Biome daemon server process + Starts the Biome daemon server process. - **`stop`** — - Stop the Biome daemon server process + Stops the Biome daemon server process. - **`check`** — Runs formatter, linter and import sorting to the requested files. - **`lint`** — @@ -60,18 +61,20 @@ Biome official CLI. Use it to check the health of your project or run it to chec - **`init`** — Bootstraps a new biome project. Creates a configuration file with some defaults. - **`lsp-proxy`** — - Acts as a server for the Language Server Protocol over stdin/stdout + Acts as a server for the Language Server Protocol over stdin/stdout. - **`migrate`** — - It updates the configuration when there are breaking changes + Updates the configuration when there are breaking changes. +- **`search`** — + [EXPERIMENTAL] Searches for Grit patterns across a project. - **`explain`** — - A command to retrieve the documentation of various aspects of the CLI. + Shows documentation of various aspects of the CLI. - **`clean`** — - Clean the logs emitted by the daemon + Cleans the logs emitted by the daemon. ## biome version -Shows the Biome version information and quit +Shows the Biome version information and quit. **Usage**: **`biome`** **`version`** @@ -81,11 +84,11 @@ Shows the Biome version information and quit - **` --use-server`** — Connect to a running instance of the Biome daemon server. - **` --verbose`** — - Print additional diagnostics, and some diagnostics show more information. + Print additional diagnostics, and some diagnostics show more information. Also, print out what files were processed and which ones were modified. - **` --config-path`**=_`PATH`_ — Set the file path to the configuration file, or the directory path to find `biome.json` or `biome.jsonc`. If used, it disables the default configuration file resolution. -- **` --max-diagnostics`**=_`NUMBER`_ — - Cap the amount of diagnostics displayed. +- **` --max-diagnostics`**=_`>`_ — + Cap the amount of diagnostics displayed. When `none` is provided, the limit is lifted. [default: 20] - **` --skip-errors`** — @@ -94,7 +97,7 @@ Shows the Biome version information and quit Silence errors that would be emitted in case no files were processed during the execution of the command. - **` --error-on-warnings`** — Tell Biome to exit with an error code if some diagnostics emit warnings. -- **` --reporter`**=_``_ — +- **` --reporter`**=_``_ — Allows to change how diagnostics and summary are reported. - **` --log-level`**=_``_ — The level of logging. In order, from the most verbose to the least verbose: debug, info, warn, error. @@ -120,7 +123,7 @@ Shows the Biome version information and quit ## biome rage -Prints information for debugging +Prints information for debugging. **Usage**: **`biome`** **`rage`** \[**`--daemon-logs`**\] \[**`--formatter`**\] \[**`--linter`**\] @@ -130,11 +133,11 @@ Prints information for debugging - **` --use-server`** — Connect to a running instance of the Biome daemon server. - **` --verbose`** — - Print additional diagnostics, and some diagnostics show more information. + Print additional diagnostics, and some diagnostics show more information. Also, print out what files were processed and which ones were modified. - **` --config-path`**=_`PATH`_ — Set the file path to the configuration file, or the directory path to find `biome.json` or `biome.jsonc`. If used, it disables the default configuration file resolution. -- **` --max-diagnostics`**=_`NUMBER`_ — - Cap the amount of diagnostics displayed. +- **` --max-diagnostics`**=_`>`_ — + Cap the amount of diagnostics displayed. When `none` is provided, the limit is lifted. [default: 20] - **` --skip-errors`** — @@ -143,7 +146,7 @@ Prints information for debugging Silence errors that would be emitted in case no files were processed during the execution of the command. - **` --error-on-warnings`** — Tell Biome to exit with an error code if some diagnostics emit warnings. -- **` --reporter`**=_``_ — +- **` --reporter`**=_``_ — Allows to change how diagnostics and summary are reported. - **` --log-level`**=_``_ — The level of logging. In order, from the most verbose to the least verbose: debug, info, warn, error. @@ -166,20 +169,30 @@ Prints information for debugging - **` --daemon-logs`** — Prints the Biome daemon server logs - **` --formatter`** — - Prints the Biome configuration that the applied formatter configuration + Prints the formatter options applied - **` --linter`** — - Prints the Biome configuration that the applied linter configuration + Prints the linter options applied - **`-h`**, **`--help`** — Prints help information ## biome start -Start the Biome daemon server process +Starts the Biome daemon server process. **Usage**: **`biome`** **`start`** \[**`--config-path`**=_`PATH`_\] **Available options:** +- **` --log-prefix-name`**=_`STRING`_ — + Allows to change the prefix applied to the file name of the logs. + + Uses environment variable **`BIOME_LOG_PREFIX_NAME`** + + [default: server.log] +- **` --log-path`**=_`PATH`_ — + Allows to change the folder where logs are stored. + + Uses environment variable **`BIOME_LOG_PATH`** - **` --config-path`**=_`PATH`_ — Allows to set a custom file path to the configuration file, or a custom directory path to find `biome.json` or `biome.jsonc` @@ -190,7 +203,7 @@ Start the Biome daemon server process ## biome stop -Stop the Biome daemon server process +Stops the Biome daemon server process. **Usage**: **`biome`** **`stop`** @@ -203,13 +216,13 @@ Stop the Biome daemon server process Runs formatter, linter and import sorting to the requested files. -**Usage**: **`biome`** **`check`** \[**`--write`**\] \[**`--unsafe`**\] \[**`--staged`**\] \[**`--changed`**\] \[**`--since`**=_`REF`_\] \[_`PATH`_\]... +**Usage**: **`biome`** **`check`** \[**`--write`**\] \[**`--unsafe`**\] \[**`--assists-enabled`**=_``_\] \[**`--staged`**\] \[**`--changed`**\] \[**`--since`**=_`REF`_\] \[_`PATH`_\]... **The configuration that is contained inside the file `biome.json`** -- **` --vcs-client-kind`**=_``_ — - The kind of client. - **` --vcs-enabled`**=_``_ — Whether Biome should integrate itself with the VCS client +- **` --vcs-client-kind`**=_``_ — + The kind of client. - **` --vcs-use-ignore-file`**=_``_ — Whether Biome should use the VCS ignore file. When [true], Biome will ignore the files specified in the ignore file. - **` --vcs-root`**=_`PATH`_ — @@ -222,6 +235,8 @@ Runs formatter, linter and import sorting to the requested files. The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reasons. Defaults to 1 MiB - **` --files-ignore-unknown`**=_``_ — Tells Biome to not emit diagnostics when handling files that doesn't know +- **` --use-editorconfig`**=_``_ — + Use any `.editorconfig` files to configure the formatter. Configuration in `biome.json` will override `.editorconfig` configuration. Default: false. - **` --indent-style`**=_``_ — The indent style. - **` --indent-size`**=_`NUMBER`_ — @@ -234,6 +249,8 @@ Runs formatter, linter and import sorting to the requested files. What's the max width of a line. Defaults to 80. - **` --attribute-position`**=_``_ — The attribute position style in HTMLish languages. By default auto. +- **` --bracket-spacing`**=_``_ — + Whether to insert spaces around brackets in object literals. Defaults to true. - **` --jsx-quote-style`**=_``_ — The type of quotes used in JSX. Defaults to double. - **` --quote-properties`**=_``_ — @@ -246,8 +263,6 @@ Runs formatter, linter and import sorting to the requested files. Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI. - **` --arrow-parentheses`**=_``_ — Whether to add non-necessary parentheses to arrow functions. Defaults to "always". -- **` --bracket-spacing`**=_``_ — - Whether to insert spaces around brackets in object literals. Defaults to true. - **` --bracket-same-line`**=_``_ — Whether to hug the closing bracket of multiline HTML/JSX tags to the end of the last line, rather than being alone on the following line. Defaults to false. - **` --javascript-formatter-enabled`**=_``_ — @@ -268,6 +283,8 @@ Runs formatter, linter and import sorting to the requested files. The attribute position style in jsx elements. Defaults to auto. - **` --javascript-linter-enabled`**=_``_ — Control the linter for JavaScript (and its super languages) files. +- **` --javascript-assists-enabled`**=_``_ — + Control the linter for JavaScript (and its super languages) files. - **` --json-formatter-enabled`**=_``_ — Control the formatter for JSON (and its super languages) files. - **` --json-formatter-indent-style`**=_``_ — @@ -284,6 +301,8 @@ Runs formatter, linter and import sorting to the requested files. Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "none". - **` --json-linter-enabled`**=_``_ — Control the linter for JSON (and its super languages) files. +- **` --json-assists-enabled`**=_``_ — + Control the linter for JSON (and its super languages) files. - **` --css-formatter-enabled`**=_``_ — Control the formatter for CSS (and its super languages) files. - **` --css-formatter-indent-style`**=_``_ — @@ -297,7 +316,25 @@ Runs formatter, linter and import sorting to the requested files. - **` --css-formatter-quote-style`**=_``_ — The type of quotes used in CSS code. Defaults to double. - **` --css-linter-enabled`**=_``_ — - Control the linter for CSS (and its super languages) files. + Control the linter for CSS files. +- **` --css-assists-enabled`**=_``_ — + Control the assists for CSS files. +- **` --graphql-formatter-enabled`**=_``_ — + Control the formatter for GraphQL files. +- **` --graphql-formatter-indent-style`**=_``_ — + The indent style applied to GraphQL files. +- **` --graphql-formatter-indent-width`**=_`NUMBER`_ — + The size of the indentation applied to GraphQL files. Default to 2. +- **` --graphql-formatter-line-ending`**=_``_ — + The type of line ending applied to GraphQL files. +- **` --graphql-formatter-line-width`**=_`NUMBER`_ — + What's the max width of a line applied to GraphQL files. Defaults to 80. +- **` --graphql-formatter-quote-style`**=_``_ — + The type of quotes used in GraphQL code. Defaults to double. +- **` --graphql-linter-enabled`**=_``_ — + Control the formatter for GraphQL files. +- **` --assists-enabled`**=_``_ — + Whether Biome should enable assists via LSP. @@ -307,11 +344,11 @@ Runs formatter, linter and import sorting to the requested files. - **` --use-server`** — Connect to a running instance of the Biome daemon server. - **` --verbose`** — - Print additional diagnostics, and some diagnostics show more information. + Print additional diagnostics, and some diagnostics show more information. Also, print out what files were processed and which ones were modified. - **` --config-path`**=_`PATH`_ — Set the file path to the configuration file, or the directory path to find `biome.json` or `biome.jsonc`. If used, it disables the default configuration file resolution. -- **` --max-diagnostics`**=_`NUMBER`_ — - Cap the amount of diagnostics displayed. +- **` --max-diagnostics`**=_`>`_ — + Cap the amount of diagnostics displayed. When `none` is provided, the limit is lifted. [default: 20] - **` --skip-errors`** — @@ -320,7 +357,7 @@ Runs formatter, linter and import sorting to the requested files. Silence errors that would be emitted in case no files were processed during the execution of the command. - **` --error-on-warnings`** — Tell Biome to exit with an error code if some diagnostics emit warnings. -- **` --reporter`**=_``_ — +- **` --reporter`**=_``_ — Allows to change how diagnostics and summary are reported. - **` --log-level`**=_``_ — The level of logging. In order, from the most verbose to the least verbose: debug, info, warn, error. @@ -362,6 +399,8 @@ Runs formatter, linter and import sorting to the requested files. Allow to enable or disable the linter check. - **` --organize-imports-enabled`**=_``_ — Allow to enable or disable the organize imports. +- **` --assists-enabled`**=_``_ — + Allow to enable or disable the assists. - **` --stdin-file-path`**=_`PATH`_ — Use this option when you want to format code piped from `stdin`, and print the output to `stdout`. @@ -369,11 +408,11 @@ Runs formatter, linter and import sorting to the requested files. Example: `echo 'let a;' | biome check --stdin-file-path=file.js` - **` --staged`** — - When set to true, only the files that have been staged (the ones prepared to be committed) will be linted. + When set to true, only the files that have been staged (the ones prepared to be committed) will be linted. This option should be used when working locally. - **` --changed`** — - When set to true, only the files that have been changed compared to your `defaultBranch` configuration will be linted. + When set to true, only the files that have been changed compared to your `defaultBranch` configuration will be linted. This option should be used in CI environments. - **` --since`**=_`REF`_ — - Use this to specify the base branch to compare against when you're using the --changed flag and the `defaultBranch` is not set in your biome.json + Use this to specify the base branch to compare against when you're using the --changed flag and the `defaultBranch` is not set in your `biome.json` - **`-h`**, **`--help`** — Prints help information @@ -385,10 +424,10 @@ Run various checks on a set of files. **Usage**: **`biome`** **`lint`** \[**`--write`**\] \[**`--unsafe`**\] \[**`--only`**=_``_\]... \[**`--skip`**=_``_\]... \[**`--staged`**\] \[**`--changed`**\] \[**`--since`**=_`REF`_\] \[_`PATH`_\]... **Set of properties to integrate Biome with a VCS software.** -- **` --vcs-client-kind`**=_``_ — - The kind of client. - **` --vcs-enabled`**=_``_ — Whether Biome should integrate itself with the VCS client +- **` --vcs-client-kind`**=_``_ — + The kind of client. - **` --vcs-use-ignore-file`**=_``_ — Whether Biome should use the VCS ignore file. When [true], Biome will ignore the files specified in the ignore file. - **` --vcs-root`**=_`PATH`_ — @@ -426,11 +465,11 @@ Run various checks on a set of files. - **` --use-server`** — Connect to a running instance of the Biome daemon server. - **` --verbose`** — - Print additional diagnostics, and some diagnostics show more information. + Print additional diagnostics, and some diagnostics show more information. Also, print out what files were processed and which ones were modified. - **` --config-path`**=_`PATH`_ — Set the file path to the configuration file, or the directory path to find `biome.json` or `biome.jsonc`. If used, it disables the default configuration file resolution. -- **` --max-diagnostics`**=_`NUMBER`_ — - Cap the amount of diagnostics displayed. +- **` --max-diagnostics`**=_`>`_ — + Cap the amount of diagnostics displayed. When `none` is provided, the limit is lifted. [default: 20] - **` --skip-errors`** — @@ -439,7 +478,7 @@ Run various checks on a set of files. Silence errors that would be emitted in case no files were processed during the execution of the command. - **` --error-on-warnings`** — Tell Biome to exit with an error code if some diagnostics emit warnings. -- **` --reporter`**=_``_ — +- **` --reporter`**=_``_ — Allows to change how diagnostics and summary are reported. - **` --log-level`**=_``_ — The level of logging. In order, from the most verbose to the least verbose: debug, info, warn, error. @@ -506,6 +545,8 @@ Run the formatter on a set of files. **Usage**: **`biome`** **`format`** \[**`--write`**\] \[**`--staged`**\] \[**`--changed`**\] \[**`--since`**=_`REF`_\] \[_`PATH`_\]... **Generic options applied to all files** +- **` --use-editorconfig`**=_``_ — + Use any `.editorconfig` files to configure the formatter. Configuration in `biome.json` will override `.editorconfig` configuration. Default: false. - **` --indent-style`**=_``_ — The indent style. - **` --indent-size`**=_`NUMBER`_ — @@ -518,6 +559,8 @@ Run the formatter on a set of files. What's the max width of a line. Defaults to 80. - **` --attribute-position`**=_``_ — The attribute position style in HTMLish languages. By default auto. +- **` --bracket-spacing`**=_``_ — + Whether to insert spaces around brackets in object literals. Defaults to true. @@ -534,8 +577,6 @@ Run the formatter on a set of files. Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI. - **` --arrow-parentheses`**=_``_ — Whether to add non-necessary parentheses to arrow functions. Defaults to "always". -- **` --bracket-spacing`**=_``_ — - Whether to insert spaces around brackets in object literals. Defaults to true. - **` --bracket-same-line`**=_``_ — Whether to hug the closing bracket of multiline HTML/JSX tags to the end of the last line, rather than being alone on the following line. Defaults to false. - **` --javascript-formatter-enabled`**=_``_ — @@ -554,14 +595,16 @@ Run the formatter on a set of files. The type of quotes used in JavaScript code. Defaults to double. - **` --javascript-attribute-position`**=_``_ — The attribute position style in jsx elements. Defaults to auto. +- **` --bracket-spacing`**=_``_ — + Whether to insert spaces around brackets in object literals. Defaults to true. **Set of properties to integrate Biome with a VCS software.** -- **` --vcs-client-kind`**=_``_ — - The kind of client. - **` --vcs-enabled`**=_``_ — Whether Biome should integrate itself with the VCS client +- **` --vcs-client-kind`**=_``_ — + The kind of client. - **` --vcs-use-ignore-file`**=_``_ — Whether Biome should use the VCS ignore file. When [true], Biome will ignore the files specified in the ignore file. - **` --vcs-root`**=_`PATH`_ — @@ -587,11 +630,11 @@ Run the formatter on a set of files. - **` --use-server`** — Connect to a running instance of the Biome daemon server. - **` --verbose`** — - Print additional diagnostics, and some diagnostics show more information. + Print additional diagnostics, and some diagnostics show more information. Also, print out what files were processed and which ones were modified. - **` --config-path`**=_`PATH`_ — Set the file path to the configuration file, or the directory path to find `biome.json` or `biome.jsonc`. If used, it disables the default configuration file resolution. -- **` --max-diagnostics`**=_`NUMBER`_ — - Cap the amount of diagnostics displayed. +- **` --max-diagnostics`**=_`>`_ — + Cap the amount of diagnostics displayed. When `none` is provided, the limit is lifted. [default: 20] - **` --skip-errors`** — @@ -600,7 +643,7 @@ Run the formatter on a set of files. Silence errors that would be emitted in case no files were processed during the execution of the command. - **` --error-on-warnings`** — Tell Biome to exit with an error code if some diagnostics emit warnings. -- **` --reporter`**=_``_ — +- **` --reporter`**=_``_ — Allows to change how diagnostics and summary are reported. - **` --log-level`**=_``_ — The level of logging. In order, from the most verbose to the least verbose: debug, info, warn, error. @@ -666,13 +709,13 @@ Command to use in CI environments. Runs formatter, linter and import sorting to Files won't be modified, the command is a read-only operation. -**Usage**: **`biome`** **`ci`** \[**`--formatter-enabled`**=_``_\] \[**`--linter-enabled`**=_``_\] \[**`--organize-imports-enabled`**=_``_\] \[**`--changed`**\] \[**`--since`**=_`REF`_\] \[_`PATH`_\]... +**Usage**: **`biome`** **`ci`** \[**`--formatter-enabled`**=_``_\] \[**`--linter-enabled`**=_``_\] \[**`--organize-imports-enabled`**=_``_\] \[**`--assists-enabled`**=_``_\] \[**`--changed`**\] \[**`--since`**=_`REF`_\] \[_`PATH`_\]... **The configuration that is contained inside the file `biome.json`** -- **` --vcs-client-kind`**=_``_ — - The kind of client. - **` --vcs-enabled`**=_``_ — Whether Biome should integrate itself with the VCS client +- **` --vcs-client-kind`**=_``_ — + The kind of client. - **` --vcs-use-ignore-file`**=_``_ — Whether Biome should use the VCS ignore file. When [true], Biome will ignore the files specified in the ignore file. - **` --vcs-root`**=_`PATH`_ — @@ -685,6 +728,8 @@ Files won't be modified, the command is a read-only operation. The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reasons. Defaults to 1 MiB - **` --files-ignore-unknown`**=_``_ — Tells Biome to not emit diagnostics when handling files that doesn't know +- **` --use-editorconfig`**=_``_ — + Use any `.editorconfig` files to configure the formatter. Configuration in `biome.json` will override `.editorconfig` configuration. Default: false. - **` --indent-style`**=_``_ — The indent style. - **` --indent-size`**=_`NUMBER`_ — @@ -697,6 +742,8 @@ Files won't be modified, the command is a read-only operation. What's the max width of a line. Defaults to 80. - **` --attribute-position`**=_``_ — The attribute position style in HTMLish languages. By default auto. +- **` --bracket-spacing`**=_``_ — + Whether to insert spaces around brackets in object literals. Defaults to true. - **` --jsx-quote-style`**=_``_ — The type of quotes used in JSX. Defaults to double. - **` --quote-properties`**=_``_ — @@ -709,8 +756,6 @@ Files won't be modified, the command is a read-only operation. Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI. - **` --arrow-parentheses`**=_``_ — Whether to add non-necessary parentheses to arrow functions. Defaults to "always". -- **` --bracket-spacing`**=_``_ — - Whether to insert spaces around brackets in object literals. Defaults to true. - **` --bracket-same-line`**=_``_ — Whether to hug the closing bracket of multiline HTML/JSX tags to the end of the last line, rather than being alone on the following line. Defaults to false. - **` --javascript-formatter-enabled`**=_``_ — @@ -731,6 +776,8 @@ Files won't be modified, the command is a read-only operation. The attribute position style in jsx elements. Defaults to auto. - **` --javascript-linter-enabled`**=_``_ — Control the linter for JavaScript (and its super languages) files. +- **` --javascript-assists-enabled`**=_``_ — + Control the linter for JavaScript (and its super languages) files. - **` --json-formatter-enabled`**=_``_ — Control the formatter for JSON (and its super languages) files. - **` --json-formatter-indent-style`**=_``_ — @@ -747,6 +794,8 @@ Files won't be modified, the command is a read-only operation. Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "none". - **` --json-linter-enabled`**=_``_ — Control the linter for JSON (and its super languages) files. +- **` --json-assists-enabled`**=_``_ — + Control the linter for JSON (and its super languages) files. - **` --css-formatter-enabled`**=_``_ — Control the formatter for CSS (and its super languages) files. - **` --css-formatter-indent-style`**=_``_ — @@ -760,7 +809,25 @@ Files won't be modified, the command is a read-only operation. - **` --css-formatter-quote-style`**=_``_ — The type of quotes used in CSS code. Defaults to double. - **` --css-linter-enabled`**=_``_ — - Control the linter for CSS (and its super languages) files. + Control the linter for CSS files. +- **` --css-assists-enabled`**=_``_ — + Control the assists for CSS files. +- **` --graphql-formatter-enabled`**=_``_ — + Control the formatter for GraphQL files. +- **` --graphql-formatter-indent-style`**=_``_ — + The indent style applied to GraphQL files. +- **` --graphql-formatter-indent-width`**=_`NUMBER`_ — + The size of the indentation applied to GraphQL files. Default to 2. +- **` --graphql-formatter-line-ending`**=_``_ — + The type of line ending applied to GraphQL files. +- **` --graphql-formatter-line-width`**=_`NUMBER`_ — + What's the max width of a line applied to GraphQL files. Defaults to 80. +- **` --graphql-formatter-quote-style`**=_``_ — + The type of quotes used in GraphQL code. Defaults to double. +- **` --graphql-linter-enabled`**=_``_ — + Control the formatter for GraphQL files. +- **` --assists-enabled`**=_``_ — + Whether Biome should enable assists via LSP. @@ -770,11 +837,11 @@ Files won't be modified, the command is a read-only operation. - **` --use-server`** — Connect to a running instance of the Biome daemon server. - **` --verbose`** — - Print additional diagnostics, and some diagnostics show more information. + Print additional diagnostics, and some diagnostics show more information. Also, print out what files were processed and which ones were modified. - **` --config-path`**=_`PATH`_ — Set the file path to the configuration file, or the directory path to find `biome.json` or `biome.jsonc`. If used, it disables the default configuration file resolution. -- **` --max-diagnostics`**=_`NUMBER`_ — - Cap the amount of diagnostics displayed. +- **` --max-diagnostics`**=_`>`_ — + Cap the amount of diagnostics displayed. When `none` is provided, the limit is lifted. [default: 20] - **` --skip-errors`** — @@ -783,7 +850,7 @@ Files won't be modified, the command is a read-only operation. Silence errors that would be emitted in case no files were processed during the execution of the command. - **` --error-on-warnings`** — Tell Biome to exit with an error code if some diagnostics emit warnings. -- **` --reporter`**=_``_ — +- **` --reporter`**=_``_ — Allows to change how diagnostics and summary are reported. - **` --log-level`**=_``_ — The level of logging. In order, from the most verbose to the least verbose: debug, info, warn, error. @@ -815,6 +882,8 @@ Files won't be modified, the command is a read-only operation. Allow to enable or disable the linter check. - **` --organize-imports-enabled`**=_``_ — Allow to enable or disable the organize imports. +- **` --assists-enabled`**=_``_ — + Allow to enable or disable the assists. - **` --changed`** — When set to true, only the files that have been changed compared to your `defaultBranch` configuration will be linted. - **` --since`**=_`REF`_ — @@ -838,11 +907,21 @@ Bootstraps a new biome project. Creates a configuration file with some defaults. ## biome lsp-proxy -Acts as a server for the Language Server Protocol over stdin/stdout +Acts as a server for the Language Server Protocol over stdin/stdout. **Usage**: **`biome`** **`lsp-proxy`** \[**`--config-path`**=_`PATH`_\] **Available options:** +- **` --log-prefix-name`**=_`STRING`_ — + Allows to change the prefix applied to the file name of the logs. + + Uses environment variable **`BIOME_LOG_PREFIX_NAME`** + + [default: server.log] +- **` --log-path`**=_`PATH`_ — + Allows to change the folder where logs are stored. + + Uses environment variable **`BIOME_LOG_PATH`** - **` --config-path`**=_`PATH`_ — Allows to set a custom file path to the configuration file, or a custom directory path to find `biome.json` or `biome.jsonc` @@ -853,7 +932,7 @@ Acts as a server for the Language Server Protocol over stdin/stdout ## biome migrate -It updates the configuration when there are breaking changes +Updates the configuration when there are breaking changes. **Usage**: **`biome`** **`migrate`** \[**`--write`**\] \[_`COMMAND ...`_\] @@ -863,11 +942,11 @@ It updates the configuration when there are breaking changes - **` --use-server`** — Connect to a running instance of the Biome daemon server. - **` --verbose`** — - Print additional diagnostics, and some diagnostics show more information. + Print additional diagnostics, and some diagnostics show more information. Also, print out what files were processed and which ones were modified. - **` --config-path`**=_`PATH`_ — Set the file path to the configuration file, or the directory path to find `biome.json` or `biome.jsonc`. If used, it disables the default configuration file resolution. -- **` --max-diagnostics`**=_`NUMBER`_ — - Cap the amount of diagnostics displayed. +- **` --max-diagnostics`**=_`>`_ — + Cap the amount of diagnostics displayed. When `none` is provided, the limit is lifted. [default: 20] - **` --skip-errors`** — @@ -876,7 +955,7 @@ It updates the configuration when there are breaking changes Silence errors that would be emitted in case no files were processed during the execution of the command. - **` --error-on-warnings`** — Tell Biome to exit with an error code if some diagnostics emit warnings. -- **` --reporter`**=_``_ — +- **` --reporter`**=_``_ — Allows to change how diagnostics and summary are reported. - **` --log-level`**=_``_ — The level of logging. In order, from the most verbose to the least verbose: debug, info, warn, error. @@ -938,9 +1017,107 @@ It attempts to find the ESLint configuration file in the working directory, and Prints help information +## biome search + +[EXPERIMENTAL] Searches for Grit patterns across a project. + +Note: GritQL escapes code snippets using backticks, but most shells interpret backticks as command invocations. To avoid this, it's best to put single quotes around your Grit queries. + +## Example + + ```shell + biome search '`console.log($message)`' # find all `console.log` invocations + ``` + + +**Usage**: **`biome`** **`search`** _`PATTERN`_ \[_`PATH`_\]... + +**Global options applied to all commands** +- **` --colors`**=_``_ — + Set the formatting mode for markup: "off" prints everything as plain text, "force" forces the formatting of markup using ANSI even if the console output is determined to be incompatible +- **` --use-server`** — + Connect to a running instance of the Biome daemon server. +- **` --verbose`** — + Print additional diagnostics, and some diagnostics show more information. Also, print out what files were processed and which ones were modified. +- **` --config-path`**=_`PATH`_ — + Set the file path to the configuration file, or the directory path to find `biome.json` or `biome.jsonc`. If used, it disables the default configuration file resolution. +- **` --max-diagnostics`**=_`>`_ — + Cap the amount of diagnostics displayed. When `none` is provided, the limit is lifted. + + [default: 20] +- **` --skip-errors`** — + Skip over files containing syntax errors instead of emitting an error diagnostic. +- **` --no-errors-on-unmatched`** — + Silence errors that would be emitted in case no files were processed during the execution of the command. +- **` --error-on-warnings`** — + Tell Biome to exit with an error code if some diagnostics emit warnings. +- **` --reporter`**=_``_ — + Allows to change how diagnostics and summary are reported. +- **` --log-level`**=_``_ — + The level of logging. In order, from the most verbose to the least verbose: debug, info, warn, error. + + The value `none` won't show any logging. + + [default: none] +- **` --log-kind`**=_``_ — + How the log should look like. + + [default: pretty] +- **` --diagnostic-level`**=_``_ — + The level of diagnostics to show. In order, from the lowest to the most important: info, warn, error. Passing `--diagnostic-level=error` will cause Biome to print only diagnostics that contain only errors. + + [default: info] + + + +**The configuration of the filesystem** +- **` --files-max-size`**=_`NUMBER`_ — + The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reasons. Defaults to 1 MiB +- **` --files-ignore-unknown`**=_``_ — + Tells Biome to not emit diagnostics when handling files that doesn't know + + + +**Set of properties to integrate Biome with a VCS software.** +- **` --vcs-enabled`**=_``_ — + Whether Biome should integrate itself with the VCS client +- **` --vcs-client-kind`**=_``_ — + The kind of client. +- **` --vcs-use-ignore-file`**=_``_ — + Whether Biome should use the VCS ignore file. When [true], Biome will ignore the files specified in the ignore file. +- **` --vcs-root`**=_`PATH`_ — + The folder where Biome should check for VCS files. By default, Biome will use the same folder where `biome.json` was found. + + If Biome can't find the configuration, it will attempt to use the current working directory. If no current working directory can't be found, Biome won't use the VCS integration, and a diagnostic will be emitted +- **` --vcs-default-branch`**=_`BRANCH`_ — + The main branch of the project + + + +**Available positional items:** +- _`PATTERN`_ — + The GritQL pattern to search for. + + Note that the search command (currently) does not support rewrites. +- _`PATH`_ — + Single file, single path or list of paths. + + + +**Available options:** +- **` --stdin-file-path`**=_`PATH`_ — + Use this option when you want to search through code piped from `stdin`, and print the output to `stdout`. + + The file doesn't need to exist on disk, what matters is the extension of the file. Based on the extension, Biome knows how to parse the code. + + Example: `echo 'let a;' | biome search '`let $var`' --stdin-file-path=file.js` +- **`-h`**, **`--help`** — + Prints help information + + ## biome explain -A command to retrieve the documentation of various aspects of the CLI. +Shows documentation of various aspects of the CLI. ## Examples @@ -969,7 +1146,7 @@ A command to retrieve the documentation of various aspects of the CLI. ## biome clean -Clean the logs emitted by the daemon +Cleans the logs emitted by the daemon. **Usage**: **`biome`** **`clean`** diff --git a/src/content/docs/reference/environment_variables.md b/src/content/docs/reference/environment_variables.md new file mode 100644 index 000000000..9e0b1bc2d --- /dev/null +++ b/src/content/docs/reference/environment_variables.md @@ -0,0 +1,29 @@ +--- +# Don't modify this file. This file is autogenerate by `codegen/src/env_variables.rs` + +title: Environment variables +description: A list of the environment variables available via Biome +--- +### `BIOME_LOG_PREFIX_NAME` + + A prefix that's added to the name of the log. Default: `server.log.` + +### `BIOME_LOG_PATH` + + The directory where the Daemon logs will be saved. + +### `BIOME_CONFIG_PATH` + + A path to the configuration file + + +### `BIOME_BINARY` + +Overrides the Biome binary being used. This allows you, for example, to use a system-wide Biome binary. + +If you don't define this variable, Biome will automatically detect the correct binary for your platform. + +``` +# Nix derivation example; the binary path comes from "${pkgs.biome}/bin/biome" +BIOME_BINARY=/nix/store/68fyfw1hidsqkal1839whi3nzgvqv4pa-biome-1.0.0/bin/biome npx @biomejs/biome format . +``` diff --git a/src/content/docs/zh-cn/internals/language-support.mdx b/src/content/docs/zh-cn/internals/language-support.mdx index 4e5ed0798..8096c7334 100644 --- a/src/content/docs/zh-cn/internals/language-support.mdx +++ b/src/content/docs/zh-cn/internals/language-support.mdx @@ -28,7 +28,7 @@ Biomeๅชๆ”ฏๆŒๅฎ˜ๆ–น่ฏญๆณ•ใ€‚ๅฝ“ๆๆกˆ่พพๅˆฐ[็ฌฌ3้˜ถๆฎต](https://github.com/tc39 ## TypeScript๏ผˆ็ฑปๅž‹่„šๆœฌ๏ผ‰ๆ”ฏๆŒ -Biomeๆ”ฏๆŒTypeScript็‰ˆๆœฌ5.2ใ€‚ +Biomeๆ”ฏๆŒTypeScript็‰ˆๆœฌ5.6ใ€‚ ## HTML่ถ…็บง่ฏญ่จ€ๆ”ฏๆŒ diff --git a/src/pages/schemas/1.9.0/schema.json.js b/src/pages/schemas/1.9.0/schema.json.js new file mode 100644 index 000000000..7b0e199f0 --- /dev/null +++ b/src/pages/schemas/1.9.0/schema.json.js @@ -0,0 +1,4252 @@ +// Run `BIOME_VERSION= pnpm codegen:release-files +// to generate a new schema +export function GET() { + const schema = { + $schema: "http://json-schema.org/draft-07/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", + type: ["string", "null"], + }, + assists: { + description: "Specific configuration for assists", + anyOf: [ + { $ref: "#/definitions/AssistsConfiguration" }, + { type: "null" }, + ], + }, + css: { + description: "Specific configuration for the Css language", + anyOf: [{ $ref: "#/definitions/CssConfiguration" }, { type: "null" }], + }, + extends: { + description: + "A list of paths to other JSON files, used to extends the current configuration.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + files: { + description: "The configuration of the filesystem", + anyOf: [{ $ref: "#/definitions/FilesConfiguration" }, { type: "null" }], + }, + formatter: { + description: "The configuration of the formatter", + anyOf: [ + { $ref: "#/definitions/FormatterConfiguration" }, + { type: "null" }, + ], + }, + graphql: { + description: "Specific configuration for the GraphQL language", + anyOf: [ + { $ref: "#/definitions/GraphqlConfiguration" }, + { type: "null" }, + ], + }, + javascript: { + description: "Specific configuration for the JavaScript language", + anyOf: [ + { $ref: "#/definitions/JavascriptConfiguration" }, + { type: "null" }, + ], + }, + json: { + description: "Specific configuration for the Json language", + anyOf: [{ $ref: "#/definitions/JsonConfiguration" }, { type: "null" }], + }, + linter: { + description: "The configuration for the linter", + anyOf: [ + { $ref: "#/definitions/LinterConfiguration" }, + { type: "null" }, + ], + }, + organizeImports: { + description: "The configuration of the import sorting", + anyOf: [{ $ref: "#/definitions/OrganizeImports" }, { type: "null" }], + }, + overrides: { + description: + "A list of granular patterns that should be applied only to a sub set of files", + anyOf: [{ $ref: "#/definitions/Overrides" }, { type: "null" }], + }, + vcs: { + description: "The configuration of the VCS integration", + anyOf: [{ $ref: "#/definitions/VcsConfiguration" }, { type: "null" }], + }, + }, + additionalProperties: false, + definitions: { + A11y: { + description: "A list of rules that belong to this group", + type: "object", + properties: { + all: { + description: "It enables ALL rules for this group.", + type: ["boolean", "null"], + }, + noAccessKey: { + description: + "Enforce that the accessKey attribute is not used on any HTML element.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noAriaHiddenOnFocusable: { + description: + 'Enforce that aria-hidden="true" is not set on focusable elements.', + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noAriaUnsupportedElements: { + description: + "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noAutofocus: { + description: "Enforce that autoFocus prop is not used on elements.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noBlankTarget: { + description: + 'Disallow target="_blank" attribute without rel="noreferrer"', + anyOf: [ + { $ref: "#/definitions/AllowDomainConfiguration" }, + { type: "null" }, + ], + }, + noDistractingElements: { + description: "Enforces that no distracting elements are used.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noHeaderScope: { + description: + "The scope prop should be used only on \\ elements.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noInteractiveElementToNoninteractiveRole: { + description: + "Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noNoninteractiveElementToInteractiveRole: { + description: + "Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noNoninteractiveTabindex: { + description: + "Enforce that tabIndex is not assigned to non-interactive HTML elements.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noPositiveTabindex: { + description: + "Prevent the usage of positive integers on tabIndex property", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noRedundantAlt: { + description: + 'Enforce img alt prop does not contain the word "image", "picture", or "photo".', + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noRedundantRoles: { + description: + "Enforce explicit role property is not the same as implicit/default role property on an element.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noSvgWithoutTitle: { + description: + "Enforces the usage of the title element for the svg element.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + recommended: { + description: "It 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.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useAnchorContent: { + description: + "Enforce that anchors have content and that the content is accessible to screen readers.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useAriaActivedescendantWithTabindex: { + description: + "Enforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useAriaPropsForRole: { + description: + "Enforce that elements with ARIA roles must have all required ARIA attributes for that role.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useButtonType: { + description: + "Enforces the usage of the attribute type for the element button", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { 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.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useHtmlLang: { + description: "Enforce that html element has lang attribute.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useIframeTitle: { + description: + "Enforces the usage of the attribute title for the element iframe.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useKeyWithClickEvents: { + description: + "Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useKeyWithMouseEvents: { + description: + "Enforce onMouseOver / onMouseOut are accompanied by onFocus / onBlur.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useMediaCaption: { + description: + "Enforces that audio and video elements must have a track for captions.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useValidAnchor: { + description: + "Enforce that all anchors are valid, and they are navigable elements.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useValidAriaProps: { + description: "Ensures that ARIA properties aria-* are all valid.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useValidAriaRole: { + description: + "Elements with ARIA roles must use a valid, non-abstract ARIA role.", + anyOf: [ + { $ref: "#/definitions/ValidAriaRoleConfiguration" }, + { type: "null" }, + ], + }, + useValidAriaValues: { + description: + "Enforce that ARIA state and property values are valid.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useValidLang: { + description: + "Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + }, + additionalProperties: false, + }, + Accessibility: { + type: "string", + enum: ["noPublic", "explicit", "none"], + }, + Actions: { + type: "object", + properties: { + source: { + anyOf: [{ $ref: "#/definitions/Source" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + AllowDomainConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithAllowDomainOptions" }, + ], + }, + AllowDomainOptions: { + type: "object", + required: ["allowDomains"], + properties: { + allowDomains: { + description: + 'List of domains to allow `target="_blank"` without `rel="noreferrer"`', + type: "array", + items: { type: "string" }, + }, + }, + additionalProperties: false, + }, + ArrowParentheses: { type: "string", enum: ["always", "asNeeded"] }, + AssistsConfiguration: { + type: "object", + properties: { + actions: { + description: + "Whether Biome should fail in CLI if the assists were not applied to the code.", + anyOf: [{ $ref: "#/definitions/Actions" }, { type: "null" }], + }, + enabled: { + description: "Whether Biome should enable assists via LSP.", + type: ["boolean", "null"], + }, + ignore: { + description: + "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + include: { + description: + "A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + AttributePosition: { type: "string", enum: ["auto", "multiline"] }, + BracketSpacing: { type: "boolean" }, + Complexity: { + description: "A list of rules that belong to this group", + type: "object", + properties: { + all: { + description: "It enables ALL rules for this group.", + type: ["boolean", "null"], + }, + noBannedTypes: { + description: + "Disallow primitive type aliases and misleading types.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noEmptyTypeParameters: { + description: + "Disallow empty type parameters in type aliases and interfaces.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noExcessiveCognitiveComplexity: { + description: + "Disallow functions that exceed a given Cognitive Complexity score.", + anyOf: [ + { $ref: "#/definitions/ComplexityConfiguration" }, + { type: "null" }, + ], + }, + noExcessiveNestedTestSuites: { + description: + "This rule enforces a maximum depth to nested describe() in test files.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noExtraBooleanCast: { + description: "Disallow unnecessary boolean casts", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noForEach: { + description: "Prefer for...of statement instead of Array.forEach.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noMultipleSpacesInRegularExpressionLiterals: { + description: + "Disallow unclear usage of consecutive space characters in regular expression literals", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { 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.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noThisInStatic: { + description: "Disallow this and super in static contexts.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessCatch: { + description: "Disallow unnecessary catch clauses.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessConstructor: { + description: "Disallow unnecessary constructors.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessEmptyExport: { + description: + "Disallow empty exports that don't change anything in a module file.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessFragments: { + description: "Disallow unnecessary fragments", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessLabel: { + description: "Disallow unnecessary labels.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessLoneBlockStatements: { + description: "Disallow unnecessary nested block statements.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessRename: { + description: + "Disallow renaming import, export, and destructured assignments to the same name.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessSwitchCase: { + description: "Disallow useless case in switch statements.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessTernary: { + description: + "Disallow ternary operators when simpler alternatives exist.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessThisAlias: { + description: "Disallow useless this aliasing.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessTypeConstraint: { + description: "Disallow using any or unknown as type constraint.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noVoid: { + description: + "Disallow the use of void operators, which is not a familiar operator.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noWith: { + description: "Disallow with statements in non-strict contexts.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + recommended: { + description: "It enables the recommended rules for this group", + type: ["boolean", "null"], + }, + useArrowFunction: { + description: "Use arrow functions over function expressions.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useFlatMap: { + description: + "Promotes the use of .flatMap() when map().flat() are used together.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useLiteralKeys: { + description: + "Enforce the usage of a literal access to properties over computed property access.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useOptionalChain: { + description: + "Enforce using concise optional chain instead of chained logical expressions.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useRegexLiterals: { + description: + "Enforce the use of the regular expression literals instead of the RegExp constructor if possible.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useSimpleNumberKeys: { + description: + "Disallow number literal object member names which are not base10 or uses underscore as separator", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useSimplifiedLogicExpression: { + description: "Discard redundant terms from logical expressions.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + }, + additionalProperties: false, + }, + ComplexityConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithComplexityOptions" }, + ], + }, + ComplexityOptions: { + description: "Options for the rule `noExcessiveCognitiveComplexity`.", + type: "object", + required: ["maxAllowedComplexity"], + properties: { + maxAllowedComplexity: { + description: + "The maximum complexity score that we allow. Anything higher is considered excessive.", + type: "integer", + format: "uint8", + minimum: 1.0, + }, + }, + additionalProperties: false, + }, + ConsistentArrayType: { + oneOf: [ + { + description: "`ItemType[]`", + type: "string", + enum: ["shorthand"], + }, + { + description: "`Array`", + type: "string", + enum: ["generic"], + }, + ], + }, + ConsistentArrayTypeConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithConsistentArrayTypeOptions" }, + ], + }, + ConsistentArrayTypeOptions: { + type: "object", + required: ["syntax"], + properties: { + syntax: { $ref: "#/definitions/ConsistentArrayType" }, + }, + additionalProperties: false, + }, + ConsistentMemberAccessibilityConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { + $ref: "#/definitions/RuleWithConsistentMemberAccessibilityOptions", + }, + ], + }, + ConsistentMemberAccessibilityOptions: { + type: "object", + required: ["accessibility"], + properties: { + accessibility: { $ref: "#/definitions/Accessibility" }, + }, + additionalProperties: false, + }, + Convention: { + type: "object", + properties: { + formats: { + description: "String cases to enforce", + allOf: [{ $ref: "#/definitions/Formats" }], + }, + match: { + description: "Regular expression to enforce", + anyOf: [{ $ref: "#/definitions/Regex" }, { type: "null" }], + }, + selector: { + description: "Declarations concerned by this convention", + allOf: [{ $ref: "#/definitions/Selector" }], + }, + }, + additionalProperties: false, + }, + Correctness: { + description: "A list of rules that belong to this group", + type: "object", + properties: { + all: { + description: "It enables ALL rules for this group.", + type: ["boolean", "null"], + }, + noChildrenProp: { + description: "Prevent passing of children as props.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noConstAssign: { + description: + "Prevents from having const variables being re-assigned.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noConstantCondition: { + description: "Disallow constant expressions in conditions", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noConstantMathMinMaxClamp: { + description: + "Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noConstructorReturn: { + description: "Disallow returning a value from a constructor.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noEmptyCharacterClassInRegex: { + description: + "Disallow empty character classes in regular expression literals.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noEmptyPattern: { + description: "Disallows empty destructuring patterns.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noFlatMapIdentity: { + description: "Disallow to use unnecessary callback on flatMap.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noGlobalObjectCalls: { + description: + "Disallow calling global object properties as functions", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noInnerDeclarations: { + description: + "Disallow function and var declarations that are accessible outside their block.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { 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.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noInvalidNewBuiltin: { + description: + "Disallow new operators with global non-constructor functions.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noInvalidUseBeforeDeclaration: { + description: + "Disallow the use of variables and function parameters before their declaration", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noNewSymbol: { + description: "Disallow new operators with the Symbol object.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noNodejsModules: { + description: "Forbid the use of Node.js builtin modules.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noNonoctalDecimalEscape: { + description: + "Disallow \\8 and \\9 escape sequences in string literals.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noPrecisionLoss: { + description: "Disallow literal numbers that lose precision", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noRenderReturnValue: { + description: + "Prevent the usage of the return value of React.render.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noSelfAssign: { + description: + "Disallow assignments where both sides are exactly the same.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noSetterReturn: { + description: "Disallow returning a value from a setter", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noStringCaseMismatch: { + description: + "Disallow comparison of expressions modifying the string case with non-compliant value.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noSwitchDeclarations: { + description: "Disallow lexical declarations in switch clauses.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUndeclaredVariables: { + description: + "Prevents the usage of variables that haven't been declared inside the document.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnnecessaryContinue: { + description: "Avoid using unnecessary continue.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUnreachable: { + description: "Disallow unreachable code", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { 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", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnsafeFinally: { + description: "Disallow control flow statements in finally blocks.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnsafeOptionalChaining: { + description: + "Disallow the use of optional chaining in contexts where the undefined value is not allowed.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnusedImports: { + description: "Disallow unused imports.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUnusedLabels: { + description: "Disallow unused labels.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUnusedPrivateClassMembers: { + description: "Disallow unused private class members", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUnusedVariables: { + description: "Disallow unused variables.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noVoidElementsWithChildren: { + description: + "This rules prevents void elements (AKA self-closing elements) from having children.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noVoidTypeReturn: { + description: + "Disallow returning a value from a function with the return type 'void'", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + recommended: { + description: "It enables the recommended rules for this group", + type: ["boolean", "null"], + }, + useArrayLiterals: { + description: "Disallow Array constructors.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useExhaustiveDependencies: { + description: + "Enforce all dependencies are correctly specified in a React hook.", + anyOf: [ + { $ref: "#/definitions/HooksConfiguration" }, + { type: "null" }, + ], + }, + useHookAtTopLevel: { + description: + "Enforce that all React hooks are being called from the Top Level component functions.", + anyOf: [ + { $ref: "#/definitions/DeprecatedHooksConfiguration" }, + { type: "null" }, + ], + }, + useIsNan: { + description: "Require calls to isNaN() when checking for NaN.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useJsxKeyInIterable: { + description: + "Disallow missing key props in iterators/collection literals.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useValidForDirection: { + description: + 'Enforce "for" loop update clause moving the counter in the right direction.', + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useYield: { + description: "Require generator functions to contain yield.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + }, + additionalProperties: false, + }, + CssAssists: { + description: "Options that changes how the CSS assists behaves", + type: "object", + properties: { + enabled: { + description: "Control the assists for CSS files.", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + CssConfiguration: { + description: "Options applied to CSS files", + type: "object", + properties: { + assists: { + description: "CSS assists options", + anyOf: [{ $ref: "#/definitions/CssAssists" }, { type: "null" }], + }, + formatter: { + description: "CSS formatter options", + anyOf: [{ $ref: "#/definitions/CssFormatter" }, { type: "null" }], + }, + linter: { + description: "CSS linter options", + anyOf: [{ $ref: "#/definitions/CssLinter" }, { type: "null" }], + }, + parser: { + description: "CSS parsing options", + anyOf: [{ $ref: "#/definitions/CssParser" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + CssFormatter: { + description: "Options that changes how the CSS formatter behaves", + type: "object", + properties: { + enabled: { + description: + "Control the formatter for CSS (and its super languages) files.", + type: ["boolean", "null"], + }, + indentStyle: { + description: + "The indent style applied to CSS (and its super languages) files.", + anyOf: [{ $ref: "#/definitions/IndentStyle" }, { type: "null" }], + }, + indentWidth: { + description: + "The size of the indentation applied to CSS (and its super languages) files. Default to 2.", + anyOf: [{ $ref: "#/definitions/IndentWidth" }, { type: "null" }], + }, + lineEnding: { + description: + "The type of line ending applied to CSS (and its super languages) files.", + anyOf: [{ $ref: "#/definitions/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: "#/definitions/LineWidth" }, { type: "null" }], + }, + quoteStyle: { + description: + "The type of quotes used in CSS code. Defaults to double.", + anyOf: [{ $ref: "#/definitions/QuoteStyle" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + CssLinter: { + description: "Options that changes how the CSS linter behaves", + type: "object", + properties: { + enabled: { + description: "Control the linter for CSS files.", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + CssParser: { + description: "Options that changes how the CSS parser behaves", + type: "object", + properties: { + allowWrongLineComments: { + description: + "Allow comments to appear on incorrect lines in `.css` files", + type: ["boolean", "null"], + }, + cssModules: { + description: "Enables parsing of CSS Modules specific features.", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + CustomRestrictedType: { + anyOf: [ + { type: "string" }, + { $ref: "#/definitions/CustomRestrictedTypeOptions" }, + ], + }, + CustomRestrictedTypeOptions: { + type: "object", + required: ["message"], + properties: { + message: { type: "string" }, + use: { type: ["string", "null"] }, + }, + additionalProperties: false, + }, + DeprecatedHooksConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithDeprecatedHooksOptions" }, + ], + }, + DeprecatedHooksOptions: { + description: + "Options for the `useHookAtTopLevel` rule have been deprecated, since we now use the React hook naming convention to determine whether a function is a hook.", + type: "object", + additionalProperties: false, + }, + FilenameCase: { + description: "Supported cases for file names.", + oneOf: [ + { description: "camelCase", type: "string", enum: ["camelCase"] }, + { + description: "Match an export name", + type: "string", + enum: ["export"], + }, + { + description: "kebab-case", + type: "string", + enum: ["kebab-case"], + }, + { + description: "PascalCase", + type: "string", + enum: ["PascalCase"], + }, + { + description: "snake_case", + type: "string", + enum: ["snake_case"], + }, + ], + }, + FilenameCases: { + type: "array", + items: { $ref: "#/definitions/FilenameCase" }, + uniqueItems: true, + }, + FilenamingConventionConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithFilenamingConventionOptions" }, + ], + }, + FilenamingConventionOptions: { + description: "Rule's options.", + type: "object", + properties: { + filenameCases: { + description: "Allowed cases for file names.", + allOf: [{ $ref: "#/definitions/FilenameCases" }], + }, + requireAscii: { + description: "If `false`, then non-ASCII characters are allowed.", + type: "boolean", + }, + strictCase: { + description: + "If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].", + type: "boolean", + }, + }, + additionalProperties: false, + }, + FilesConfiguration: { + description: "The configuration of the filesystem", + type: "object", + properties: { + ignore: { + description: + "A list of Unix shell style patterns. Biome will ignore files/folders that will match these patterns.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + ignoreUnknown: { + description: + "Tells Biome to not emit diagnostics when handling files that doesn't know", + type: ["boolean", "null"], + }, + include: { + description: + "A list of Unix shell style patterns. Biome will handle only those files/folders that will match these patterns.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + maxSize: { + description: + "The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reasons. Defaults to 1 MiB", + type: ["integer", "null"], + format: "uint64", + minimum: 1.0, + }, + }, + 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", + enum: ["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", + enum: ["safe"], + }, + { + description: + "The rule emits a code action that is _unsafe_ to apply. Usually these fixes remove comments, or change the semantic of the program.", + type: "string", + enum: ["unsafe"], + }, + ], + }, + Format: { + description: "Supported cases.", + type: "string", + enum: ["camelCase", "CONSTANT_CASE", "PascalCase", "snake_case"], + }, + Formats: { + type: "array", + items: { $ref: "#/definitions/Format" }, + uniqueItems: true, + }, + FormatterConfiguration: { + description: "Generic options applied to all files", + type: "object", + properties: { + attributePosition: { + description: + "The attribute position style in HTMLish languages. By default auto.", + anyOf: [ + { $ref: "#/definitions/AttributePosition" }, + { type: "null" }, + ], + }, + bracketSpacing: { + description: + "Whether to insert spaces around brackets in object literals. Defaults to true.", + anyOf: [{ $ref: "#/definitions/BracketSpacing" }, { type: "null" }], + }, + enabled: { type: ["boolean", "null"] }, + formatWithErrors: { + description: + "Stores whether formatting should be allowed to proceed if a given file has syntax errors", + type: ["boolean", "null"], + }, + ignore: { + description: + "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + include: { + description: + "A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + indentSize: { + description: + "The size of the indentation, 2 by default (deprecated, use `indent-width`)", + anyOf: [{ $ref: "#/definitions/IndentWidth" }, { type: "null" }], + }, + indentStyle: { + description: "The indent style.", + anyOf: [{ $ref: "#/definitions/IndentStyle" }, { type: "null" }], + }, + indentWidth: { + description: "The size of the indentation, 2 by default", + anyOf: [{ $ref: "#/definitions/IndentWidth" }, { type: "null" }], + }, + lineEnding: { + description: "The type of line ending.", + anyOf: [{ $ref: "#/definitions/LineEnding" }, { type: "null" }], + }, + lineWidth: { + description: "What's the max width of a line. Defaults to 80.", + anyOf: [{ $ref: "#/definitions/LineWidth" }, { type: "null" }], + }, + useEditorconfig: { + description: + "Use any `.editorconfig` files to configure the formatter. Configuration in `biome.json` will override `.editorconfig` configuration. Default: false.", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + GraphqlConfiguration: { + description: "Options applied to GraphQL files", + type: "object", + properties: { + formatter: { + description: "GraphQL formatter options", + anyOf: [ + { $ref: "#/definitions/GraphqlFormatter" }, + { type: "null" }, + ], + }, + linter: { + anyOf: [{ $ref: "#/definitions/GraphqlLinter" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + GraphqlFormatter: { + 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: "#/definitions/BracketSpacing" }, { type: "null" }], + }, + enabled: { + description: "Control the formatter for GraphQL files.", + type: ["boolean", "null"], + }, + indentStyle: { + description: "The indent style applied to GraphQL files.", + anyOf: [{ $ref: "#/definitions/IndentStyle" }, { type: "null" }], + }, + indentWidth: { + description: + "The size of the indentation applied to GraphQL files. Default to 2.", + anyOf: [{ $ref: "#/definitions/IndentWidth" }, { type: "null" }], + }, + lineEnding: { + description: "The type of line ending applied to GraphQL files.", + anyOf: [{ $ref: "#/definitions/LineEnding" }, { type: "null" }], + }, + lineWidth: { + description: + "What's the max width of a line applied to GraphQL files. Defaults to 80.", + anyOf: [{ $ref: "#/definitions/LineWidth" }, { type: "null" }], + }, + quoteStyle: { + description: + "The type of quotes used in GraphQL code. Defaults to double.", + anyOf: [{ $ref: "#/definitions/QuoteStyle" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + GraphqlLinter: { + description: "Options that changes how the GraphQL linter behaves", + type: "object", + properties: { + enabled: { + description: "Control the formatter for GraphQL files.", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + Hook: { + type: "object", + required: ["name"], + 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", + minimum: 0.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", + minimum: 0.0, + }, + name: { description: "The name of the hook.", type: "string" }, + 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, or use a number/an array of numbers to mark the \"positions\" in the return array as stable.\n\nFor example, for React's `useRef()` hook the value would be `true`, while for `useState()` it would be `[1]`.", + anyOf: [ + { $ref: "#/definitions/StableHookResult" }, + { type: "null" }, + ], + }, + }, + additionalProperties: false, + }, + HooksConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithHooksOptions" }, + ], + }, + HooksOptions: { + description: "Options for the rule `useExhaustiveDependencies`", + type: "object", + required: ["hooks"], + properties: { + hooks: { + description: + "List of hooks of which the dependencies should be validated.", + type: "array", + items: { $ref: "#/definitions/Hook" }, + }, + }, + additionalProperties: false, + }, + IndentStyle: { + oneOf: [ + { description: "Tab", type: "string", enum: ["tab"] }, + { description: "Space", type: "string", enum: ["space"] }, + ], + }, + IndentWidth: { type: "integer", format: "uint8", minimum: 0.0 }, + JavascriptAssists: { + description: "Linter options specific to the JavaScript linter", + type: "object", + properties: { + enabled: { + description: + "Control the linter for JavaScript (and its super languages) files.", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + JavascriptConfiguration: { + description: "A set of options applied to the JavaScript files", + type: "object", + properties: { + assists: { + description: "Assists options", + anyOf: [ + { $ref: "#/definitions/JavascriptAssists" }, + { type: "null" }, + ], + }, + formatter: { + description: "Formatting options", + anyOf: [ + { $ref: "#/definitions/JavascriptFormatter" }, + { type: "null" }, + ], + }, + globals: { + description: + "A list of global bindings that should be ignored by the analyzers\n\nIf defined here, they should not emit diagnostics.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + jsxRuntime: { + description: + "Indicates the type of runtime or transformation used for interpreting JSX.", + anyOf: [{ $ref: "#/definitions/JsxRuntime" }, { type: "null" }], + }, + linter: { + description: "Linter options", + anyOf: [ + { $ref: "#/definitions/JavascriptLinter" }, + { type: "null" }, + ], + }, + organizeImports: { + anyOf: [ + { $ref: "#/definitions/JavascriptOrganizeImports" }, + { type: "null" }, + ], + }, + parser: { + description: "Parsing options", + anyOf: [ + { $ref: "#/definitions/JavascriptParser" }, + { type: "null" }, + ], + }, + }, + additionalProperties: false, + }, + JavascriptFormatter: { + description: "Formatting options specific to the JavaScript files", + type: "object", + properties: { + arrowParentheses: { + description: + 'Whether to add non-necessary parentheses to arrow functions. Defaults to "always".', + anyOf: [ + { $ref: "#/definitions/ArrowParentheses" }, + { type: "null" }, + ], + }, + attributePosition: { + description: + "The attribute position style in jsx elements. Defaults to auto.", + anyOf: [ + { $ref: "#/definitions/AttributePosition" }, + { type: "null" }, + ], + }, + bracketSameLine: { + description: + "Whether to hug the closing bracket of multiline HTML/JSX tags to the end of the last line, rather than being alone on the following line. Defaults to false.", + type: ["boolean", "null"], + }, + bracketSpacing: { + description: + "Whether to insert spaces around brackets in object literals. Defaults to true.", + anyOf: [{ $ref: "#/definitions/BracketSpacing" }, { type: "null" }], + }, + enabled: { + description: + "Control the formatter for JavaScript (and its super languages) files.", + type: ["boolean", "null"], + }, + indentSize: { + description: + "The size of the indentation applied to JavaScript (and its super languages) files. Default to 2.", + anyOf: [{ $ref: "#/definitions/IndentWidth" }, { type: "null" }], + }, + indentStyle: { + description: + "The indent style applied to JavaScript (and its super languages) files.", + anyOf: [{ $ref: "#/definitions/IndentStyle" }, { type: "null" }], + }, + indentWidth: { + description: + "The size of the indentation applied to JavaScript (and its super languages) files. Default to 2.", + anyOf: [{ $ref: "#/definitions/IndentWidth" }, { type: "null" }], + }, + jsxQuoteStyle: { + description: "The type of quotes used in JSX. Defaults to double.", + anyOf: [{ $ref: "#/definitions/QuoteStyle" }, { type: "null" }], + }, + lineEnding: { + description: + "The type of line ending applied to JavaScript (and its super languages) files.", + anyOf: [{ $ref: "#/definitions/LineEnding" }, { type: "null" }], + }, + lineWidth: { + description: + "What's the max width of a line applied to JavaScript (and its super languages) files. Defaults to 80.", + anyOf: [{ $ref: "#/definitions/LineWidth" }, { type: "null" }], + }, + quoteProperties: { + description: + "When properties in objects are quoted. Defaults to asNeeded.", + anyOf: [ + { $ref: "#/definitions/QuoteProperties" }, + { type: "null" }, + ], + }, + quoteStyle: { + description: + "The type of quotes used in JavaScript code. Defaults to double.", + anyOf: [{ $ref: "#/definitions/QuoteStyle" }, { type: "null" }], + }, + semicolons: { + description: + "Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.", + anyOf: [{ $ref: "#/definitions/Semicolons" }, { type: "null" }], + }, + trailingComma: { + description: + 'Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "all".', + anyOf: [{ $ref: "#/definitions/TrailingCommas" }, { type: "null" }], + }, + trailingCommas: { + description: + 'Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "all".', + anyOf: [{ $ref: "#/definitions/TrailingCommas" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + JavascriptLinter: { + description: "Linter options specific to the JavaScript linter", + type: "object", + properties: { + enabled: { + description: + "Control the linter for JavaScript (and its super languages) files.", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + JavascriptOrganizeImports: { + type: "object", + additionalProperties: false, + }, + JavascriptParser: { + description: "Options that changes how the JavaScript parser behaves", + type: "object", + properties: { + unsafeParameterDecoratorsEnabled: { + description: + "It enables the experimental and unsafe parsing of parameter decorators\n\nThese decorators belong to an old proposal, and they are subject to change.", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + JsonAssists: { + description: "Linter options specific to the JSON linter", + type: "object", + properties: { + enabled: { + description: + "Control the linter for JSON (and its super languages) files.", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + JsonConfiguration: { + description: "Options applied to JSON files", + type: "object", + properties: { + assists: { + description: "Assists options", + anyOf: [{ $ref: "#/definitions/JsonAssists" }, { type: "null" }], + }, + formatter: { + description: "Formatting options", + anyOf: [{ $ref: "#/definitions/JsonFormatter" }, { type: "null" }], + }, + linter: { + description: "Linting options", + anyOf: [{ $ref: "#/definitions/JsonLinter" }, { type: "null" }], + }, + parser: { + description: "Parsing options", + anyOf: [{ $ref: "#/definitions/JsonParser" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + JsonFormatter: { + type: "object", + properties: { + enabled: { + description: + "Control the formatter for JSON (and its super languages) files.", + type: ["boolean", "null"], + }, + indentSize: { + description: + "The size of the indentation applied to JSON (and its super languages) files. Default to 2.", + anyOf: [{ $ref: "#/definitions/IndentWidth" }, { type: "null" }], + }, + indentStyle: { + description: + "The indent style applied to JSON (and its super languages) files.", + anyOf: [{ $ref: "#/definitions/IndentStyle" }, { type: "null" }], + }, + indentWidth: { + description: + "The size of the indentation applied to JSON (and its super languages) files. Default to 2.", + anyOf: [{ $ref: "#/definitions/IndentWidth" }, { type: "null" }], + }, + lineEnding: { + description: + "The type of line ending applied to JSON (and its super languages) files.", + anyOf: [{ $ref: "#/definitions/LineEnding" }, { type: "null" }], + }, + lineWidth: { + description: + "What's the max width of a line applied to JSON (and its super languages) files. Defaults to 80.", + anyOf: [{ $ref: "#/definitions/LineWidth" }, { type: "null" }], + }, + trailingCommas: { + description: + 'Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "none".', + anyOf: [ + { $ref: "#/definitions/TrailingCommas2" }, + { type: "null" }, + ], + }, + }, + additionalProperties: false, + }, + JsonLinter: { + description: "Linter options specific to the JSON linter", + type: "object", + properties: { + enabled: { + description: + "Control the linter for JSON (and its super languages) files.", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + JsonParser: { + description: "Options that changes how the JSON parser behaves", + type: "object", + properties: { + allowComments: { + description: "Allow parsing comments in `.json` files", + type: ["boolean", "null"], + }, + allowTrailingCommas: { + description: "Allow parsing trailing commas in `.json` files", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + JsxRuntime: { + description: + "Indicates the type of runtime or transformation used for interpreting JSX.", + oneOf: [ + { + description: + "Indicates a modern or native JSX environment, that doesn't require special handling by Biome.", + type: "string", + enum: ["transparent"], + }, + { + description: + "Indicates a classic React environment that requires the `React` import.\n\nCorresponds to the `react` value for the `jsx` option in TypeScript's `tsconfig.json`.\n\nThis option should only be necessary if you cannot upgrade to a React version that supports the new JSX runtime. For more information about the old vs. new JSX runtime, please see: ", + type: "string", + enum: ["reactClassic"], + }, + ], + }, + Kind: { + oneOf: [ + { + type: "string", + enum: [ + "class", + "enum", + "interface", + "enumMember", + "importNamespace", + "exportNamespace", + "variable", + "const", + "let", + "using", + "var", + "catchParameter", + "indexParameter", + "exportAlias", + "importAlias", + "classGetter", + "classSetter", + "classMethod", + "objectLiteralProperty", + "objectLiteralGetter", + "objectLiteralSetter", + "objectLiteralMethod", + "typeAlias", + ], + }, + { description: "All kinds", type: "string", enum: ["any"] }, + { + description: + "All type definitions: classes, enums, interfaces, and type aliases", + type: "string", + enum: ["typeLike"], + }, + { + description: "Named function declarations and expressions", + type: "string", + enum: ["function"], + }, + { + description: "TypeScript namespaces, import and export namespaces", + type: "string", + enum: ["namespaceLike"], + }, + { + description: "TypeScript mamespaces", + type: "string", + enum: ["namespace"], + }, + { + description: "All function parameters, but parameter properties", + type: "string", + enum: ["functionParameter"], + }, + { + description: "All generic type parameters", + type: "string", + enum: ["typeParameter"], + }, + { + description: + "All class members: properties, methods, getters, and setters", + type: "string", + enum: ["classMember"], + }, + { + description: "All class properties, including parameter properties", + type: "string", + enum: ["classProperty"], + }, + { + description: + "All object literal members: properties, methods, getters, and setters", + type: "string", + enum: ["objectLiteralMember"], + }, + { + description: "All members defined in type alaises and interfaces", + type: "string", + enum: ["typeMember"], + }, + { + description: "All getters defined in type alaises and interfaces", + type: "string", + enum: ["typeGetter"], + }, + { + description: + "All properties defined in type alaises and interfaces", + type: "string", + enum: ["typeProperty"], + }, + { + description: "All setters defined in type alaises and interfaces", + type: "string", + enum: ["typeSetter"], + }, + { + description: "All methods defined in type alaises and interfaces", + type: "string", + enum: ["typeMethod"], + }, + ], + }, + LineEnding: { + oneOf: [ + { + description: + "Line Feed only (\\n), common on Linux and macOS as well as inside git repos", + type: "string", + enum: ["lf"], + }, + { + description: + "Carriage Return + Line Feed characters (\\r\\n), common on Windows", + type: "string", + enum: ["crlf"], + }, + { + description: + "Carriage Return character only (\\r), used very rarely", + type: "string", + enum: ["cr"], + }, + ], + }, + LineWidth: { + description: + "Validated value for the `line_width` formatter options\n\nThe allowed range of values is 1..=320", + type: "integer", + format: "uint16", + minimum: 0.0, + }, + LinterConfiguration: { + type: "object", + properties: { + enabled: { + description: + "if `false`, it disables the feature and the linter won't be executed. `true` by default", + type: ["boolean", "null"], + }, + ignore: { + description: + "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + include: { + description: + "A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + rules: { + description: "List of rules", + anyOf: [{ $ref: "#/definitions/Rules" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + Modifiers: { + type: "array", + items: { $ref: "#/definitions/RestrictedModifier" }, + uniqueItems: true, + }, + NamingConventionConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithNamingConventionOptions" }, + ], + }, + NamingConventionOptions: { + description: "Rule's options.", + type: "object", + properties: { + conventions: { + description: "Custom conventions.", + type: "array", + items: { $ref: "#/definitions/Convention" }, + }, + enumMemberCase: { + description: "Allowed cases for _TypeScript_ `enum` member names.", + allOf: [{ $ref: "#/definitions/Format" }], + }, + requireAscii: { + description: "If `false`, then non-ASCII characters are allowed.", + type: "boolean", + }, + strictCase: { + description: + "If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].", + type: "boolean", + }, + }, + additionalProperties: false, + }, + NoConsoleConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithNoConsoleOptions" }, + ], + }, + NoConsoleOptions: { + type: "object", + required: ["allow"], + properties: { + allow: { + description: "Allowed calls on the console object.", + type: "array", + items: { type: "string" }, + }, + }, + additionalProperties: false, + }, + NoDoubleEqualsConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithNoDoubleEqualsOptions" }, + ], + }, + NoDoubleEqualsOptions: { + description: "Rule's options", + type: "object", + properties: { + ignoreNull: { + description: + "If `true`, an exception is made when comparing with `null`, as it's often relied on to check both for `null` or `undefined`.\n\nIf `false`, no such exception will be made.", + type: "boolean", + }, + }, + additionalProperties: false, + }, + NoLabelWithoutControlConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithNoLabelWithoutControlOptions" }, + ], + }, + NoLabelWithoutControlOptions: { + type: "object", + required: ["inputComponents", "labelAttributes", "labelComponents"], + properties: { + inputComponents: { + description: + "Array of component names that should be considered the same as an `input` element.", + type: "array", + items: { type: "string" }, + }, + labelAttributes: { + description: + "Array of attributes that should be treated as the `label` accessible text content.", + type: "array", + items: { type: "string" }, + }, + labelComponents: { + description: + "Array of component names that should be considered the same as a `label` element.", + type: "array", + items: { type: "string" }, + }, + }, + additionalProperties: false, + }, + NoRestrictedTypesConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithNoRestrictedTypesOptions" }, + ], + }, + NoRestrictedTypesOptions: { + type: "object", + required: ["types"], + properties: { + types: { + type: "object", + additionalProperties: { + $ref: "#/definitions/CustomRestrictedType", + }, + }, + }, + additionalProperties: false, + }, + Nursery: { + description: "A list of rules that belong to this group", + type: "object", + properties: { + all: { + description: "It enables ALL rules for this group.", + type: ["boolean", "null"], + }, + noCommonJs: { + description: + "Disallow use of CommonJs module system in favor of ESM style imports.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noConsole: { + description: "Disallow the use of console.", + anyOf: [ + { $ref: "#/definitions/NoConsoleConfiguration" }, + { type: "null" }, + ], + }, + noDoneCallback: { + description: + "Disallow using a callback in asynchronous tests and hooks.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDuplicateAtImportRules: { + description: "Disallow duplicate @import rules.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDuplicateCustomProperties: { + description: + "Disallow duplicate custom properties within declaration blocks.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDuplicateElseIf: { + description: "Disallow duplicate conditions in if-else-if chains", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDuplicateFontNames: { + description: "Disallow duplicate names within font families.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDuplicateSelectorsKeyframeBlock: { + description: "Disallow duplicate selectors within keyframe blocks.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDuplicatedFields: { + description: "No duplicated fields in GraphQL operations.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDynamicNamespaceImportAccess: { + description: "Disallow accessing namespace imports dynamically.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noEmptyBlock: { + description: "Disallow CSS empty blocks.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noEnum: { + description: "Disallow TypeScript enum.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noEvolvingTypes: { + description: + "Disallow variables from evolving into any type through reassignments.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noExportedImports: { + description: "Disallow exporting an imported variable.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noImportantInKeyframe: { + description: + "Disallow invalid !important within keyframe declarations", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noInvalidDirectionInLinearGradient: { + description: + "Disallow non-standard direction values for linear gradient functions.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noInvalidGridAreas: { + description: + "Disallows invalid named grid areas in CSS Grid Layouts.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noInvalidPositionAtImportRule: { + description: + "Disallow the use of @import at-rules in invalid positions.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noIrregularWhitespace: { + description: + "Disallows the use of irregular whitespace characters.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noLabelWithoutControl: { + description: + "Enforce that a label element or component has a text label and an associated input.", + anyOf: [ + { $ref: "#/definitions/NoLabelWithoutControlConfiguration" }, + { type: "null" }, + ], + }, + noMisplacedAssertion: { + description: + "Checks that the assertion function, for example expect, is placed inside an it() function call.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noReactSpecificProps: { + description: + "Prevents React-specific JSX properties from being used.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noRestrictedImports: { + description: + "Disallow specified modules when loaded by import or require.", + anyOf: [ + { $ref: "#/definitions/RestrictedImportsConfiguration" }, + { type: "null" }, + ], + }, + noRestrictedTypes: { + description: "Disallow user defined types.", + anyOf: [ + { $ref: "#/definitions/NoRestrictedTypesConfiguration" }, + { type: "null" }, + ], + }, + noSecrets: { + description: + "Disallow usage of sensitive data such as API keys and tokens.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noShorthandPropertyOverrides: { + description: + "Disallow shorthand properties that override related longhand properties.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noStaticElementInteractions: { + description: + "Enforce that static, visible elements (such as \\
) that have click handlers use the valid role attribute.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noSubstr: { + description: + "Enforce the use of String.slice() over String.substr() and String.substring().", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUndeclaredDependencies: { + description: + "Disallow the use of dependencies that aren't specified in the package.json.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnknownFunction: { + description: "Disallow unknown CSS value functions.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnknownMediaFeatureName: { + description: "Disallow unknown media feature names.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnknownProperty: { + description: "Disallow unknown properties.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnknownPseudoClass: { + description: "Disallow unknown pseudo-class selectors.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnknownPseudoElement: { + description: "Disallow unknown pseudo-element selectors.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnknownUnit: { + description: "Disallow unknown CSS units.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnmatchableAnbSelector: { + description: "Disallow unmatchable An+B selectors.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnusedFunctionParameters: { + description: "Disallow unused function parameters.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessEscapeInRegex: { + description: + "Disallow unnecessary escape sequence in regular expression literals.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessStringConcat: { + description: + "Disallow unnecessary concatenation of string or template literals.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessUndefinedInitialization: { + description: "Disallow initializing variables to undefined.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noValueAtRule: { + description: "Disallow use of @value rule in css modules.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noYodaExpression: { + description: "Disallow the use of yoda expressions.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + recommended: { + description: "It enables the recommended rules for this group", + type: ["boolean", "null"], + }, + useAdjacentOverloadSignatures: { + description: + "Disallow the use of overload signatures that are not next to each other.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useAriaPropsSupportedByRole: { + description: + "Enforce that ARIA properties are valid for the roles that are supported by the element.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useConsistentBuiltinInstantiation: { + description: + "Enforce the use of new for all builtins, except String, Number, Boolean, Symbol and BigInt.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useConsistentCurlyBraces: { + description: + "This rule enforces consistent use of curly braces inside JSX attributes and JSX children.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useConsistentMemberAccessibility: { + description: + "Require consistent accessibility modifiers on class properties and methods.", + anyOf: [ + { + $ref: "#/definitions/ConsistentMemberAccessibilityConfiguration", + }, + { type: "null" }, + ], + }, + useDateNow: { + description: + "Use Date.now() to get the number of milliseconds since the Unix Epoch.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useDefaultSwitchClause: { + description: "Require the default clause in switch statements.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useDeprecatedReason: { + description: + "Require specifying the reason argument when using @deprecated directive", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useErrorMessage: { + description: + "Enforce passing a message value when creating a built-in error.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useExplicitLengthCheck: { + description: + "Enforce explicitly comparing the length, size, byteLength or byteOffset property of a value.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useFocusableInteractive: { + description: + "Elements with an interactive role and interaction handlers must be focusable.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useGenericFontNames: { + description: + "Disallow a missing generic family keyword within font families.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useImportExtensions: { + description: "Enforce file extensions for relative imports.", + anyOf: [ + { $ref: "#/definitions/UseImportExtensionsConfiguration" }, + { type: "null" }, + ], + }, + useImportRestrictions: { + description: "Disallows package private imports.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useNumberToFixedDigitsArgument: { + description: + "Enforce using the digits argument with Number#toFixed().", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useSemanticElements: { + description: + "It detects the use of role attributes in JSX elements and suggests using semantic elements instead.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useSortedClasses: { + description: "Enforce the sorting of CSS utility classes.", + anyOf: [ + { $ref: "#/definitions/UtilityClassSortingConfiguration" }, + { type: "null" }, + ], + }, + useStrictMode: { + description: + 'Enforce the use of the directive "use strict" in script files.', + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useThrowNewError: { + description: "Require new when throwing an error.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useThrowOnlyError: { + description: "Disallow throwing non-Error values.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useTopLevelRegex: { + description: + "Require regex literals to be declared at the top level.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useTrimStartEnd: { + description: + "Enforce the use of String.trimStart() and String.trimEnd() over String.trimLeft() and String.trimRight().", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useValidAutocomplete: { + description: + "Use valid values for the autocomplete attribute on input elements.", + anyOf: [ + { $ref: "#/definitions/UseValidAutocompleteConfiguration" }, + { type: "null" }, + ], + }, + }, + additionalProperties: false, + }, + OrganizeImports: { + type: "object", + properties: { + enabled: { + description: "Enables the organization of imports", + type: ["boolean", "null"], + }, + ignore: { + description: + "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + include: { + description: + "A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + OverrideFormatterConfiguration: { + type: "object", + properties: { + attributePosition: { + description: "The attribute position style.", + anyOf: [ + { $ref: "#/definitions/AttributePosition" }, + { type: "null" }, + ], + }, + bracketSpacing: { + description: + "Whether to insert spaces around brackets in object literals. Defaults to true.", + anyOf: [{ $ref: "#/definitions/BracketSpacing" }, { type: "null" }], + }, + enabled: { type: ["boolean", "null"] }, + formatWithErrors: { + description: + "Stores whether formatting should be allowed to proceed if a given file has syntax errors", + type: ["boolean", "null"], + }, + indentSize: { + description: + "The size of the indentation, 2 by default (deprecated, use `indent-width`)", + anyOf: [{ $ref: "#/definitions/IndentWidth" }, { type: "null" }], + }, + indentStyle: { + description: "The indent style.", + anyOf: [{ $ref: "#/definitions/IndentStyle" }, { type: "null" }], + }, + indentWidth: { + description: "The size of the indentation, 2 by default", + anyOf: [{ $ref: "#/definitions/IndentWidth" }, { type: "null" }], + }, + lineEnding: { + description: "The type of line ending.", + anyOf: [{ $ref: "#/definitions/LineEnding" }, { type: "null" }], + }, + lineWidth: { + description: "What's the max width of a line. Defaults to 80.", + anyOf: [{ $ref: "#/definitions/LineWidth" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + OverrideLinterConfiguration: { + type: "object", + properties: { + enabled: { + description: + "if `false`, it disables the feature and the linter won't be executed. `true` by default", + type: ["boolean", "null"], + }, + rules: { + description: "List of rules", + anyOf: [{ $ref: "#/definitions/Rules" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + OverrideOrganizeImportsConfiguration: { + type: "object", + properties: { + enabled: { + description: + "if `false`, it disables the feature and the linter won't be executed. `true` by default", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + OverridePattern: { + type: "object", + properties: { + css: { + description: "Specific configuration for the Css language", + anyOf: [ + { $ref: "#/definitions/CssConfiguration" }, + { type: "null" }, + ], + }, + formatter: { + description: "Specific configuration for the Json language", + anyOf: [ + { $ref: "#/definitions/OverrideFormatterConfiguration" }, + { type: "null" }, + ], + }, + graphql: { + description: "Specific configuration for the Graphql language", + anyOf: [ + { $ref: "#/definitions/GraphqlConfiguration" }, + { type: "null" }, + ], + }, + ignore: { + description: + "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + include: { + description: + "A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.", + anyOf: [{ $ref: "#/definitions/StringSet" }, { type: "null" }], + }, + javascript: { + description: "Specific configuration for the JavaScript language", + anyOf: [ + { $ref: "#/definitions/JavascriptConfiguration" }, + { type: "null" }, + ], + }, + json: { + description: "Specific configuration for the Json language", + anyOf: [ + { $ref: "#/definitions/JsonConfiguration" }, + { type: "null" }, + ], + }, + linter: { + description: "Specific configuration for the Json language", + anyOf: [ + { $ref: "#/definitions/OverrideLinterConfiguration" }, + { type: "null" }, + ], + }, + organizeImports: { + description: "Specific configuration for the Json language", + anyOf: [ + { $ref: "#/definitions/OverrideOrganizeImportsConfiguration" }, + { type: "null" }, + ], + }, + }, + additionalProperties: false, + }, + Overrides: { + type: "array", + items: { $ref: "#/definitions/OverridePattern" }, + }, + Performance: { + description: "A list of rules that belong to this group", + type: "object", + properties: { + all: { + description: "It enables ALL rules for this group.", + type: ["boolean", "null"], + }, + noAccumulatingSpread: { + description: + "Disallow the use of spread (...) syntax on accumulators.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noBarrelFile: { + description: "Disallow the use of barrel file.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDelete: { + description: "Disallow the use of the delete operator.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noReExportAll: { + description: "Avoid re-export all.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + recommended: { + description: "It enables the recommended rules for this group", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + QuoteProperties: { type: "string", enum: ["asNeeded", "preserve"] }, + QuoteStyle: { type: "string", enum: ["double", "single"] }, + Regex: { type: "string" }, + RestrictedGlobalsConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithRestrictedGlobalsOptions" }, + ], + }, + RestrictedGlobalsOptions: { + description: "Options for the rule `noRestrictedGlobals`.", + type: "object", + required: ["deniedGlobals"], + properties: { + deniedGlobals: { + description: "A list of names that should trigger the rule", + type: "array", + items: { type: "string" }, + }, + }, + additionalProperties: false, + }, + RestrictedImportsConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithRestrictedImportsOptions" }, + ], + }, + RestrictedImportsOptions: { + description: "Options for the rule `noRestrictedImports`.", + type: "object", + required: ["paths"], + properties: { + paths: { + description: "A list of names that should trigger the rule", + type: "object", + additionalProperties: { type: "string" }, + }, + }, + additionalProperties: false, + }, + RestrictedModifier: { + type: "string", + enum: ["abstract", "private", "protected", "readonly", "static"], + }, + RuleAssistConfiguration: { type: "string", enum: ["on", "off"] }, + RuleConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithNoOptions" }, + ], + }, + RuleFixConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithFixNoOptions" }, + ], + }, + RulePlainConfiguration: { + type: "string", + enum: ["warn", "error", "info", "off"], + }, + RuleWithAllowDomainOptions: { + type: "object", + required: ["level", "options"], + properties: { + fix: { + description: "The kind of the code actions emitted by the rule", + anyOf: [{ $ref: "#/definitions/FixKind" }, { type: "null" }], + }, + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/AllowDomainOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithComplexityOptions: { + type: "object", + required: ["level", "options"], + properties: { + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/ComplexityOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithConsistentArrayTypeOptions: { + type: "object", + required: ["level", "options"], + properties: { + fix: { + description: "The kind of the code actions emitted by the rule", + anyOf: [{ $ref: "#/definitions/FixKind" }, { type: "null" }], + }, + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/ConsistentArrayTypeOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithConsistentMemberAccessibilityOptions: { + type: "object", + required: ["level", "options"], + properties: { + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [ + { $ref: "#/definitions/ConsistentMemberAccessibilityOptions" }, + ], + }, + }, + additionalProperties: false, + }, + RuleWithDeprecatedHooksOptions: { + type: "object", + required: ["level", "options"], + properties: { + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/DeprecatedHooksOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithFilenamingConventionOptions: { + type: "object", + required: ["level", "options"], + properties: { + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/FilenamingConventionOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithFixNoOptions: { + type: "object", + required: ["level"], + properties: { + fix: { + description: "The kind of the code actions emitted by the rule", + anyOf: [{ $ref: "#/definitions/FixKind" }, { type: "null" }], + }, + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + }, + additionalProperties: false, + }, + RuleWithHooksOptions: { + type: "object", + required: ["level", "options"], + properties: { + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/HooksOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithNamingConventionOptions: { + type: "object", + required: ["level", "options"], + properties: { + fix: { + description: "The kind of the code actions emitted by the rule", + anyOf: [{ $ref: "#/definitions/FixKind" }, { type: "null" }], + }, + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/NamingConventionOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithNoConsoleOptions: { + type: "object", + required: ["level", "options"], + properties: { + fix: { + description: "The kind of the code actions emitted by the rule", + anyOf: [{ $ref: "#/definitions/FixKind" }, { type: "null" }], + }, + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/NoConsoleOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithNoDoubleEqualsOptions: { + type: "object", + required: ["level", "options"], + properties: { + fix: { + description: "The kind of the code actions emitted by the rule", + anyOf: [{ $ref: "#/definitions/FixKind" }, { type: "null" }], + }, + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/NoDoubleEqualsOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithNoLabelWithoutControlOptions: { + type: "object", + required: ["level", "options"], + properties: { + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/NoLabelWithoutControlOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithNoOptions: { + type: "object", + required: ["level"], + properties: { + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + }, + additionalProperties: false, + }, + RuleWithNoRestrictedTypesOptions: { + type: "object", + required: ["level", "options"], + properties: { + fix: { + description: "The kind of the code actions emitted by the rule", + anyOf: [{ $ref: "#/definitions/FixKind" }, { type: "null" }], + }, + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/NoRestrictedTypesOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithRestrictedGlobalsOptions: { + type: "object", + required: ["level", "options"], + properties: { + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/RestrictedGlobalsOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithRestrictedImportsOptions: { + type: "object", + required: ["level", "options"], + properties: { + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/RestrictedImportsOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithUseImportExtensionsOptions: { + type: "object", + required: ["level", "options"], + properties: { + fix: { + description: "The kind of the code actions emitted by the rule", + anyOf: [{ $ref: "#/definitions/FixKind" }, { type: "null" }], + }, + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/UseImportExtensionsOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithUseValidAutocompleteOptions: { + type: "object", + required: ["level", "options"], + properties: { + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/UseValidAutocompleteOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithUtilityClassSortingOptions: { + type: "object", + required: ["level", "options"], + properties: { + fix: { + description: "The kind of the code actions emitted by the rule", + anyOf: [{ $ref: "#/definitions/FixKind" }, { type: "null" }], + }, + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/UtilityClassSortingOptions" }], + }, + }, + additionalProperties: false, + }, + RuleWithValidAriaRoleOptions: { + type: "object", + required: ["level", "options"], + properties: { + fix: { + description: "The kind of the code actions emitted by the rule", + anyOf: [{ $ref: "#/definitions/FixKind" }, { type: "null" }], + }, + level: { + description: "The severity of the emitted diagnostics by the rule", + allOf: [{ $ref: "#/definitions/RulePlainConfiguration" }], + }, + options: { + description: "Rule's options", + allOf: [{ $ref: "#/definitions/ValidAriaRoleOptions" }], + }, + }, + additionalProperties: false, + }, + Rules: { + type: "object", + properties: { + a11y: { + anyOf: [{ $ref: "#/definitions/A11y" }, { type: "null" }], + }, + all: { + description: + "It enables ALL rules. The rules that belong to `nursery` won't be enabled.", + type: ["boolean", "null"], + }, + complexity: { + anyOf: [{ $ref: "#/definitions/Complexity" }, { type: "null" }], + }, + correctness: { + anyOf: [{ $ref: "#/definitions/Correctness" }, { type: "null" }], + }, + nursery: { + anyOf: [{ $ref: "#/definitions/Nursery" }, { type: "null" }], + }, + performance: { + anyOf: [{ $ref: "#/definitions/Performance" }, { type: "null" }], + }, + recommended: { + description: + "It enables the lint rules recommended by Biome. `true` by default.", + type: ["boolean", "null"], + }, + security: { + anyOf: [{ $ref: "#/definitions/Security" }, { type: "null" }], + }, + style: { + anyOf: [{ $ref: "#/definitions/Style" }, { type: "null" }], + }, + suspicious: { + anyOf: [{ $ref: "#/definitions/Suspicious" }, { type: "null" }], + }, + }, + additionalProperties: false, + }, + Scope: { type: "string", enum: ["any", "global"] }, + Security: { + description: "A list of rules that belong to this group", + type: "object", + properties: { + all: { + description: "It enables ALL rules for this group.", + type: ["boolean", "null"], + }, + noDangerouslySetInnerHtml: { + description: "Prevent the usage of dangerous JSX props", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDangerouslySetInnerHtmlWithChildren: { + description: + "Report when a DOM element or a component uses both children and dangerouslySetInnerHTML prop.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noGlobalEval: { + description: "Disallow the use of global eval().", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + recommended: { + description: "It enables the recommended rules for this group", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + Selector: { + type: "object", + properties: { + kind: { + description: "Declaration kind", + allOf: [{ $ref: "#/definitions/Kind" }], + }, + modifiers: { + description: "Modifiers used on the declaration", + allOf: [{ $ref: "#/definitions/Modifiers" }], + }, + scope: { + description: "Scope of the declaration", + allOf: [{ $ref: "#/definitions/Scope" }], + }, + }, + additionalProperties: false, + }, + Semicolons: { type: "string", enum: ["always", "asNeeded"] }, + Source: { + description: "A list of rules that belong to this group", + type: "object", + properties: { + sortJsxProps: { + description: "Enforce props sorting in JSX elements.", + anyOf: [ + { $ref: "#/definitions/RuleAssistConfiguration" }, + { type: "null" }, + ], + }, + useSortedKeys: { + description: "Sorts the keys of a JSON object in natural order", + anyOf: [ + { $ref: "#/definitions/RuleAssistConfiguration" }, + { type: "null" }, + ], + }, + }, + additionalProperties: false, + }, + StableHookResult: { + oneOf: [ + { + description: "Whether the hook has a stable result.", + type: "boolean", + }, + { + description: + "Used to indicate the hook returns an array and some of its indices have stable identities.", + type: "array", + items: { + type: "integer", + format: "uint8", + maximum: 255.0, + minimum: 0.0, + }, + minItems: 1, + }, + ], + }, + StringSet: { + type: "array", + items: { type: "string" }, + uniqueItems: true, + }, + Style: { + description: "A list of rules that belong to this group", + type: "object", + properties: { + all: { + description: "It enables ALL rules for this group.", + type: ["boolean", "null"], + }, + noArguments: { + description: "Disallow the use of arguments.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noCommaOperator: { + description: "Disallow comma operator.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDefaultExport: { + description: "Disallow default exports.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noImplicitBoolean: { + description: + "Disallow implicit true values on JSX boolean attributes", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noInferrableTypes: { + description: + "Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noNamespace: { + description: "Disallow the use of TypeScript's namespaces.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noNamespaceImport: { + description: "Disallow the use of namespace imports.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noNegationElse: { + description: + "Disallow negation in the condition of an if statement if it has an else clause.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noNonNullAssertion: { + description: + "Disallow non-null assertions using the ! postfix operator.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noParameterAssign: { + description: "Disallow reassigning function parameters.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noParameterProperties: { + description: + "Disallow the use of parameter properties in class constructors.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noRestrictedGlobals: { + description: + "This rule allows you to specify global variable names that you donโ€™t want to use in your application.", + anyOf: [ + { $ref: "#/definitions/RestrictedGlobalsConfiguration" }, + { type: "null" }, + ], + }, + noShoutyConstants: { + description: + "Disallow the use of constants which its value is the upper-case version of its name.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUnusedTemplateLiteral: { + description: + "Disallow template literals if interpolation and special-character handling are not needed", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noUselessElse: { + description: "Disallow else block when the if block breaks early.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noVar: { + description: "Disallow the use of var", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + recommended: { + description: "It enables the recommended rules for this group", + type: ["boolean", "null"], + }, + useAsConstAssertion: { + description: + "Enforce the use of as const over literal type and type annotation.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useBlockStatements: { + description: "Requires following curly brace conventions.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useCollapsedElseIf: { + description: + "Enforce using else if instead of nested if in else clauses.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useConsistentArrayType: { + description: + "Require consistently using either T\\[] or Array\\", + anyOf: [ + { $ref: "#/definitions/ConsistentArrayTypeConfiguration" }, + { type: "null" }, + ], + }, + useConst: { + description: + "Require const declarations for variables that are only assigned once.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useDefaultParameterLast: { + description: + "Enforce default function parameters and optional function parameters to be last.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useEnumInitializers: { + description: + "Require that each enum member value be explicitly initialized.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useExponentiationOperator: { + description: + "Disallow the use of Math.pow in favor of the ** operator.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useExportType: { + description: "Promotes the use of export type for types.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useFilenamingConvention: { + description: + "Enforce naming conventions for JavaScript and TypeScript filenames.", + anyOf: [ + { $ref: "#/definitions/FilenamingConventionConfiguration" }, + { type: "null" }, + ], + }, + useForOf: { + description: + "This rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useFragmentSyntax: { + description: + "This rule enforces the use of \\<>...\\ over \\...\\.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useImportType: { + description: "Promotes the use of import type for types.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useLiteralEnumMembers: { + description: "Require all enum members to be literal values.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useNamingConvention: { + description: + "Enforce naming conventions for everything across a codebase.", + anyOf: [ + { $ref: "#/definitions/NamingConventionConfiguration" }, + { type: "null" }, + ], + }, + useNodeAssertStrict: { + description: + "Promotes the usage of node:assert/strict over node:assert.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useNodejsImportProtocol: { + description: + "Enforces using the node: protocol for Node.js builtin modules.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useNumberNamespace: { + description: "Use the Number properties instead of global ones.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useNumericLiterals: { + description: + "Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useSelfClosingElements: { + description: + "Prevent extra closing tags for components without children", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useShorthandArrayType: { + description: + "When expressing array types, this rule promotes the usage of T\\[] shorthand instead of Array\\.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useShorthandAssign: { + description: + "Require assignment operator shorthand where possible.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useShorthandFunctionType: { + description: + "Enforce using function types instead of object type with call signatures.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useSingleCaseStatement: { + description: + "Enforces switch clauses have a single statement, emits a quick fix wrapping the statements in a block.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useSingleVarDeclarator: { + description: + "Disallow multiple variable declarations in the same variable statement", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useTemplate: { + description: "Prefer template literals over string concatenation.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useWhile: { + description: + "Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + }, + additionalProperties: false, + }, + SuggestedExtensionMapping: { + type: "object", + required: ["component", "module"], + properties: { + component: { + description: + "Extension that should be used for component file imports", + type: "string", + }, + module: { + description: "Extension that should be used for module imports", + type: "string", + }, + }, + additionalProperties: false, + }, + Suspicious: { + description: "A list of rules that belong to this group", + type: "object", + properties: { + all: { + description: "It enables ALL rules for this group.", + type: ["boolean", "null"], + }, + noApproximativeNumericConstant: { + description: + "Use standard constants instead of approximated literals.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noArrayIndexKey: { + description: "Discourage the usage of Array index in keys.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noAssignInExpressions: { + description: "Disallow assignments in expressions.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noAsyncPromiseExecutor: { + description: + "Disallows using an async function as a Promise executor.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noCatchAssign: { + description: "Disallow reassigning exceptions in catch clauses.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noClassAssign: { + description: "Disallow reassigning class members.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noCommentText: { + description: "Prevent comments from being inserted as text nodes", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noCompareNegZero: { + description: "Disallow comparing against -0", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noConfusingLabels: { + description: "Disallow labeled statements that are not loops.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noConfusingVoidType: { + description: + "Disallow void type outside of generic or return types.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noConsoleLog: { + description: "Disallow the use of console.log", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noConstEnum: { + description: "Disallow TypeScript const enum", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noControlCharactersInRegex: { + description: + "Prevents from having control characters and some escape sequences that match control characters in regular expressions.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDebugger: { + description: "Disallow the use of debugger", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noDoubleEquals: { + description: "Require the use of === and !==.", + anyOf: [ + { $ref: "#/definitions/NoDoubleEqualsConfiguration" }, + { type: "null" }, + ], + }, + noDuplicateCase: { + description: "Disallow duplicate case labels.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDuplicateClassMembers: { + description: "Disallow duplicate class members.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDuplicateJsxProps: { + description: + "Prevents JSX properties to be assigned multiple times.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDuplicateObjectKeys: { + description: "Disallow two keys with the same name inside objects.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDuplicateParameters: { + description: "Disallow duplicate function parameter name.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noDuplicateTestHooks: { + description: "A describe block should not contain duplicate hooks.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noEmptyBlockStatements: { + description: "Disallow empty block statements and static blocks.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noEmptyInterface: { + description: "Disallow the declaration of empty interfaces.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noExplicitAny: { + description: "Disallow the any type usage.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noExportsInTest: { + description: + "Disallow using export or module.exports in files containing tests", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noExtraNonNullAssertion: { + description: + "Prevents the wrong usage of the non-null assertion operator (!) in TypeScript files.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noFallthroughSwitchClause: { + description: "Disallow fallthrough of switch clauses.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noFocusedTests: { + description: "Disallow focused tests.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noFunctionAssign: { + description: "Disallow reassigning function declarations.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noGlobalAssign: { + description: + "Disallow assignments to native objects and read-only global variables.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noGlobalIsFinite: { + description: "Use Number.isFinite instead of global isFinite.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noGlobalIsNan: { + description: "Use Number.isNaN instead of global isNaN.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noImplicitAnyLet: { + description: + "Disallow use of implicit any type on variable declarations.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noImportAssign: { + description: "Disallow assigning to imported bindings", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noLabelVar: { + description: "Disallow labels that share a name with a variable", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noMisleadingCharacterClass: { + description: + "Disallow characters made with multiple code points in character class syntax.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noMisleadingInstantiator: { + description: "Enforce proper usage of new and constructor.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noMisrefactoredShorthandAssign: { + description: + "Disallow shorthand assign when variable appears on both sides.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noPrototypeBuiltins: { + description: "Disallow direct use of Object.prototype builtins.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noRedeclare: { + description: + "Disallow variable, function, class, and type redeclarations in the same scope.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noRedundantUseStrict: { + description: 'Prevents from having redundant "use strict".', + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noSelfCompare: { + description: + "Disallow comparisons where both sides are exactly the same.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noShadowRestrictedNames: { + description: + "Disallow identifiers from shadowing restricted names.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noSkippedTests: { + description: "Disallow disabled tests.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noSparseArray: { + description: "Disallow sparse arrays", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + noSuspiciousSemicolonInJsx: { + description: + 'It detects possible "wrong" semicolons inside JSX elements.', + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noThenProperty: { + description: "Disallow then property.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnsafeDeclarationMerging: { + description: + "Disallow unsafe declaration merging between interfaces and classes.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + noUnsafeNegation: { + description: "Disallow using unsafe negation.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + recommended: { + description: "It enables the recommended rules for this group", + type: ["boolean", "null"], + }, + useAwait: { + description: "Ensure async functions utilize await.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useDefaultSwitchClauseLast: { + description: + "Enforce default clauses in switch statements to be last", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useGetterReturn: { + description: "Enforce get methods to always return a value.", + anyOf: [ + { $ref: "#/definitions/RuleConfiguration" }, + { type: "null" }, + ], + }, + useIsArray: { + description: "Use Array.isArray() instead of instanceof Array.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useNamespaceKeyword: { + description: + "Require using the namespace keyword over the module keyword to declare TypeScript namespaces.", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + useValidTypeof: { + description: + "This rule verifies the result of typeof $expr unary expressions is being compared to valid values, either string literals containing valid type names or other typeof expressions", + anyOf: [ + { $ref: "#/definitions/RuleFixConfiguration" }, + { type: "null" }, + ], + }, + }, + additionalProperties: false, + }, + TrailingCommas: { + description: + "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.", + oneOf: [ + { + description: + "Trailing commas wherever possible (including function parameters and calls).", + type: "string", + enum: ["all"], + }, + { + description: + "Trailing commas where valid in ES5 (objects, arrays, etc.). No trailing commas in type parameters in TypeScript.", + type: "string", + enum: ["es5"], + }, + { + description: "No trailing commas.", + type: "string", + enum: ["none"], + }, + ], + }, + TrailingCommas2: { + oneOf: [ + { + description: "The formatter will remove the trailing commas", + type: "string", + enum: ["none"], + }, + { + description: "The trailing commas are allowed and advised", + type: "string", + enum: ["all"], + }, + ], + }, + UseImportExtensionsConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithUseImportExtensionsOptions" }, + ], + }, + UseImportExtensionsOptions: { + type: "object", + required: ["suggestedExtensions"], + properties: { + suggestedExtensions: { + description: + "A map of custom import extension mappings, where the key is the inspected file extension, and the value is a pair of `module` extension and `component` import extension", + type: "object", + additionalProperties: { + $ref: "#/definitions/SuggestedExtensionMapping", + }, + }, + }, + additionalProperties: false, + }, + UseValidAutocompleteConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithUseValidAutocompleteOptions" }, + ], + }, + UseValidAutocompleteOptions: { + type: "object", + required: ["inputComponents"], + properties: { + inputComponents: { + description: + "`input` like custom components that should be checked.", + type: "array", + items: { type: "string" }, + }, + }, + additionalProperties: false, + }, + UtilityClassSortingConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithUtilityClassSortingOptions" }, + ], + }, + UtilityClassSortingOptions: { + type: "object", + properties: { + attributes: { + description: "Additional attributes that will be sorted.", + type: ["array", "null"], + items: { type: "string" }, + }, + functions: { + description: + "Names of the functions or tagged templates that will be sorted.", + type: ["array", "null"], + items: { type: "string" }, + }, + }, + additionalProperties: false, + }, + ValidAriaRoleConfiguration: { + anyOf: [ + { $ref: "#/definitions/RulePlainConfiguration" }, + { $ref: "#/definitions/RuleWithValidAriaRoleOptions" }, + ], + }, + ValidAriaRoleOptions: { + type: "object", + required: ["allowInvalidRoles", "ignoreNonDom"], + properties: { + allowInvalidRoles: { type: "array", items: { type: "string" } }, + ignoreNonDom: { type: "boolean" }, + }, + additionalProperties: false, + }, + VcsClientKind: { + oneOf: [ + { + description: "Integration with the git client as VCS", + type: "string", + enum: ["git"], + }, + ], + }, + VcsConfiguration: { + description: + "Set of properties to integrate Biome with a VCS software.", + type: "object", + properties: { + clientKind: { + description: "The kind of client.", + anyOf: [{ $ref: "#/definitions/VcsClientKind" }, { type: "null" }], + }, + defaultBranch: { + description: "The main branch of the project", + type: ["string", "null"], + }, + enabled: { + description: + "Whether Biome should integrate itself with the VCS client", + type: ["boolean", "null"], + }, + root: { + description: + "The folder where Biome should check for VCS files. By default, Biome will use the same folder where `biome.json` was found.\n\nIf Biome can't find the configuration, it will attempt to use the current working directory. If no current working directory can't be found, Biome won't use the VCS integration, and a diagnostic will be emitted", + type: ["string", "null"], + }, + useIgnoreFile: { + description: + "Whether Biome should use the VCS ignore file. When [true], Biome will ignore the files specified in the ignore file.", + type: ["boolean", "null"], + }, + }, + additionalProperties: false, + }, + }, + }; + return new Response(JSON.stringify(schema), { + status: 200, + headers: { + "content-type": "application/json", + }, + }); +}