From 5ed0a1d5740ead22ce6956dd79c9830cb091400b Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Tue, 29 Oct 2024 16:00:19 +0000 Subject: [PATCH 1/3] feat: assist documentation --- astro.config.ts | 926 +++++++++--------- codegen/src/lintdoc.rs | 641 ++++++++---- codegen/src/rules_sources.rs | 13 +- package.json | 148 +-- src/components/generated/assist/Groups.astro | 2 + .../generated/assist/NumberOfRules.astro | 2 + .../generated/assist/RecommendedRules.astro | 4 + .../generated/{ => linter}/Groups.astro | 0 .../{ => linter}/NumberOfRules.astro | 0 .../{ => linter}/RecommendedRules.astro | 0 src/content/docs/assist/actions/index.mdx | 35 + .../assist/actions/use-sorted-attributes.mdx | 47 + .../docs/assist/actions/use-sorted-keys.mdx | 35 + src/content/docs/assist/index.mdx | 6 + src/content/docs/assist/rules-sources.mdx | 19 + src/content/docs/index.mdx | 2 +- src/content/docs/ja/linter/index.mdx | 4 +- src/content/docs/linter/index.mdx | 2 +- src/content/docs/linter/rules/index.mdx | 6 +- .../docs/linter/rules/no-access-key.mdx | 1 + .../linter/rules/no-accumulating-spread.mdx | 1 + .../no-approximative-numeric-constant.mdx | 1 + .../docs/linter/rules/no-arguments.mdx | 1 + .../rules/no-aria-hidden-on-focusable.mdx | 1 + .../rules/no-aria-unsupported-elements.mdx | 1 + .../docs/linter/rules/no-array-index-key.mdx | 1 + .../linter/rules/no-assign-in-expressions.mdx | 1 + .../rules/no-async-promise-executor.mdx | 1 + .../docs/linter/rules/no-autofocus.mdx | 1 + .../docs/linter/rules/no-banned-types.mdx | 1 + .../docs/linter/rules/no-barrel-file.mdx | 1 + .../docs/linter/rules/no-blank-target.mdx | 1 + .../docs/linter/rules/no-catch-assign.mdx | 1 + .../docs/linter/rules/no-children-prop.mdx | 1 + .../docs/linter/rules/no-class-assign.mdx | 1 + .../docs/linter/rules/no-comma-operator.mdx | 1 + .../docs/linter/rules/no-comment-text.mdx | 1 + .../docs/linter/rules/no-common-js.mdx | 1 + .../docs/linter/rules/no-compare-neg-zero.mdx | 1 + .../docs/linter/rules/no-confusing-labels.mdx | 1 + .../linter/rules/no-confusing-void-type.mdx | 1 + .../docs/linter/rules/no-console-log.mdx | 1 + src/content/docs/linter/rules/no-console.mdx | 1 + .../docs/linter/rules/no-const-assign.mdx | 1 + .../docs/linter/rules/no-const-enum.mdx | 1 + .../linter/rules/no-constant-condition.mdx | 1 + .../rules/no-constant-math-min-max-clamp.mdx | 1 + .../linter/rules/no-constructor-return.mdx | 1 + .../rules/no-control-characters-in-regex.mdx | 1 + ...ngerously-set-inner-html-with-children.mdx | 1 + .../rules/no-dangerously-set-inner-html.mdx | 1 + src/content/docs/linter/rules/no-debugger.mdx | 1 + .../docs/linter/rules/no-default-export.mdx | 1 + src/content/docs/linter/rules/no-delete.mdx | 1 + .../rules/no-descending-specificity.mdx | 1 + .../linter/rules/no-distracting-elements.mdx | 1 + .../docs/linter/rules/no-document-cookie.mdx | 1 + .../rules/no-document-import-in-page.mdx | 1 + .../docs/linter/rules/no-done-callback.mdx | 1 + .../docs/linter/rules/no-double-equals.mdx | 1 + .../rules/no-duplicate-at-import-rules.mdx | 1 + .../docs/linter/rules/no-duplicate-case.mdx | 1 + .../rules/no-duplicate-class-members.mdx | 1 + .../rules/no-duplicate-custom-properties.mdx | 1 + .../linter/rules/no-duplicate-else-if.mdx | 1 + .../linter/rules/no-duplicate-font-names.mdx | 1 + .../linter/rules/no-duplicate-jsx-props.mdx | 1 + .../linter/rules/no-duplicate-object-keys.mdx | 2 + .../linter/rules/no-duplicate-parameters.mdx | 1 + .../linter/rules/no-duplicate-properties.mdx | 1 + .../no-duplicate-selectors-keyframe-block.mdx | 1 + .../linter/rules/no-duplicate-test-hooks.mdx | 1 + .../linter/rules/no-duplicated-fields.mdx | 3 +- .../no-dynamic-namespace-import-access.mdx | 1 + .../rules/no-empty-block-statements.mdx | 1 + .../docs/linter/rules/no-empty-block.mdx | 1 + .../no-empty-character-class-in-regex.mdx | 1 + .../docs/linter/rules/no-empty-interface.mdx | 1 + .../docs/linter/rules/no-empty-pattern.mdx | 1 + .../linter/rules/no-empty-type-parameters.mdx | 1 + src/content/docs/linter/rules/no-enum.mdx | 1 + .../docs/linter/rules/no-evolving-types.mdx | 1 + .../no-excessive-cognitive-complexity.mdx | 1 + .../rules/no-excessive-nested-test-suites.mdx | 1 + .../docs/linter/rules/no-explicit-any.mdx | 1 + .../docs/linter/rules/no-exported-imports.mdx | 1 + .../docs/linter/rules/no-exports-in-test.mdx | 1 + .../linter/rules/no-extra-boolean-cast.mdx | 1 + .../rules/no-extra-non-null-assertion.mdx | 1 + .../rules/no-fallthrough-switch-clause.mdx | 1 + .../linter/rules/no-flat-map-identity.mdx | 1 + .../docs/linter/rules/no-focused-tests.mdx | 1 + src/content/docs/linter/rules/no-for-each.mdx | 1 + .../docs/linter/rules/no-function-assign.mdx | 1 + .../docs/linter/rules/no-global-assign.mdx | 1 + .../docs/linter/rules/no-global-eval.mdx | 1 + .../docs/linter/rules/no-global-is-finite.mdx | 1 + .../docs/linter/rules/no-global-is-nan.mdx | 1 + .../linter/rules/no-global-object-calls.mdx | 1 + .../docs/linter/rules/no-head-element.mdx | 1 + .../rules/no-head-import-in-document.mdx | 1 + .../docs/linter/rules/no-header-scope.mdx | 1 + .../docs/linter/rules/no-img-element.mdx | 1 + .../docs/linter/rules/no-implicit-any-let.mdx | 1 + .../docs/linter/rules/no-implicit-boolean.mdx | 1 + .../docs/linter/rules/no-import-assign.mdx | 1 + .../linter/rules/no-important-in-keyframe.mdx | 1 + .../docs/linter/rules/no-inferrable-types.mdx | 1 + .../linter/rules/no-inner-declarations.mdx | 1 + ...ractive-element-to-noninteractive-role.mdx | 1 + .../no-invalid-builtin-instantiation.mdx | 1 + .../rules/no-invalid-constructor-super.mdx | 1 + ...o-invalid-direction-in-linear-gradient.mdx | 1 + .../linter/rules/no-invalid-grid-areas.mdx | 1 + .../linter/rules/no-invalid-new-builtin.mdx | 1 + .../no-invalid-position-at-import-rule.mdx | 1 + .../no-invalid-use-before-declaration.mdx | 1 + .../linter/rules/no-irregular-whitespace.mdx | 2 + .../docs/linter/rules/no-label-var.mdx | 1 + .../linter/rules/no-label-without-control.mdx | 1 + .../rules/no-misleading-character-class.mdx | 1 + .../rules/no-misleading-instantiator.mdx | 1 + .../linter/rules/no-misplaced-assertion.mdx | 1 + .../no-misrefactored-shorthand-assign.mdx | 1 + .../linter/rules/no-missing-var-function.mdx | 1 + ...-spaces-in-regular-expression-literals.mdx | 1 + .../docs/linter/rules/no-namespace-import.mdx | 1 + .../docs/linter/rules/no-namespace.mdx | 1 + .../docs/linter/rules/no-negation-else.mdx | 1 + .../docs/linter/rules/no-nested-ternary.mdx | 1 + .../docs/linter/rules/no-new-symbol.mdx | 1 + .../docs/linter/rules/no-nodejs-modules.mdx | 1 + .../linter/rules/no-non-null-assertion.mdx | 1 + ...nteractive-element-to-interactive-role.mdx | 1 + .../rules/no-noninteractive-tabindex.mdx | 1 + .../rules/no-nonoctal-decimal-escape.mdx | 1 + .../docs/linter/rules/no-octal-escape.mdx | 1 + .../docs/linter/rules/no-parameter-assign.mdx | 1 + .../linter/rules/no-parameter-properties.mdx | 1 + .../linter/rules/no-positive-tabindex.mdx | 1 + .../docs/linter/rules/no-precision-loss.mdx | 1 + .../docs/linter/rules/no-process-env.mdx | 1 + .../linter/rules/no-prototype-builtins.mdx | 1 + .../docs/linter/rules/no-re-export-all.mdx | 1 + .../linter/rules/no-react-specific-props.mdx | 1 + .../docs/linter/rules/no-redeclare.mdx | 1 + .../docs/linter/rules/no-redundant-alt.mdx | 1 + .../docs/linter/rules/no-redundant-roles.mdx | 1 + .../linter/rules/no-redundant-use-strict.mdx | 1 + .../linter/rules/no-render-return-value.mdx | 1 + .../linter/rules/no-restricted-globals.mdx | 1 + .../linter/rules/no-restricted-imports.mdx | 1 + .../docs/linter/rules/no-restricted-types.mdx | 1 + src/content/docs/linter/rules/no-secrets.mdx | 1 + .../docs/linter/rules/no-self-assign.mdx | 1 + .../docs/linter/rules/no-self-compare.mdx | 1 + .../docs/linter/rules/no-setter-return.mdx | 1 + .../rules/no-shadow-restricted-names.mdx | 1 + .../rules/no-shorthand-property-overrides.mdx | 1 + .../docs/linter/rules/no-shouty-constants.mdx | 1 + .../docs/linter/rules/no-skipped-tests.mdx | 1 + .../docs/linter/rules/no-sparse-array.mdx | 1 + .../rules/no-static-element-interactions.mdx | 1 + .../linter/rules/no-static-only-class.mdx | 1 + .../linter/rules/no-string-case-mismatch.mdx | 1 + src/content/docs/linter/rules/no-substr.mdx | 1 + .../rules/no-suspicious-semicolon-in-jsx.mdx | 1 + .../linter/rules/no-svg-without-title.mdx | 1 + .../linter/rules/no-switch-declarations.mdx | 1 + .../rules/no-template-curly-in-string.mdx | 1 + .../docs/linter/rules/no-then-property.mdx | 1 + .../docs/linter/rules/no-this-in-static.mdx | 1 + .../rules/no-undeclared-dependencies.mdx | 1 + .../linter/rules/no-undeclared-variables.mdx | 1 + .../docs/linter/rules/no-unknown-function.mdx | 1 + .../rules/no-unknown-media-feature-name.mdx | 1 + .../docs/linter/rules/no-unknown-property.mdx | 1 + .../linter/rules/no-unknown-pseudo-class.mdx | 1 + .../rules/no-unknown-pseudo-element.mdx | 1 + .../linter/rules/no-unknown-type-selector.mdx | 1 + .../docs/linter/rules/no-unknown-unit.mdx | 1 + .../rules/no-unmatchable-anb-selector.mdx | 1 + .../linter/rules/no-unnecessary-continue.mdx | 1 + .../linter/rules/no-unreachable-super.mdx | 1 + .../docs/linter/rules/no-unreachable.mdx | 1 + .../rules/no-unsafe-declaration-merging.mdx | 1 + .../docs/linter/rules/no-unsafe-finally.mdx | 1 + .../docs/linter/rules/no-unsafe-negation.mdx | 1 + .../rules/no-unsafe-optional-chaining.mdx | 1 + .../rules/no-unused-function-parameters.mdx | 1 + .../docs/linter/rules/no-unused-imports.mdx | 1 + .../docs/linter/rules/no-unused-labels.mdx | 1 + .../rules/no-unused-private-class-members.mdx | 1 + .../rules/no-unused-template-literal.mdx | 1 + .../docs/linter/rules/no-unused-variables.mdx | 1 + .../docs/linter/rules/no-useless-catch.mdx | 1 + .../linter/rules/no-useless-constructor.mdx | 1 + .../docs/linter/rules/no-useless-else.mdx | 1 + .../linter/rules/no-useless-empty-export.mdx | 1 + .../rules/no-useless-escape-in-regex.mdx | 1 + .../linter/rules/no-useless-fragments.mdx | 1 + .../docs/linter/rules/no-useless-label.mdx | 1 + .../no-useless-lone-block-statements.mdx | 1 + .../docs/linter/rules/no-useless-rename.mdx | 1 + .../linter/rules/no-useless-string-concat.mdx | 1 + .../linter/rules/no-useless-string-raw.mdx | 1 + .../linter/rules/no-useless-switch-case.mdx | 1 + .../docs/linter/rules/no-useless-ternary.mdx | 1 + .../linter/rules/no-useless-this-alias.mdx | 1 + .../rules/no-useless-type-constraint.mdx | 1 + .../no-useless-undefined-initialization.mdx | 1 + .../linter/rules/no-useless-undefined.mdx | 1 + .../docs/linter/rules/no-value-at-rule.mdx | 1 + src/content/docs/linter/rules/no-var.mdx | 1 + .../rules/no-void-elements-with-children.mdx | 1 + .../docs/linter/rules/no-void-type-return.mdx | 1 + src/content/docs/linter/rules/no-void.mdx | 1 + src/content/docs/linter/rules/no-with.mdx | 1 + .../docs/linter/rules/no-yoda-expression.mdx | 1 + .../use-adjacent-overload-signatures.mdx | 1 + .../docs/linter/rules/use-alt-text.mdx | 1 + .../docs/linter/rules/use-anchor-content.mdx | 1 + ...se-aria-activedescendant-with-tabindex.mdx | 1 + .../linter/rules/use-aria-props-for-role.mdx | 1 + .../use-aria-props-supported-by-role.mdx | 1 + .../docs/linter/rules/use-array-literals.mdx | 1 + .../docs/linter/rules/use-arrow-function.mdx | 1 + .../linter/rules/use-as-const-assertion.mdx | 1 + .../docs/linter/rules/use-at-index.mdx | 1 + src/content/docs/linter/rules/use-await.mdx | 1 + .../linter/rules/use-block-statements.mdx | 1 + .../docs/linter/rules/use-button-type.mdx | 1 + .../linter/rules/use-collapsed-else-if.mdx | 1 + .../docs/linter/rules/use-collapsed-if.mdx | 1 + .../use-component-export-only-modules.mdx | 1 + .../rules/use-consistent-array-type.mdx | 1 + .../use-consistent-builtin-instantiation.mdx | 1 + .../rules/use-consistent-curly-braces.mdx | 1 + .../use-consistent-member-accessibility.mdx | 1 + src/content/docs/linter/rules/use-const.mdx | 1 + .../docs/linter/rules/use-date-now.mdx | 1 + .../rules/use-default-parameter-last.mdx | 1 + .../rules/use-default-switch-clause-last.mdx | 1 + .../rules/use-default-switch-clause.mdx | 1 + .../linter/rules/use-deprecated-reason.mdx | 3 +- .../linter/rules/use-enum-initializers.mdx | 1 + .../docs/linter/rules/use-error-message.mdx | 1 + .../rules/use-exhaustive-dependencies.mdx | 1 + .../rules/use-explicit-length-check.mdx | 1 + .../docs/linter/rules/use-explicit-type.mdx | 1 + .../rules/use-exponentiation-operator.mdx | 1 + .../docs/linter/rules/use-export-type.mdx | 1 + .../rules/use-filenaming-convention.mdx | 1 + .../docs/linter/rules/use-flat-map.mdx | 1 + .../rules/use-focusable-interactive.mdx | 1 + src/content/docs/linter/rules/use-for-of.mdx | 1 + .../docs/linter/rules/use-fragment-syntax.mdx | 1 + .../linter/rules/use-generic-font-names.mdx | 1 + .../docs/linter/rules/use-getter-return.mdx | 1 + .../linter/rules/use-google-font-display.mdx | 1 + .../rules/use-google-font-preconnect.mdx | 1 + .../docs/linter/rules/use-guard-for-in.mdx | 1 + .../docs/linter/rules/use-heading-content.mdx | 1 + .../linter/rules/use-hook-at-top-level.mdx | 1 + .../docs/linter/rules/use-html-lang.mdx | 1 + .../docs/linter/rules/use-iframe-title.mdx | 1 + .../linter/rules/use-import-extensions.mdx | 1 + .../linter/rules/use-import-restrictions.mdx | 1 + .../docs/linter/rules/use-import-type.mdx | 1 + .../docs/linter/rules/use-is-array.mdx | 1 + src/content/docs/linter/rules/use-is-nan.mdx | 1 + .../linter/rules/use-jsx-key-in-iterable.mdx | 1 + .../rules/use-key-with-click-events.mdx | 1 + .../rules/use-key-with-mouse-events.mdx | 1 + .../linter/rules/use-literal-enum-members.mdx | 1 + .../docs/linter/rules/use-literal-keys.mdx | 1 + .../docs/linter/rules/use-media-caption.mdx | 1 + .../docs/linter/rules/use-named-operation.mdx | 3 +- .../linter/rules/use-namespace-keyword.mdx | 1 + .../linter/rules/use-naming-convention.mdx | 1 + .../linter/rules/use-node-assert-strict.mdx | 1 + .../rules/use-nodejs-import-protocol.mdx | 1 + .../linter/rules/use-number-namespace.mdx | 1 + .../use-number-to-fixed-digits-argument.mdx | 1 + .../linter/rules/use-numeric-literals.mdx | 1 + .../docs/linter/rules/use-optional-chain.mdx | 1 + .../docs/linter/rules/use-regex-literals.mdx | 1 + .../rules/use-self-closing-elements.mdx | 1 + .../linter/rules/use-semantic-elements.mdx | 1 + .../linter/rules/use-shorthand-array-type.mdx | 1 + .../linter/rules/use-shorthand-assign.mdx | 1 + .../rules/use-shorthand-function-type.mdx | 1 + .../linter/rules/use-simple-number-keys.mdx | 1 + .../rules/use-simplified-logic-expression.mdx | 1 + .../rules/use-single-case-statement.mdx | 1 + .../rules/use-single-var-declarator.mdx | 1 + .../docs/linter/rules/use-sorted-classes.mdx | 1 + .../docs/linter/rules/use-strict-mode.mdx | 1 + .../docs/linter/rules/use-template.mdx | 1 + .../docs/linter/rules/use-throw-new-error.mdx | 1 + .../linter/rules/use-throw-only-error.mdx | 1 + .../docs/linter/rules/use-top-level-regex.mdx | 1 + .../docs/linter/rules/use-trim-start-end.mdx | 1 + .../docs/linter/rules/use-valid-anchor.mdx | 1 + .../linter/rules/use-valid-aria-props.mdx | 1 + .../docs/linter/rules/use-valid-aria-role.mdx | 1 + .../linter/rules/use-valid-aria-values.mdx | 1 + .../linter/rules/use-valid-autocomplete.mdx | 1 + .../linter/rules/use-valid-for-direction.mdx | 1 + .../docs/linter/rules/use-valid-lang.mdx | 1 + .../docs/linter/rules/use-valid-typeof.mdx | 1 + src/content/docs/linter/rules/use-while.mdx | 1 + src/content/docs/linter/rules/use-yield.mdx | 1 + src/content/docs/pt-br/linter/index.mdx | 4 +- src/content/docs/zh-cn/linter/index.mdx | 4 +- 315 files changed, 1484 insertions(+), 718 deletions(-) create mode 100644 src/components/generated/assist/Groups.astro create mode 100644 src/components/generated/assist/NumberOfRules.astro create mode 100644 src/components/generated/assist/RecommendedRules.astro rename src/components/generated/{ => linter}/Groups.astro (100%) rename src/components/generated/{ => linter}/NumberOfRules.astro (100%) rename src/components/generated/{ => linter}/RecommendedRules.astro (100%) create mode 100644 src/content/docs/assist/actions/index.mdx create mode 100644 src/content/docs/assist/actions/use-sorted-attributes.mdx create mode 100644 src/content/docs/assist/actions/use-sorted-keys.mdx create mode 100644 src/content/docs/assist/index.mdx create mode 100644 src/content/docs/assist/rules-sources.mdx diff --git a/astro.config.ts b/astro.config.ts index c54874897..b425fb5d2 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -1,480 +1,482 @@ import netlify from "@astrojs/netlify"; import react from "@astrojs/react"; import starlight from "@astrojs/starlight"; -import { defineConfig } from "astro/config"; +import {defineConfig} from "astro/config"; import rehypeSlug from "rehype-slug"; -import { searchForWorkspaceRoot } from "vite"; -import { version as biomeVersion } from "./node_modules/@biomejs/wasm-web/package.json"; -import { version as prettierVersion } from "./node_modules/prettier/package.json"; -import { bundledLanguages } from "./node_modules/shiki"; -import { rehypeAutolink } from "./plugins/rehype-autolink"; +import {searchForWorkspaceRoot} from "vite"; +import {version as biomeVersion} from "./node_modules/@biomejs/wasm-web/package.json"; +import {version as prettierVersion} from "./node_modules/prettier/package.json"; +import {bundledLanguages} from "./node_modules/shiki"; +import {rehypeAutolink} from "./plugins/rehype-autolink"; const site = "https://biomejs.dev"; // https://astro.build/config export default defineConfig({ - site, - output: "static", + site, + output: "static", - compressHTML: true, + compressHTML: true, - integrations: [ - react(), - starlight({ - title: "Biome", - defaultLocale: "root", - locales: { - root: { - label: "English", - lang: "en", - }, - ja: { - label: "日本語", - lang: "ja", - }, - "zh-cn": { - label: "简体中文", - lang: "zh-CN", - }, - "pt-br": { - label: "Português", - lang: "pt-BR", - }, - }, - sidebar: [ - { - label: "Blog", - link: "../blog", - translations: { ja: "ブログ", "zh-CN": "博客" }, - }, - { - label: "Playground", - link: "../playground", - translations: { - ja: "プレイグラウンド", - "zh-CN": "演练场", - "pt-BR": "Ambiente de testes", - }, - }, - { - label: "Guides", - translations: { ja: "ガイド", "zh-CN": "指南", "pt-BR": "Guias" }, - items: [ - { - label: "Getting Started", - link: "/guides/getting-started", - translations: { - ja: "はじめる", - "zh-CN": "入门", - "pt-BR": "Primeiros passos", - }, - }, - { - label: "Manual installation", - link: "/guides/manual-installation", - translations: { - ja: "手動インストール", - "zh-CN": "手动安装", - "pt-BR": "Instalação manual", - }, - }, - { - label: "Configure Biome", - link: "/guides/configure-biome", - translations: { - ja: "Biome の設定", - "zh-CN": "配置生物群落", - "pt-BR": "Configurar Bioma", - }, - }, - { - label: "Use Biome in big projects", - link: "/guides/big-projects", - translations: { - ja: "大きなプロジェクトでのBiomeの使用方法", - "zh-CN": "大型项目中使用 Biome", - "pt-BR": "Usando o Biome em projetos grandes", - }, - }, - { - label: "Biome in your IDE", - translations: { - ja: "Biome をあなたのエディタに導入する", - "zh-CN": "编辑器中使用 Biome", - "pt-BR": "Biome no seu editor", - }, - items: [ - { - label: "First-party extensions", - link: "/guides/editors/first-party-extensions", - }, - { - label: "Third-party extensions", - link: "/guides/editors/third-party-extensions", - }, - { - label: "Integrate Biome in an editor extension", - link: "/guides/editors/create-a-extension", - }, - ], - }, - { - label: "Integrate Biome with your VCS", - link: "/guides/integrate-in-vcs", - translations: { - ja: "Biome をあなたの VCS と統合する", - "zh-CN": "与版本控制系统集成", - "pt-BR": "Integrando o Biome com o seu VCS", - }, - }, - { - label: "Migrate from ESLint & Prettier", - link: "/guides/migrate-eslint-prettier", - translations: { - ja: "ESLintとPrettierからの移行", - }, - }, - ], - }, - { - label: "Tools", - translations: { - ja: "ツール", - "zh-CN": "工具", - "pt-BR": "Ferramentas", - }, - items: [ - { - label: "Analyzer", - items: [ - { - label: "Introduction", - link: "/analyzer", - translations: { - ja: "イントロダクション", - "zh-CN": "介绍", - "pt-BR": "Introdução", - }, - }, - { - label: "Import Sorting", - link: "/analyzer/import-sorting", - translations: { - ja: "Import文のソート", - "zh-CN": "导入排序", - "pt-BR": "Ordenação de importações", - }, - }, - ], - translations: { - ja: "Analyzer", - "zh-CN": "分析器", - "pt-BR": "Analisador", - }, - }, - { - label: "Formatter", - items: [ - { - label: "Introduction", - link: "/formatter", - translations: { - ja: "イントロダクション", - "zh-CN": "介绍", - "pt-BR": "Introdução", - }, - }, - { - label: "Differences with Prettier", - link: "/formatter/differences-with-prettier", - translations: { - ja: "Prettier との違い", - "zh-CN": "与 Prettier 的区别", - "pt-BR": "Diferenças em relação ao Prettier", - }, - }, - { - label: "Formatter Option Philosophy", - link: "/formatter/option-philosophy", - translations: { - ja: "Formatterオプションに対する考え方", - "zh-CN": "格式化配置理念", - "pt-BR": "Princípios de configuração", - }, - }, - ], - translations: { - "zh-CN": "格式化程序", - "pt-BR": "Formatador", - }, - }, - { - label: "Linter", - items: [ - { - label: "Introduction", - link: "/linter", - translations: { - ja: "イントロダクション", - "zh-CN": "介绍", - "pt-BR": "Introdução", - }, - }, - { - label: "Rules", - link: "/linter/rules", - translations: { - ja: "ルール", - "zh-CN": "规则", - "pt-BR": "Regras", - }, - }, - { - label: "Rules sources", - link: "/linter/rules-sources", - }, - ], - }, - ], - }, - { - label: "Reference", - translations: { - ja: "リファレンス", - "zh-CN": "参考", - "pt-BR": "Referências", - }, - items: [ - { - label: "CLI", - link: "/reference/cli", - }, - { - label: "Diagnostics", - link: "/reference/diagnostics", - badge: "new", - }, - { - label: "Environment variables", - link: "/reference/environment-variables", - }, - { - label: "Reporters", - link: "/reference/reporters", - }, - { - label: "Configuration", - link: "/reference/configuration", - translations: { - ja: "設定", - "zh-CN": "配置", - "pt-BR": "Configuração", - }, - }, - { - label: "VSCode extension", - link: "/reference/vscode", - translations: { - ja: "VSCode拡張機能", - "zh-CN": "VSCode 扩展", - "pt-BR": "Extensão do VSCode", - }, - }, - { - label: "Zed extension", - link: "/reference/zed", - badge: "new", - translations: { - ja: "Zed拡張機能", - "zh-CN": "Zed 扩展", - "pt-BR": "Extensão do Zed", - }, - }, - { - label: "GritQL", - link: "/reference/gritql", - badge: "experimental", - }, - ], - }, - { - label: "Recipes", - translations: { ja: "レシピ", "zh-CN": "实例", "pt-BR": "Receitas" }, - items: [ - { - label: "Continuous Integration", - link: "/recipes/continuous-integration", - translations: { - ja: "継続的インテグレーション", - "zh-CN": "持续集成", - "pt-BR": "Integração Contínua", - }, - }, - { - label: "Git Hooks", - link: "/recipes/git-hooks", - }, - { - label: "Renovate", - link: "/recipes/renovate", - }, - { - label: "Social Badges", - link: "/recipes/badges", - translations: { - ja: "ソーシャルバッジ", - }, - }, - ], - }, - { - label: "Internals", - translations: { - ja: "内部原理", - "zh-CN": "内部原理", - "pt-BR": "Aspectos Internos", - }, - items: [ - { - label: "Philosophy", - link: "/internals/philosophy", - translations: { - ja: "理念", - "zh-CN": "理念", - "pt-BR": "Filosofia", - }, - }, - { - label: "Language support", - link: "/internals/language-support", - translations: { - ja: "言語サポート", - "zh-CN": "语言支持", - "pt-BR": "Suporte de linguagens", - }, - }, - { - label: "Architecture", - link: "/internals/architecture", - translations: { - ja: "アーキテクチャ", - "zh-CN": "架构", - "pt-BR": "Arquitetura", - }, - }, - { - label: "Credits", - link: "/internals/credits", - translations: { - ja: "クレジット", - "zh-CN": "鸣谢", - "pt-BR": "Créditos", - }, - }, - { - label: "Versioning", - link: "/internals/versioning", - translations: { - ja: "バージョニング", - "zh-CN": "版本控制", - "pt-BR": "Versionamento", - }, - }, - { - label: "Changelog", - link: "/internals/changelog", - translations: { - "zh-CN": "更新日志", - "pt-BR": "Alterações", - }, - }, - ], - }, - ], - logo: { - light: "./src/assets/svg/logo-light-transparent.svg", - dark: "./src/assets/svg/logo-dark-transparent.svg", - replacesTitle: true, - }, - favicon: "/img/favicon.svg", - head: [ - { - tag: "link", - attrs: { - rel: "alternate", - type: "application/rss+xml", - href: `${site}/feed.xml`, - }, - }, - ], - customCss: [ - // Relative path to your custom CSS file - "./src/styles/index.css", - ], - social: { - discord: "https://biomejs.dev/chat", - github: "https://github.com/biomejs/biome", - "x.com": "https://twitter.com/biomejs", - mastodon: "https://fosstodon.org/@biomejs", - openCollective: "https://opencollective.com/biome", - youtube: "https://youtube.com/@Biomejs", - }, - editLink: { - baseUrl: "https://github.com/biomejs/website/edit/main/", - }, - components: { - SiteTitle: "./src/components/starlight/SiteTitle.astro", - Sidebar: "./src/components/starlight/Sidebar.astro", - Hero: "./src/components/starlight/Hero.astro", - Head: "./src/components/starlight/Head.astro", - }, - }), - ], + integrations: [ + react(), + starlight({ + title: "Biome", + defaultLocale: "root", + locales: { + root: { + label: "English", + lang: "en", + }, + ja: { + label: "日本語", + lang: "ja", + }, + "zh-cn": { + label: "简体中文", + lang: "zh-CN", + }, + "pt-br": { + label: "Português", + lang: "pt-BR", + }, + }, + sidebar: [ + { + label: "Blog", + link: "../blog", + translations: {ja: "ブログ", "zh-CN": "博客"}, + }, + { + label: "Playground", + link: "../playground", + translations: { + ja: "プレイグラウンド", + "zh-CN": "演练场", + "pt-BR": "Ambiente de testes", + }, + }, + { + label: "Guides", + translations: {ja: "ガイド", "zh-CN": "指南", "pt-BR": "Guias"}, + items: [ + { + label: "Getting Started", + link: "/guides/getting-started", + translations: { + ja: "はじめる", + "zh-CN": "入门", + "pt-BR": "Primeiros passos", + }, + }, + { + label: "Manual installation", + link: "/guides/manual-installation", + translations: { + ja: "手動インストール", + "zh-CN": "手动安装", + "pt-BR": "Instalação manual", + }, + }, + { + label: "Configure Biome", + link: "/guides/configure-biome", + translations: { + ja: "Biome の設定", + "zh-CN": "配置生物群落", + "pt-BR": "Configurar Bioma", + }, + }, + { + label: "Use Biome in big projects", + link: "/guides/big-projects", + translations: { + ja: "大きなプロジェクトでのBiomeの使用方法", + "zh-CN": "大型项目中使用 Biome", + "pt-BR": "Usando o Biome em projetos grandes", + }, + }, + { + label: "Biome in your IDE", + translations: { + ja: "Biome をあなたのエディタに導入する", + "zh-CN": "编辑器中使用 Biome", + "pt-BR": "Biome no seu editor", + }, + items: [ + { + label: "First-party extensions", + link: "/guides/editors/first-party-extensions", + }, + { + label: "Third-party extensions", + link: "/guides/editors/third-party-extensions", + }, + { + label: "Integrate Biome in an editor extension", + link: "/guides/editors/create-a-extension", + }, + ], + }, + { + label: "Integrate Biome with your VCS", + link: "/guides/integrate-in-vcs", + translations: { + ja: "Biome をあなたの VCS と統合する", + "zh-CN": "与版本控制系统集成", + "pt-BR": "Integrando o Biome com o seu VCS", + }, + }, + { + label: "Migrate from ESLint & Prettier", + link: "/guides/migrate-eslint-prettier", + translations: { + ja: "ESLintとPrettierからの移行", + }, + }, + ], + }, + { + label: "Analyzer", + items: [ + { + label: "Introduction", + link: "/analyzer", + translations: { + ja: "イントロダクション", + "zh-CN": "介绍", + "pt-BR": "Introdução", + }, + }, + { + label: "Linter", + items: [ + { + label: "Introduction", + link: "/linter", + translations: { + ja: "イントロダクション", + "zh-CN": "介绍", + "pt-BR": "Introdução", + }, + }, + { + label: "Rules", + link: "/linter/rules", + translations: { + ja: "ルール", + "zh-CN": "规则", + "pt-BR": "Regras", + }, + }, + { + label: "Rules sources", + link: "/linter/rules-sources", + }, + ], + }, + { + label: "Assist", + badge: "new", + items: [ + { + label: "Introduction", + link: "/assist", + }, + { + label: "Actions", + link: "/assist/actions", + }, + ], + }, + { + label: "Import Sorting", + link: "/analyzer/import-sorting", + translations: { + ja: "Import文のソート", + "zh-CN": "导入排序", + "pt-BR": "Ordenação de importações", + }, + }, + ], + translations: { + ja: "Analyzer", + "zh-CN": "分析器", + "pt-BR": "Analisador", + }, + }, + { + label: "Formatter", + items: [ + { + label: "Introduction", + link: "/formatter", + translations: { + ja: "イントロダクション", + "zh-CN": "介绍", + "pt-BR": "Introdução", + }, + }, + { + label: "Differences with Prettier", + link: "/formatter/differences-with-prettier", + translations: { + ja: "Prettier との違い", + "zh-CN": "与 Prettier 的区别", + "pt-BR": "Diferenças em relação ao Prettier", + }, + }, + { + label: "Formatter Option Philosophy", + link: "/formatter/option-philosophy", + translations: { + ja: "Formatterオプションに対する考え方", + "zh-CN": "格式化配置理念", + "pt-BR": "Princípios de configuração", + }, + }, + ], + translations: { + "zh-CN": "格式化程序", + "pt-BR": "Formatador", + }, + }, + { + label: "Reference", + translations: { + ja: "リファレンス", + "zh-CN": "参考", + "pt-BR": "Referências", + }, + items: [ + { + label: "CLI", + link: "/reference/cli", + }, + { + label: "Diagnostics", + link: "/reference/diagnostics", + }, + { + label: "Environment variables", + link: "/reference/environment-variables", + }, + { + label: "Reporters", + link: "/reference/reporters", + }, + { + label: "Configuration", + link: "/reference/configuration", + translations: { + ja: "設定", + "zh-CN": "配置", + "pt-BR": "Configuração", + }, + }, + { + label: "VSCode extension", + link: "/reference/vscode", + translations: { + ja: "VSCode拡張機能", + "zh-CN": "VSCode 扩展", + "pt-BR": "Extensão do VSCode", + }, + }, + { + label: "Zed extension", + link: "/reference/zed", + translations: { + ja: "Zed拡張機能", + "zh-CN": "Zed 扩展", + "pt-BR": "Extensão do Zed", + }, + }, + { + label: "GritQL", + link: "/reference/gritql", + badge: "experimental", + }, + ], + }, + { + label: "Recipes", + translations: {ja: "レシピ", "zh-CN": "实例", "pt-BR": "Receitas"}, + items: [ + { + label: "Continuous Integration", + link: "/recipes/continuous-integration", + translations: { + ja: "継続的インテグレーション", + "zh-CN": "持续集成", + "pt-BR": "Integração Contínua", + }, + }, + { + label: "Git Hooks", + link: "/recipes/git-hooks", + }, + { + label: "Renovate", + link: "/recipes/renovate", + }, + { + label: "Social Badges", + link: "/recipes/badges", + translations: { + ja: "ソーシャルバッジ", + }, + }, + ], + }, + { + label: "Internals", + translations: { + ja: "内部原理", + "zh-CN": "内部原理", + "pt-BR": "Aspectos Internos", + }, + items: [ + { + label: "Philosophy", + link: "/internals/philosophy", + translations: { + ja: "理念", + "zh-CN": "理念", + "pt-BR": "Filosofia", + }, + }, + { + label: "Language support", + link: "/internals/language-support", + translations: { + ja: "言語サポート", + "zh-CN": "语言支持", + "pt-BR": "Suporte de linguagens", + }, + }, + { + label: "Architecture", + link: "/internals/architecture", + translations: { + ja: "アーキテクチャ", + "zh-CN": "架构", + "pt-BR": "Arquitetura", + }, + }, + { + label: "Credits", + link: "/internals/credits", + translations: { + ja: "クレジット", + "zh-CN": "鸣谢", + "pt-BR": "Créditos", + }, + }, + { + label: "Versioning", + link: "/internals/versioning", + translations: { + ja: "バージョニング", + "zh-CN": "版本控制", + "pt-BR": "Versionamento", + }, + }, + { + label: "Changelog", + link: "/internals/changelog", + translations: { + "zh-CN": "更新日志", + "pt-BR": "Alterações", + }, + }, + ], + }, + ], + logo: { + light: "./src/assets/svg/logo-light-transparent.svg", + dark: "./src/assets/svg/logo-dark-transparent.svg", + replacesTitle: true, + }, + favicon: "/img/favicon.svg", + head: [ + { + tag: "link", + attrs: { + rel: "alternate", + type: "application/rss+xml", + href: `${site}/feed.xml`, + }, + }, + ], + customCss: [ + // Relative path to your custom CSS file + "./src/styles/index.css", + ], + social: { + discord: "https://biomejs.dev/chat", + github: "https://github.com/biomejs/biome", + "x.com": "https://twitter.com/biomejs", + mastodon: "https://fosstodon.org/@biomejs", + openCollective: "https://opencollective.com/biome", + youtube: "https://youtube.com/@Biomejs", + }, + editLink: { + baseUrl: "https://github.com/biomejs/website/edit/main/", + }, + components: { + SiteTitle: "./src/components/starlight/SiteTitle.astro", + Sidebar: "./src/components/starlight/Sidebar.astro", + Hero: "./src/components/starlight/Hero.astro", + Head: "./src/components/starlight/Head.astro", + }, + }), + ], - build: { - format: "directory", - }, + build: { + format: "directory", + }, - markdown: { - syntaxHighlight: "shiki", - rehypePlugins: [rehypeSlug, ...rehypeAutolink()], - shikiConfig: { - langs: [ - // @ts-expect-error - { - ...(await bundledLanguages.javascript()).default[0], - scopeName: "source.cjs", - aliases: ["cjs"], - }, - ], - }, - }, + markdown: { + syntaxHighlight: "shiki", + rehypePlugins: [rehypeSlug, ...rehypeAutolink()], + shikiConfig: { + langs: [ + // @ts-expect-error + { + ...(await bundledLanguages.javascript()).default[0], + scopeName: "source.cjs", + aliases: ["cjs"], + }, + ], + }, + }, - adapter: netlify({ - imageCDN: false, - }), + adapter: netlify({ + imageCDN: false, + }), - vite: { - resolve: { - alias: { - "@": new URL("./src", import.meta.url).pathname, - }, - }, - plugins: [], + vite: { + resolve: { + alias: { + "@": new URL("./src", import.meta.url).pathname, + }, + }, + plugins: [], - worker: { - format: "es", - }, + worker: { + format: "es", + }, - server: { - fs: { - // https://vitejs.dev/config/server-options.html#server-fs-allow - allow: [searchForWorkspaceRoot(process.cwd())], - }, - }, + server: { + fs: { + // https://vitejs.dev/config/server-options.html#server-fs-allow + allow: [searchForWorkspaceRoot(process.cwd())], + }, + }, - define: { - PRETTIER_VERSION: JSON.stringify(prettierVersion), - BIOME_VERSION: JSON.stringify(biomeVersion), - }, - }, + define: { + PRETTIER_VERSION: JSON.stringify(prettierVersion), + BIOME_VERSION: JSON.stringify(biomeVersion), + }, + }, }); diff --git a/codegen/src/lintdoc.rs b/codegen/src/lintdoc.rs index aa8e9fb28..2fe5a8ed7 100644 --- a/codegen/src/lintdoc.rs +++ b/codegen/src/lintdoc.rs @@ -5,9 +5,9 @@ use anyhow::Context; use anyhow::{bail, Result}; use biome_analyze::options::JsxRuntime; use biome_analyze::{ - AnalysisFilter, AnalyzerConfiguration, AnalyzerOptions, ControlFlow, FixKind, GroupCategory, - Queryable, RegistryVisitor, Rule, RuleCategory, RuleFilter, RuleGroup, RuleMetadata, - RuleSourceKind, + AnalysisFilter, AnalyzerAction, AnalyzerConfiguration, AnalyzerOptions, ControlFlow, FixKind, + GroupCategory, Queryable, RegistryVisitor, Rule, RuleCategory, RuleFilter, RuleGroup, + RuleMetadata, RuleSourceKind, }; use biome_console::fmt::Termcolor; use biome_console::{ @@ -17,15 +17,16 @@ use biome_console::{ use biome_css_parser::CssParserOptions; use biome_css_syntax::CssLanguage; use biome_diagnostics::termcolor::NoColor; -use biome_diagnostics::{Diagnostic, DiagnosticExt, PrintDiagnostic}; +use biome_diagnostics::{Diagnostic, DiagnosticExt, PrintDiagnostic, Severity, Visit}; use biome_graphql_syntax::GraphqlLanguage; use biome_js_parser::JsParserOptions; use biome_js_syntax::{EmbeddingKind, JsFileSource, JsLanguage}; use biome_json_parser::JsonParserOptions; use biome_json_syntax::JsonLanguage; -use biome_service::settings::WorkspaceSettings; +use biome_service::settings::{ServiceLanguage, WorkspaceSettings}; use biome_service::workspace::DocumentFileSource; use biome_string_case::Case; +use biome_text_edit::TextEdit; use pulldown_cmark::{CodeBlockKind, Event, LinkType, Parser, Tag, TagEnd}; use std::collections::{BTreeSet, HashMap}; use std::error::Error; @@ -46,7 +47,14 @@ pub(crate) struct RuleToDocument { } #[derive(Default)] -struct LintRulesVisitor { +struct RulesVisitor { + lints: Rules, + actions: Rules, +} + +#[derive(Default)] + +struct Rules { /// This is mapped to: /// - group (correctness) -> list of rules /// - list or rules is mapped to @@ -57,34 +65,58 @@ struct LintRulesVisitor { groups: BTreeMap<&'static str, BTreeMap<&'static str, RuleToDocument>>, number_of_rules: u16, } - -impl LintRulesVisitor { +impl RulesVisitor { fn push_rule(&mut self) where R: Rule> + 'static, { - self.number_of_rules += 1; - let group = self - .groups - .entry(::NAME) - .or_default(); - if let Some(rules_to_document) = group.get_mut(R::METADATA.name) { - rules_to_document - .language_to_metadata - .insert(R::METADATA.language, R::METADATA); + if ::Category::CATEGORY == RuleCategory::Lint { + let lints = &mut self.lints; + lints.number_of_rules += 1; + let group = lints + .groups + .entry(::NAME) + .or_default(); + if let Some(rules_to_document) = group.get_mut(R::METADATA.name) { + rules_to_document + .language_to_metadata + .insert(R::METADATA.language, R::METADATA); + } else { + let mut rule_to_document = RuleToDocument::default(); + rule_to_document + .language_to_metadata + .insert(R::METADATA.language, R::METADATA); + group.insert(R::METADATA.name, rule_to_document); + }; } else { - let mut rule_to_document = RuleToDocument::default(); - rule_to_document - .language_to_metadata - .insert(R::METADATA.language, R::METADATA); - group.insert(R::METADATA.name, rule_to_document); - }; + // For now, we exclude it from the docs + if R::METADATA.name == "organizeImports" { + return; + } + let actions = &mut self.actions; + actions.number_of_rules += 1; + let group = actions + .groups + .entry(::NAME) + .or_default(); + if let Some(rules_to_document) = group.get_mut(R::METADATA.name) { + rules_to_document + .language_to_metadata + .insert(R::METADATA.language, R::METADATA); + } else { + let mut rule_to_document = RuleToDocument::default(); + rule_to_document + .language_to_metadata + .insert(R::METADATA.language, R::METADATA); + group.insert(R::METADATA.name, rule_to_document); + }; + } } } -impl RegistryVisitor for LintRulesVisitor { +impl RegistryVisitor for RulesVisitor { fn record_category>(&mut self) { - if matches!(C::CATEGORY, RuleCategory::Lint) { + if matches!(C::CATEGORY, RuleCategory::Lint | RuleCategory::Action) { C::record_groups(self); } } @@ -97,9 +129,9 @@ impl RegistryVisitor for LintRulesVisitor { } } -impl RegistryVisitor for LintRulesVisitor { +impl RegistryVisitor for RulesVisitor { fn record_category>(&mut self) { - if matches!(C::CATEGORY, RuleCategory::Lint) { + if matches!(C::CATEGORY, RuleCategory::Lint | RuleCategory::Action) { C::record_groups(self); } } @@ -112,9 +144,9 @@ impl RegistryVisitor for LintRulesVisitor { } } -impl RegistryVisitor for LintRulesVisitor { +impl RegistryVisitor for RulesVisitor { fn record_category>(&mut self) { - if matches!(C::CATEGORY, RuleCategory::Lint) { + if matches!(C::CATEGORY, RuleCategory::Lint | RuleCategory::Action) { C::record_groups(self); } } @@ -126,9 +158,9 @@ impl RegistryVisitor for LintRulesVisitor { self.push_rule::::Language>() } } -impl RegistryVisitor for LintRulesVisitor { +impl RegistryVisitor for RulesVisitor { fn record_category>(&mut self) { - if matches!(C::CATEGORY, RuleCategory::Lint) { + if matches!(C::CATEGORY, RuleCategory::Lint | RuleCategory::Action) { C::record_groups(self); } } @@ -142,15 +174,56 @@ impl RegistryVisitor for LintRulesVisitor { } pub fn generate_rule_docs() -> Result<()> { - let root = project_root().join("src/content/docs/linter/rules"); + let mut visitor = RulesVisitor::default(); + biome_js_analyze::visit_registry(&mut visitor); + biome_json_analyze::visit_registry(&mut visitor); + biome_css_analyze::visit_registry(&mut visitor); + biome_graphql_analyze::visit_registry(&mut visitor); + + let RulesVisitor { actions, lints } = visitor; + + generate_and_write_rule_pages(RuleCategory::Lint, lints)?; + generate_and_write_rule_pages(RuleCategory::Action, actions)?; + + Ok(()) +} + +fn generate_and_write_rule_pages(rule_category: RuleCategory, rules: Rules) -> Result<()> { + let root = match rule_category { + RuleCategory::Lint => project_root().join("src/content/docs/linter/rules"), + RuleCategory::Action => project_root().join("src/content/docs/assist/actions"), + _ => unimplemented!(""), + }; let index_page = root.join("index.mdx"); - let reference_groups = project_root().join("src/components/generated/Groups.astro"); - let rules_sources = project_root().join("src/content/docs/linter/rules-sources.mdx"); - let reference_number_of_rules = - project_root().join("src/components/generated/NumberOfRules.astro"); - let reference_recommended_rules = - project_root().join("src/components/generated/RecommendedRules.astro"); - // Clear the rules directory ignoring "not found" errors + let reference_groups = match rule_category { + RuleCategory::Lint => project_root().join("src/components/generated/linter/Groups.astro"), + RuleCategory::Action => project_root().join("src/components/generated/assist/Groups.astro"), + _ => unimplemented!(""), + }; + let rules_sources = match rule_category { + RuleCategory::Lint => project_root().join("src/content/docs/linter/rules-sources.mdx"), + RuleCategory::Action => project_root().join("src/content/docs/assist/actions-sources.mdx"), + _ => unimplemented!(""), + }; + let reference_number_of_rules = match rule_category { + RuleCategory::Lint => { + project_root().join("src/components/generated/linter/NumberOfRules.astro") + } + RuleCategory::Action => { + project_root().join("src/components/generated/assist/NumberOfRules.astro") + } + _ => unimplemented!(""), + }; + + let reference_recommended_rules = match rule_category { + RuleCategory::Lint => { + project_root().join("src/components/generated/linter/RecommendedRules.astro") + } + RuleCategory::Action => { + project_root().join("src/components/generated/assist/RecommendedRules.astro") + } + _ => unimplemented!(""), + }; if root.exists() { if let Err(err) = fs::remove_dir_all(&root) { @@ -166,20 +239,51 @@ pub fn generate_rule_docs() -> Result<()> { } fs::create_dir_all(&root)?; + // create rule sources + if matches!(rule_category, RuleCategory::Lint) {} + + let mut recommended_rules = String::new(); + + let Rules { + groups, + number_of_rules, + } = rules; + + let title = match rule_category { + RuleCategory::Lint => "Rules", + RuleCategory::Action => "Actions", + _ => unimplemented!(""), + }; + + let description = match rule_category { + RuleCategory::Lint => "List of available lint rules", + RuleCategory::Action => "List of available lint actions", + _ => unimplemented!(""), + }; + + let path_prefix = match rule_category { + RuleCategory::Lint => "linter", + RuleCategory::Action => "assist", + _ => unimplemented!(""), + }; + + // Accumulate errors for all lint rules to print all outstanding issues on + // failure instead of just the first one + let mut errors = Vec::new(); // Content of the index page let mut index = Vec::new(); let mut reference_buffer = Vec::new(); writeln!(index, "---")?; add_codegen_disclaimer_frontmatter(&mut index)?; - writeln!(index, "title: Rules")?; - writeln!(index, "description: List of available lint rules.")?; + writeln!(index, "title: {title}")?; + writeln!(index, "description: {description}")?; writeln!(index, "---")?; writeln!(index)?; write!( index, r#" -import RecommendedRules from "@/components/generated/RecommendedRules.astro"; +import RecommendedRules from "@/components/generated/{path_prefix}/RecommendedRules.astro"; import {{ Icon }} from "@astrojs/starlight/components"; Below the list of rules supported by Biome, divided by group. Here's a legend of the emojis: @@ -194,34 +298,11 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of "# )?; - // Accumulate errors for all lint rules to print all outstanding issues on - // failure instead of just the first one - let mut errors = Vec::new(); - - let mut visitor = LintRulesVisitor::default(); - biome_js_analyze::visit_registry(&mut visitor); - biome_json_analyze::visit_registry(&mut visitor); - biome_css_analyze::visit_registry(&mut visitor); - biome_graphql_analyze::visit_registry(&mut visitor); - - let mut recommended_rules = String::new(); - - let LintRulesVisitor { - groups, - number_of_rules, - } = visitor; - - assert!( - groups.contains_key("nursery"), - "Expected nursery group to exist" - ); - writeln!( reference_buffer, "" )?; - let rule_sources_buffer = generate_rule_sources(groups.clone())?; - for (group, rules) in groups { + for (group, rules) in &groups { generate_group( group, rules, @@ -229,6 +310,8 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of &mut index, &mut errors, &mut recommended_rules, + path_prefix, + rule_category, )?; generate_reference(group, &mut reference_buffer)?; } @@ -266,22 +349,32 @@ The recommended rules are: fs::write(reference_groups, reference_buffer)?; fs::write(reference_number_of_rules, number_of_rules_buffer)?; fs::write(reference_recommended_rules, recommended_rules_buffer)?; - fs::write(rules_sources, rule_sources_buffer)?; + + if rule_category == RuleCategory::Lint { + let rule_sources_buffer = generate_rule_sources(groups.clone(), rule_category)?; + fs::write(rules_sources, rule_sources_buffer)?; + } Ok(()) } fn generate_group( group: &'static str, - rules: BTreeMap<&'static str, RuleToDocument>, + rules: &BTreeMap<&'static str, RuleToDocument>, content_root: &Path, content: &mut dyn io::Write, errors: &mut Vec<(&'static str, anyhow::Error)>, recommended_rules: &mut String, + path_prefix: &str, + rule_category: RuleCategory, ) -> io::Result<()> { let (group_name, description) = extract_group_metadata(group); let is_nursery = group == "nursery"; - + let middle_path = match rule_category { + RuleCategory::Lint => "rules", + RuleCategory::Action => "actions", + _ => unimplemented!(""), + }; writeln!(content, "\n## {group_name}")?; writeln!(content)?; write_markup_to_string(content, description)?; @@ -290,13 +383,18 @@ fn generate_group( writeln!(content, "| --- | --- | --- |")?; for (rule_name, rule_to_document) in rules { - let summary = generate_rule(GenRule { - content_root, - group, - rule_name, - is_nursery, - rule_to_document: &rule_to_document, - }); + let summary = generate_rule( + GenRule { + content_root, + group, + rule_name, + is_nursery, + rule_to_document: &rule_to_document, + }, + path_prefix, + middle_path, + rule_category, + ); let summary = match summary { Ok(summary) => summary, @@ -313,9 +411,10 @@ fn generate_group( } let is_recommended = !is_nursery && meta.recommended; let dashed_rule = Case::Kebab.convert(rule_name); + if is_recommended { recommended_rules.push_str(&format!( - "\t
  • {rule_name}
  • \n" + "\t
  • {rule_name}
  • \n" )); } @@ -339,7 +438,7 @@ fn generate_group( let summary_html = events_to_text(summary.clone()); write!( content, - "| [{rule_name}](/linter/rules/{dashed_rule}) | {summary_html} | {properties} |" + "| [{rule_name}](/{path_prefix}/{middle_path}/{dashed_rule}) | {summary_html} | {properties} |" )?; writeln!(content)?; @@ -358,7 +457,12 @@ struct GenRule<'a> { } /// Generates the documentation page for a single lint rule -fn generate_rule(payload: GenRule) -> Result>> { +fn generate_rule( + payload: GenRule, + path_prefix: &str, + middle_path: &str, + rule_category: RuleCategory, +) -> Result>> { let mut summary = Vec::new(); let mut content = Vec::new(); @@ -377,6 +481,9 @@ fn generate_rule(payload: GenRule) -> Result>> { payload.is_nursery, meta, &mut summary, + path_prefix, + middle_path, + rule_category, ) .ok() }) @@ -400,10 +507,14 @@ fn generate_rule(payload: GenRule) -> Result>> { )?; writeln!(content)?; - + let category = match rule_category { + RuleCategory::Lint => "lint", + RuleCategory::Action => "assist", + _ => unimplemented!(""), + }; writeln!( content, - "**Diagnostic Category: `lint/{}/{}`**", + "**Diagnostic Category: `{category}/{}/{}`**", payload.group, payload.rule_name )?; @@ -433,6 +544,9 @@ fn generate_rule_content<'a>( is_nursery: bool, meta: &RuleMetadata, summary: &mut Vec>, + path_prefix: &str, + middle_path: &str, + rule_category: RuleCategory, ) -> Result<(Vec, String, String)> { let is_recommended = !is_nursery && meta.recommended; let mut content = Vec::new(); @@ -444,6 +558,7 @@ fn generate_rule_content<'a>( } writeln!(content, "**Since**: `v{}`", meta.version)?; + writeln!(content)?; if is_recommended || !matches!(meta.fix_kind, FixKind::None) { writeln!(content, ":::note")?; @@ -467,7 +582,7 @@ fn generate_rule_content<'a>( writeln!(content, ":::caution")?; writeln!( content, - "This rule is part of the [nursery](/linter/rules/#nursery) group." + "This rule is part of the [nursery](/{path_prefix}/{middle_path}/#nursery) group." )?; writeln!(content, ":::")?; writeln!(content)?; @@ -496,14 +611,19 @@ fn generate_rule_content<'a>( write_documentation(group, rule_name, meta.docs, &mut content, summary)?; - writeln!(content, "## Related links")?; - writeln!(content)?; - writeln!(content, "- [Disable a rule](/linter/#disable-a-lint-rule)")?; - writeln!( - content, - "- [Configure the rule fix](/linter#configure-the-rule-fix)" - )?; - writeln!(content, "- [Rule options](/linter/#rule-options)")?; + if rule_category == RuleCategory::Lint { + writeln!(content, "## Related links")?; + writeln!(content)?; + writeln!( + content, + "- [Disable a rule](/{path_prefix}/#disable-a-lint-rule)" + )?; + writeln!( + content, + "- [Configure the rule fix](/{path_prefix}#configure-the-rule-fix)" + )?; + writeln!(content, "- [Rule options](/{path_prefix}/#rule-options)")?; + } Ok(( content, @@ -569,12 +689,37 @@ fn write_documentation( content, "
    "
                             )?;
    +                    } else if test.expect_diff {
    +                        write!(
    +                            content,
    +                            "
    "
    +                        )?;
                         }
     
    -                    print_diagnostics(group, rule, &test, &block, content)
    +                    let mut buffer = HTML::new(&mut *content).with_mdx();
    +                    if test.expect_diagnostic {
    +                        print_diagnostics_or_actions(
    +                            group,
    +                            rule,
    +                            &test,
    +                            &block,
    +                            ToPrintKind::Diagnostics,
    +                            &mut buffer,
    +                        )
                             .context("snapshot test failed")?;
    +                    } else if test.expect_diff {
    +                        print_diagnostics_or_actions(
    +                            group,
    +                            rule,
    +                            &test,
    +                            &block,
    +                            ToPrintKind::Actions,
    +                            &mut buffer,
    +                        )
    +                        .context("snapshot test failed")?;
    +                    }
     
    -                    if test.expect_diagnostic {
    +                    if test.expect_diagnostic || test.expect_diff {
                             writeln!(content, "
    ")?; writeln!(content)?; } @@ -740,6 +885,7 @@ fn write_documentation( struct CodeBlockTest { tag: String, expect_diagnostic: bool, + expect_diff: bool, ignore: bool, } @@ -763,6 +909,7 @@ impl FromStr for CodeBlockTest { let mut test = CodeBlockTest { tag: String::new(), expect_diagnostic: false, + expect_diff: false, ignore: false, }; @@ -770,6 +917,7 @@ impl FromStr for CodeBlockTest { match token { // Other attributes "expect_diagnostic" => test.expect_diagnostic = true, + "expect_diff" => test.expect_diff = true, "ignore" => test.ignore = true, // Regard as language tags, last one wins _ => test.tag = token.to_string(), @@ -780,26 +928,64 @@ impl FromStr for CodeBlockTest { } } +enum ToPrintKind { + Diagnostics, + Actions, +} + +fn write_diagnostic(buffer: &mut HTML<&mut Vec>, diag: biome_diagnostics::Error) -> Result<()> { + Formatter::new(buffer).write_markup(markup! { + {PrintDiagnostic::verbose(&diag)} + })?; + Ok(()) +} + +#[derive(Debug)] +struct CodeAction(TextEdit); + +impl Diagnostic for CodeAction { + fn message(&self, fmt: &mut Formatter<'_>) -> io::Result<()> { + fmt.write_markup(markup!("Source action diff:")) + } + + fn severity(&self) -> Severity { + Severity::Information + } + + fn advices(&self, visitor: &mut dyn Visit) -> io::Result<()> { + visitor.record_diff(&self.0) + } +} + +fn write_action( + buffer: &mut HTML<&mut Vec>, + source: &str, + file_path: &str, + action: AnalyzerAction, +) -> Result<()> { + let (_, text_edit) = action.mutation.as_text_range_and_edit().unwrap_or_default(); + let action = CodeAction(text_edit) + .with_file_source_code(source) + .with_file_path(file_path); + Formatter::new(buffer).write_markup(markup! { + {PrintDiagnostic::simple(&action)} + })?; + Ok(()) +} + /// Parse and analyze the provided code block, and asserts that it emits /// exactly zero or one diagnostic depending on the value of `expect_diagnostic`. /// That diagnostic is then emitted as text into the `content` buffer -fn print_diagnostics( +fn print_diagnostics_or_actions( group: &'static str, rule: &'static str, test: &CodeBlockTest, code: &str, - content: &mut Vec, + to_print_kind: ToPrintKind, + buffer: &mut HTML<&mut Vec>, ) -> Result<()> { let file_path = format!("code-block.{}", test.tag); - let mut write = HTML::new(content).with_mdx(); - - let mut write_diagnostic = |_: &str, diag: biome_diagnostics::Error| { - Formatter::new(&mut write).write_markup(markup! { - {PrintDiagnostic::verbose(&diag)} - })?; - Ok(()) - }; if test.ignore { return Ok(()); } @@ -831,7 +1017,7 @@ fn print_diagnostics( if parse.has_errors() { for diag in parse.into_diagnostics() { let error = diag.with_file_path(&file_path).with_file_source_code(code); - write_diagnostic(code, error)?; + write_diagnostic(buffer, error)?; } } else { let root = parse.tree(); @@ -850,28 +1036,45 @@ fn print_diagnostics( file_path: PathBuf::from(&file_path), }; biome_js_analyze::analyze(&root, filter, &options, file_source, None, |signal| { - if let Some(mut diag) = signal.diagnostic() { - let category = diag.category().expect("linter diagnostic has no code"); - let severity = settings.get_current_settings().expect("project").get_severity_from_rule_code(category).expect( - "If you see this error, it means you need to run cargo codegen-configuration", - ); - - for action in signal.actions() { - if !action.is_suppression() { - rule_has_code_action = true; - diag = diag.add_code_suggestion(action.into()); + match to_print_kind { + ToPrintKind::Diagnostics => { + if let Some(mut diag) = signal.diagnostic() { + let category = + diag.category().expect("linter diagnostic has no code"); + let severity = settings.get_current_settings().expect("project").get_severity_from_rule_code(category).expect( + "If you see this error, it means you need to run cargo codegen-configuration", + ); + + for action in signal.actions() { + if !action.is_suppression() { + rule_has_code_action = true; + diag = diag.add_code_suggestion(action.into()); + } + } + + let error = diag + .with_severity(severity) + .with_file_path(&file_path) + .with_file_source_code(code); + let res = write_diagnostic(buffer, error); + + // Abort the analysis on error + if let Err(err) = res { + return ControlFlow::Break(err); + } } } - - let error = diag - .with_severity(severity) - .with_file_path(&file_path) - .with_file_source_code(code); - let res = write_diagnostic(code, error); - - // Abort the analysis on error - if let Err(err) = res { - return ControlFlow::Break(err); + ToPrintKind::Actions => { + for action in signal.actions() { + if !action.is_suppression() { + let res = + write_action(buffer, code, file_path.as_str(), action); + // Abort the analysis on error + if let Err(err) = res { + return ControlFlow::Break(err); + } + } + } } } @@ -885,7 +1088,7 @@ fn print_diagnostics( if parse.has_errors() { for diag in parse.into_diagnostics() { let error = diag.with_file_path(&file_path).with_file_source_code(code); - write_diagnostic(code, error)?; + write_diagnostic(buffer, error)?; } } else { let root = parse.tree(); @@ -901,28 +1104,45 @@ fn print_diagnostics( ..Default::default() }; biome_json_analyze::analyze(&root, filter, &options, file_source, |signal| { - if let Some(mut diag) = signal.diagnostic() { - let category = diag.category().expect("linter diagnostic has no code"); - let severity = settings.get_current_settings().expect("project").get_severity_from_rule_code(category).expect( - "If you see this error, it means you need to run cargo codegen-configuration", - ); - - for action in signal.actions() { - if !action.is_suppression() { - rule_has_code_action = true; - diag = diag.add_code_suggestion(action.into()); + match to_print_kind { + ToPrintKind::Diagnostics => { + if let Some(mut diag) = signal.diagnostic() { + let category = + diag.category().expect("linter diagnostic has no code"); + let severity = settings.get_current_settings().expect("project").get_severity_from_rule_code(category).expect( + "If you see this error, it means you need to run cargo codegen-configuration", + ); + + for action in signal.actions() { + if !action.is_suppression() { + rule_has_code_action = true; + diag = diag.add_code_suggestion(action.into()); + } + } + + let error = diag + .with_severity(severity) + .with_file_path(&file_path) + .with_file_source_code(code); + let res: Result<()> = write_diagnostic(buffer, error); + + // Abort the analysis on error + if let Err(err) = res { + return ControlFlow::Break(err); + } } } - - let error = diag - .with_severity(severity) - .with_file_path(&file_path) - .with_file_source_code(code); - let res: Result<()> = write_diagnostic(code, error); - - // Abort the analysis on error - if let Err(err) = res { - return ControlFlow::Break(err); + ToPrintKind::Actions => { + for action in signal.actions() { + if !action.is_suppression() { + let res = + write_action(buffer, code, file_path.as_str(), action); + // Abort the analysis on error + if let Err(err) = res { + return ControlFlow::Break(err); + } + } + } } } @@ -936,7 +1156,7 @@ fn print_diagnostics( if parse.has_errors() { for diag in parse.into_diagnostics() { let error = diag.with_file_path(&file_path).with_file_source_code(code); - write_diagnostic(code, error)?; + write_diagnostic(buffer, error)?; } } else { let root = parse.tree(); @@ -952,28 +1172,114 @@ fn print_diagnostics( ..Default::default() }; biome_css_analyze::analyze(&root, filter, &options, |signal| { - if let Some(mut diag) = signal.diagnostic() { - let category = diag.category().expect("linter diagnostic has no code"); - let severity = settings.get_current_settings().expect("project").get_severity_from_rule_code(category).expect( - "If you see this error, it means you need to run cargo codegen-configuration", - ); - - for action in signal.actions() { - if !action.is_suppression() { - rule_has_code_action = true; - diag = diag.add_code_suggestion(action.into()); + match to_print_kind { + ToPrintKind::Diagnostics => { + if let Some(mut diag) = signal.diagnostic() { + let category = + diag.category().expect("linter diagnostic has no code"); + let severity = settings.get_current_settings().expect("project").get_severity_from_rule_code(category).expect( + "If you see this error, it means you need to run cargo codegen-configuration", + ); + + for action in signal.actions() { + if !action.is_suppression() { + rule_has_code_action = true; + diag = diag.add_code_suggestion(action.into()); + } + } + + let error = diag + .with_severity(severity) + .with_file_path(&file_path) + .with_file_source_code(code); + let res = write_diagnostic(buffer, error); + + // Abort the analysis on error + if let Err(err) = res { + return ControlFlow::Break(err); + } + } + } + ToPrintKind::Actions => { + for action in signal.actions() { + if !action.is_suppression() { + let res = + write_action(buffer, code, file_path.as_str(), action); + // Abort the analysis on error + if let Err(err) = res { + return ControlFlow::Break(err); + } + } } } + } - let error = diag - .with_severity(severity) - .with_file_path(&file_path) - .with_file_source_code(code); - let res = write_diagnostic(code, error); + ControlFlow::Continue(()) + }); + } + } - // Abort the analysis on error - if let Err(err) = res { - return ControlFlow::Break(err); + DocumentFileSource::Graphql(_) => { + let parse = biome_graphql_parser::parse_graphql(code); + + if parse.has_errors() { + for diag in parse.into_diagnostics() { + let error = diag.with_file_path(&file_path).with_file_source_code(code); + write_diagnostic(buffer, error)?; + } + } else { + let root = parse.tree(); + + let rule_filter = RuleFilter::Rule(group, rule); + let filter = AnalysisFilter { + enabled_rules: Some(slice::from_ref(&rule_filter)), + ..AnalysisFilter::default() + }; + + let options = AnalyzerOptions { + file_path: PathBuf::from(&file_path), + ..Default::default() + }; + biome_graphql_analyze::analyze(&root, filter, &options, |signal| { + match to_print_kind { + ToPrintKind::Diagnostics => { + if let Some(mut diag) = signal.diagnostic() { + let category = + diag.category().expect("linter diagnostic has no code"); + let severity = settings.get_current_settings().expect("project").get_severity_from_rule_code(category).expect( + "If you see this error, it means you need to run cargo codegen-configuration", + ); + + for action in signal.actions() { + if !action.is_suppression() { + rule_has_code_action = true; + diag = diag.add_code_suggestion(action.into()); + } + } + + let error = diag + .with_severity(severity) + .with_file_path(&file_path) + .with_file_source_code(code); + let res = write_diagnostic(buffer, error); + + // Abort the analysis on error + if let Err(err) = res { + return ControlFlow::Break(err); + } + } + } + ToPrintKind::Actions => { + for action in signal.actions() { + if !action.is_suppression() { + let res = + write_action(buffer, code, file_path.as_str(), action); + // Abort the analysis on error + if let Err(err) = res { + return ControlFlow::Break(err); + } + } + } } } @@ -981,10 +1287,9 @@ fn print_diagnostics( }); } } + DocumentFileSource::Html(_) | DocumentFileSource::Grit(_) => todo!(), // Unknown code blocks should be ignored by tests DocumentFileSource::Unknown => {} - DocumentFileSource::Graphql(_) => {} - _ => {} } Ok(()) @@ -1059,6 +1364,12 @@ Rules that belong to this group ""are not subject to semantic version" "Rules that detect code that is likely to be incorrect or useless." }, ), + "source" => ( + "Source", + markup! { + "Rules that generate code actions that are safe to apply to the code." + }, + ), _ => panic!("Unknown group ID {group:?}"), } } diff --git a/codegen/src/rules_sources.rs b/codegen/src/rules_sources.rs index 2f3e57073..950bffffe 100644 --- a/codegen/src/rules_sources.rs +++ b/codegen/src/rules_sources.rs @@ -1,6 +1,7 @@ use crate::lintdoc::RuleToDocument; use crate::shared::add_codegen_disclaimer_frontmatter; use anyhow::Result; +use biome_analyze::RuleCategory; use biome_string_case::Case; use std::cmp::Ordering; use std::collections::{BTreeMap, BTreeSet}; @@ -29,6 +30,7 @@ impl PartialOrd for SourceSet { pub(crate) fn generate_rule_sources( rules: BTreeMap<&str, BTreeMap<&'static str, RuleToDocument>>, + rule_category: RuleCategory, ) -> Result> { let mut buffer = vec![]; @@ -50,6 +52,11 @@ description: A page that maps lint rules from other sources to Biome let mut rules_by_source = BTreeMap::>::new(); let mut exclusive_biome_rules = BTreeSet::<(String, String)>::new(); + let prefix_path = match rule_category { + RuleCategory::Lint => "linter/rules", + RuleCategory::Action => "assist/actions", + _ => unreachable!(""), + }; for (rule_name, rule_to_document) in rules { for (_, metadata) in rule_to_document.language_to_metadata { @@ -60,7 +67,7 @@ description: A page that maps lint rules from other sources to Biome if metadata.sources.is_empty() { exclusive_biome_rules.insert(( rule_name.to_string(), - format!("/linter/rules/{kebab_rule_name}"), + format!("/{prefix_path}/{kebab_rule_name}"), )); } else { for source in metadata.sources { @@ -68,7 +75,7 @@ description: A page that maps lint rules from other sources to Biome if let Some(set) = set { set.insert(SourceSet { biome_rule_name: rule_name.to_string(), - biome_link: format!("/linter/rules/{kebab_rule_name}"), + biome_link: format!("/{prefix_path}/{kebab_rule_name}"), source_link: source.to_rule_url(), source_rule_name: source.as_rule_name().to_string(), inspired: metadata @@ -79,7 +86,7 @@ description: A page that maps lint rules from other sources to Biome let mut set = BTreeSet::new(); set.insert(SourceSet { biome_rule_name: rule_name.to_string(), - biome_link: format!("/linter/rules/{kebab_rule_name}"), + biome_link: format!("/{prefix_path}/{kebab_rule_name}"), source_link: source.to_rule_url(), source_rule_name: source.as_rule_name().to_string(), inspired: metadata.source_kind.map_or(true, |kind| kind.is_inspired()), diff --git a/package.json b/package.json index e2c4d1932..06db8ffd7 100644 --- a/package.json +++ b/package.json @@ -1,76 +1,76 @@ { - "name": "@biomejs/website", - "private": true, - "scripts": { - "start": "astro dev", - "format": "pnpm biome format --write", - "check": "pnpm biome check --write", - "tsc": "tsc --skipLibCheck", - "build": "astro build", - "preview": "astro preview", - "textlint": "textlint './src/content/docs/ja/**/*.{md,mdx}'", - "textlint:fix": "textlint --fix './src/content/docs/ja/**/*.{md,mdx}'", - "codegen": "cargo run -p codegen", - "codegen:rules": "pnpm codegen rules", - "codegen:release-files": "pnpm codegen release-files", - "codegen:metadata": "pnpm codegen metadata", - "codegen:env": "pnpm codegen env", - "codegen:diagnostics": "pnpm codegen diagnostics", - "codegen:all": "pnpm codegen all" - }, - "devDependencies": { - "@astrojs/netlify": "5.5.3", - "@astrojs/prism": "3.1.0", - "@astrojs/react": "3.6.2", - "@astrojs/rss": "4.0.9", - "@astrojs/starlight": "0.26.1", - "@biomejs/biome": "1.8.3", - "@biomejs/wasm-web": "https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@92286ab", - "@codemirror/lang-css": "6.3.0", - "@codemirror/lang-html": "6.4.9", - "@codemirror/lang-javascript": "6.2.2", - "@codemirror/lang-json": "6.0.1", - "@codemirror/lang-vue": "0.1.3", - "@codemirror/lint": "6.8.2", - "@codemirror/state": "6.4.1", - "@codemirror/view": "6.34.1", - "@playwright/test": "1.47.2", - "@replit/codemirror-lang-svelte": "6.0.0", - "@types/node": "20.16.10", - "@types/react": "18.3.11", - "@types/react-dom": "18.3.1", - "@uiw/react-codemirror": "4.23.5", - "@vitejs/plugin-react": "4.3.2", - "astro": "4.16.7", - "astro-og-canvas": "0.5.3", - "autoprefixer": "10.4.20", - "canvaskit-wasm": "0.39.1", - "cm6-graphql": "0.0.15", - "codemirror-lang-rome-ast": "0.0.6", - "fast-diff": "1.3.0", - "hast-util-to-html": "9.0.3", - "hast-util-to-string": "3.0.1", - "hastscript": "9.0.0", - "html-escaper": "3.0.3", - "lang-rome-formatter-ir": "0.0.2", - "mdast-util-to-hast": "13.2.0", - "mermaid": "10.9.3", - "postcss": "8.4.47", - "postcss-mixins": "11.0.3", - "prettier": "3.3.3", - "prettier-plugin-svelte": "3.2.7", - "react": "18.3.1", - "react-dom": "18.3.1", - "rehype-autolink-headings": "7.1.0", - "rehype-slug": "6.0.0", - "remark-toc": "9.0.0", - "sharp": "0.33.5", - "textlint": "14.2.0", - "textlint-rule-preset-jtf-style": "2.3.14", - "textlint-rule-prh": "6.0.0", - "typescript": "5.5.4", - "vite": "5.4.10", - "vite-plugin-svgr": "4.2.0" - }, - "packageManager": "pnpm@9.6.0" + "name": "@biomejs/website", + "private": true, + "scripts": { + "dev": "astro dev", + "format": "pnpm biome format --write", + "check": "pnpm biome check --write", + "tsc": "tsc --skipLibCheck", + "build": "astro build", + "preview": "astro preview", + "textlint": "textlint './src/content/docs/ja/**/*.{md,mdx}'", + "textlint:fix": "textlint --fix './src/content/docs/ja/**/*.{md,mdx}'", + "codegen": "cargo run -p codegen", + "codegen:rules": "pnpm codegen rules", + "codegen:release-files": "pnpm codegen release-files", + "codegen:metadata": "pnpm codegen metadata", + "codegen:env": "pnpm codegen env", + "codegen:diagnostics": "pnpm codegen diagnostics", + "codegen:all": "pnpm codegen all" + }, + "devDependencies": { + "@astrojs/netlify": "5.5.3", + "@astrojs/prism": "3.1.0", + "@astrojs/react": "3.6.2", + "@astrojs/rss": "4.0.9", + "@astrojs/starlight": "0.26.1", + "@biomejs/biome": "1.8.3", + "@biomejs/wasm-web": "https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@92286ab", + "@codemirror/lang-css": "6.3.0", + "@codemirror/lang-html": "6.4.9", + "@codemirror/lang-javascript": "6.2.2", + "@codemirror/lang-json": "6.0.1", + "@codemirror/lang-vue": "0.1.3", + "@codemirror/lint": "6.8.2", + "@codemirror/state": "6.4.1", + "@codemirror/view": "6.34.1", + "@playwright/test": "1.47.2", + "@replit/codemirror-lang-svelte": "6.0.0", + "@types/node": "20.16.10", + "@types/react": "18.3.11", + "@types/react-dom": "18.3.1", + "@uiw/react-codemirror": "4.23.5", + "@vitejs/plugin-react": "4.3.2", + "astro": "4.16.7", + "astro-og-canvas": "0.5.3", + "autoprefixer": "10.4.20", + "canvaskit-wasm": "0.39.1", + "cm6-graphql": "0.0.15", + "codemirror-lang-rome-ast": "0.0.6", + "fast-diff": "1.3.0", + "hast-util-to-html": "9.0.3", + "hast-util-to-string": "3.0.1", + "hastscript": "9.0.0", + "html-escaper": "3.0.3", + "lang-rome-formatter-ir": "0.0.2", + "mdast-util-to-hast": "13.2.0", + "mermaid": "10.9.3", + "postcss": "8.4.47", + "postcss-mixins": "11.0.3", + "prettier": "3.3.3", + "prettier-plugin-svelte": "3.2.7", + "react": "18.3.1", + "react-dom": "18.3.1", + "rehype-autolink-headings": "7.1.0", + "rehype-slug": "6.0.0", + "remark-toc": "9.0.0", + "sharp": "0.33.5", + "textlint": "14.2.0", + "textlint-rule-preset-jtf-style": "2.3.14", + "textlint-rule-prh": "6.0.0", + "typescript": "5.5.4", + "vite": "5.4.10", + "vite-plugin-svgr": "4.2.0" + }, + "packageManager": "pnpm@9.6.0" } diff --git a/src/components/generated/assist/Groups.astro b/src/components/generated/assist/Groups.astro new file mode 100644 index 000000000..42cde9840 --- /dev/null +++ b/src/components/generated/assist/Groups.astro @@ -0,0 +1,2 @@ + +
  • source: Rules that generate code actions that are safe to apply to the code.
  • diff --git a/src/components/generated/assist/NumberOfRules.astro b/src/components/generated/assist/NumberOfRules.astro new file mode 100644 index 000000000..2f66058e3 --- /dev/null +++ b/src/components/generated/assist/NumberOfRules.astro @@ -0,0 +1,2 @@ + +2 \ No newline at end of file diff --git a/src/components/generated/assist/RecommendedRules.astro b/src/components/generated/assist/RecommendedRules.astro new file mode 100644 index 000000000..240b1cca0 --- /dev/null +++ b/src/components/generated/assist/RecommendedRules.astro @@ -0,0 +1,4 @@ + +
      + +
    \ No newline at end of file diff --git a/src/components/generated/Groups.astro b/src/components/generated/linter/Groups.astro similarity index 100% rename from src/components/generated/Groups.astro rename to src/components/generated/linter/Groups.astro diff --git a/src/components/generated/NumberOfRules.astro b/src/components/generated/linter/NumberOfRules.astro similarity index 100% rename from src/components/generated/NumberOfRules.astro rename to src/components/generated/linter/NumberOfRules.astro diff --git a/src/components/generated/RecommendedRules.astro b/src/components/generated/linter/RecommendedRules.astro similarity index 100% rename from src/components/generated/RecommendedRules.astro rename to src/components/generated/linter/RecommendedRules.astro diff --git a/src/content/docs/assist/actions/index.mdx b/src/content/docs/assist/actions/index.mdx new file mode 100644 index 000000000..8c7e4dd2d --- /dev/null +++ b/src/content/docs/assist/actions/index.mdx @@ -0,0 +1,35 @@ +--- +# Don't modify this file manually. This file is auto generated from source, and you will lose your changes next time the website is built. +# Head to the `biomejs/biome` repository, and modify the source code in there. + +title: Actions +description: List of available lint actions +--- + + +import RecommendedRules from "@/components/generated/assist/RecommendedRules.astro"; +import { Icon } from "@astrojs/starlight/components"; + +Below the list of rules supported by Biome, divided by group. Here's a legend of the emojis: +- The icon indicates that the rule is part of the recommended rules. +- The icon indicates that the rule provides a code action (fix) that is **safe** to apply. +- The icon indicates that the rule provides a code action (fix) that is **unsafe** to apply. +- The icon indicates that the rule is applied to JavaScript and super languages files. +- The icon indicates that the rule is applied to TypeScript and TSX files. +- The icon indicates that the rule is applied to JSON files. +- The icon indicates that the rule is applied to CSS files. +- The icon indicates that the rule is applied to GraphQL files. + +## Source + +Rules that generate code actions that are safe to apply to the code. +| Rule name | Description | Properties | +| --- | --- | --- | +| [useSortedAttributes](/assist/actions/use-sorted-attributes) | Enforce attribute sorting in JSX elements. | | +| [useSortedKeys](/assist/actions/use-sorted-keys) | Sorts the keys of a JSON object in natural order | | + +## Recommended rules + +The recommended rules are: + + diff --git a/src/content/docs/assist/actions/use-sorted-attributes.mdx b/src/content/docs/assist/actions/use-sorted-attributes.mdx new file mode 100644 index 000000000..303e6b052 --- /dev/null +++ b/src/content/docs/assist/actions/use-sorted-attributes.mdx @@ -0,0 +1,47 @@ +--- +# Don't modify this file manually. This file is auto generated from source, and you will lose your changes next time the website is built. +# Head to the `biomejs/biome` repository, and modify the source code in there. + +title: useSortedAttributes +description: | + Enforce attribute sorting in JSX elements. +--- +import { Tabs, TabItem } from '@astrojs/starlight/components'; + +**Diagnostic Category: `assist/source/useSortedAttributes`** + + +**Since**: `v2.0.0` + +Sources: +- Same as: react/jsx-sort-props + +Enforce attribute sorting in JSX elements. + +This rule checks if the JSX props are sorted in a consistent way. +Props are sorted alphabetically. +This rule will not consider spread props as sortable. +Instead, whenever it encounters a spread prop, it will sort all the +previous non spread props up until the nearest spread prop, if one +exist. +This prevents breaking the override of certain props using spread +props. + +## Examples + +```js +; +``` + +
    code-block.js ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    Source action diff:

    1 - <Hello·lastName="Smith"·firstName="John"·/>;
    1+ <Hello·firstName="John"·lastName="Smith"·/>;
    2 2

    + +```js +; +``` + +
    code-block.js ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    Source action diff:

    1 - <Hello·lastName="Smith"·firstName="John"·{...this.props}·tel="0000"·address="111·Main·Street"··{...another.props}·lastName="Smith"·/>;
    1+ <Hello·firstName="John"·lastName="Smith"·{...this.props}·tel="0000"·address="111·Main·Street"··{...another.props}·lastName="Smith"·/>;
    2 2

    code-block.js ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    Source action diff:

    1 - <Hello·lastName="Smith"·firstName="John"·{...this.props}·tel="0000"·address="111·Main·Street"··{...another.props}·lastName="Smith"·/>;
    1+ <Hello·lastName="Smith"·firstName="John"·{...this.props}·address="111·Main·Street"·tel="0000"··{...another.props}·lastName="Smith"·/>;
    2 2

    + + +
    +
    + diff --git a/src/content/docs/assist/actions/use-sorted-keys.mdx b/src/content/docs/assist/actions/use-sorted-keys.mdx new file mode 100644 index 000000000..fec9055a4 --- /dev/null +++ b/src/content/docs/assist/actions/use-sorted-keys.mdx @@ -0,0 +1,35 @@ +--- +# Don't modify this file manually. This file is auto generated from source, and you will lose your changes next time the website is built. +# Head to the `biomejs/biome` repository, and modify the source code in there. + +title: useSortedKeys +description: | + Sorts the keys of a JSON object in natural order +--- +import { Tabs, TabItem } from '@astrojs/starlight/components'; + +**Diagnostic Category: `assist/source/useSortedKeys`** + + +**Since**: `v1.9.0` + +Sorts the keys of a JSON object in natural order + +## Examples + +```json +{ + "vase": "fancy", + "nested": { + "omega": "bar", + "alpha": "foo" + } +} +``` + +
    code-block.json ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    Source action diff:

    1 1 {
    2 - ····"vase":·"fancy",
    3 - ····"nested":·{
    2+ ····"nested":·{
    4 3 "omega": "bar",
    5 4 "alpha": "foo"
    6 - ····}
    5+ ····},
    6+ ····"vase":·"fancy"
    7 7 }
    8 8

    code-block.json ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    Source action diff:

    2 2 "vase": "fancy",
    3 3 "nested": {
    4 - ········"omega":·"bar",
    5 - ········"alpha":·"foo"
    4+ ········"alpha":·"foo",
    5+ ········"omega":·"bar"
    6 6 }
    7 7 }

    + + +
    +
    + diff --git a/src/content/docs/assist/index.mdx b/src/content/docs/assist/index.mdx new file mode 100644 index 000000000..6f0780bf3 --- /dev/null +++ b/src/content/docs/assist/index.mdx @@ -0,0 +1,6 @@ +--- +title: Assist +description: Learn about Biome assist +--- + +Biome assist offers a series of actions that users can opt-in to \ No newline at end of file diff --git a/src/content/docs/assist/rules-sources.mdx b/src/content/docs/assist/rules-sources.mdx new file mode 100644 index 000000000..5d9cb166a --- /dev/null +++ b/src/content/docs/assist/rules-sources.mdx @@ -0,0 +1,19 @@ +--- +# Don't modify this file manually. This file is auto generated from source, and you will lose your changes next time the website is built. +# Head to the `biomejs/biome` repository, and modify the source code in there. + + +title: Rules sources +description: A page that maps lint rules from other sources to Biome +--- + +## Biome exclusive rules +- [useSortedKeys](/linter/rules/use-sorted-keys) +## Rules from other sources +:::note +Some **Biome** rules might **not** have options, compared to the original rule. +::: +### eslint-plugin-react +| eslint-plugin-react rule name | Biome rule name | +| ---- | ---- | +| [jsx-sort-props](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md) |[useSortedAttributes](/linter/rules/use-sorted-attributes) | diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 8f80a2348..eabde7c2d 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -40,7 +40,7 @@ import "@/styles/_community.css"; import Netlify from "@/components/Netlify.astro"; import Sponsors from "@/components/Sponsors.astro"; import LinterExample from "@/components/linter/example.md"; -import NumberOfRules from "@/components/generated/NumberOfRules.astro"; +import NumberOfRules from "@/components/generated/linter/NumberOfRules.astro";
    diff --git a/src/content/docs/ja/linter/index.mdx b/src/content/docs/ja/linter/index.mdx index ae86a6843..dcc629987 100644 --- a/src/content/docs/ja/linter/index.mdx +++ b/src/content/docs/ja/linter/index.mdx @@ -3,8 +3,8 @@ title: Linter description: Biome linter の使い方について。 --- -import NumberOfRules from "@/components/generated/NumberOfRules.astro"; -import RecommendedRules from "@/components/generated/RecommendedRules.astro"; +import NumberOfRules from "@/components/generated/linter/NumberOfRules.astro"; +import RecommendedRules from "@/components/generated/linter/RecommendedRules.astro"; Biomeのlinterはあなたのコードを静的に分析し、典型的なエラーを検出して、より自然なコードを書く手助けをします。 [複数の言語](/internals/language-support)をサポートし、全部で[** 個のルール**](/linter/rules/)を提供しています。 diff --git a/src/content/docs/linter/index.mdx b/src/content/docs/linter/index.mdx index 63a41f010..39f527a38 100644 --- a/src/content/docs/linter/index.mdx +++ b/src/content/docs/linter/index.mdx @@ -3,7 +3,7 @@ title: Linter description: How to use the Biome linter. --- -import NumberOfRules from "@/components/generated/NumberOfRules.astro"; +import NumberOfRules from "@/components/generated/linter/NumberOfRules.astro"; import PackageManagerBiomeCommand from "@/components/PackageManagerBiomeCommand.astro"; Biome's linter statically analyzes your code to find and fix common errors and to help you write better, modern code. diff --git a/src/content/docs/linter/rules/index.mdx b/src/content/docs/linter/rules/index.mdx index b1f95ce2a..472415499 100644 --- a/src/content/docs/linter/rules/index.mdx +++ b/src/content/docs/linter/rules/index.mdx @@ -3,11 +3,11 @@ # Head to the `biomejs/biome` repository, and modify the source code in there. title: Rules -description: List of available lint rules. +description: List of available lint rules --- -import RecommendedRules from "@/components/generated/RecommendedRules.astro"; +import RecommendedRules from "@/components/generated/linter/RecommendedRules.astro"; import { Icon } from "@astrojs/starlight/components"; Below the list of rules supported by Biome, divided by group. Here's a legend of the emojis: @@ -313,8 +313,8 @@ Rules that detect code that is likely to be incorrect or useless. | [noDuplicateClassMembers](/linter/rules/no-duplicate-class-members) | Disallow duplicate class members. | | | [noDuplicateFontNames](/linter/rules/no-duplicate-font-names) | Disallow duplicate names within font families. | | | [noDuplicateJsxProps](/linter/rules/no-duplicate-jsx-props) | Prevents JSX properties to be assigned multiple times. | | -| [noDuplicateObjectKeys](/linter/rules/no-duplicate-object-keys) | Disallow two keys with the same name inside objects. | | | [noDuplicateObjectKeys](/linter/rules/no-duplicate-object-keys) | Disallow two keys with the same name inside objects. | | +| [noDuplicateObjectKeys](/linter/rules/no-duplicate-object-keys) | Disallow two keys with the same name inside objects. | | | [noDuplicateParameters](/linter/rules/no-duplicate-parameters) | Disallow duplicate function parameter name. | | | [noDuplicateSelectorsKeyframeBlock](/linter/rules/no-duplicate-selectors-keyframe-block) | Disallow duplicate selectors within keyframe blocks. | | | [noDuplicateTestHooks](/linter/rules/no-duplicate-test-hooks) | A `describe` block should not contain duplicate hooks. | | diff --git a/src/content/docs/linter/rules/no-access-key.mdx b/src/content/docs/linter/rules/no-access-key.mdx index 7ef91bb24..f93989b10 100644 --- a/src/content/docs/linter/rules/no-access-key.mdx +++ b/src/content/docs/linter/rules/no-access-key.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-accumulating-spread.mdx b/src/content/docs/linter/rules/no-accumulating-spread.mdx index be8155e1f..128af6836 100644 --- a/src/content/docs/linter/rules/no-accumulating-spread.mdx +++ b/src/content/docs/linter/rules/no-accumulating-spread.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-approximative-numeric-constant.mdx b/src/content/docs/linter/rules/no-approximative-numeric-constant.mdx index 5241348df..b94429931 100644 --- a/src/content/docs/linter/rules/no-approximative-numeric-constant.mdx +++ b/src/content/docs/linter/rules/no-approximative-numeric-constant.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-arguments.mdx b/src/content/docs/linter/rules/no-arguments.mdx index 5430d0178..b1bab423b 100644 --- a/src/content/docs/linter/rules/no-arguments.mdx +++ b/src/content/docs/linter/rules/no-arguments.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-aria-hidden-on-focusable.mdx b/src/content/docs/linter/rules/no-aria-hidden-on-focusable.mdx index 94d505399..c75f745fe 100644 --- a/src/content/docs/linter/rules/no-aria-hidden-on-focusable.mdx +++ b/src/content/docs/linter/rules/no-aria-hidden-on-focusable.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.4.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-aria-unsupported-elements.mdx b/src/content/docs/linter/rules/no-aria-unsupported-elements.mdx index 87934d0ee..7448d3868 100644 --- a/src/content/docs/linter/rules/no-aria-unsupported-elements.mdx +++ b/src/content/docs/linter/rules/no-aria-unsupported-elements.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-array-index-key.mdx b/src/content/docs/linter/rules/no-array-index-key.mdx index 881882c1a..9b23513b2 100644 --- a/src/content/docs/linter/rules/no-array-index-key.mdx +++ b/src/content/docs/linter/rules/no-array-index-key.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-assign-in-expressions.mdx b/src/content/docs/linter/rules/no-assign-in-expressions.mdx index 9af1253ad..cee27bcf5 100644 --- a/src/content/docs/linter/rules/no-assign-in-expressions.mdx +++ b/src/content/docs/linter/rules/no-assign-in-expressions.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-async-promise-executor.mdx b/src/content/docs/linter/rules/no-async-promise-executor.mdx index 02c2fb686..df5eb3ac9 100644 --- a/src/content/docs/linter/rules/no-async-promise-executor.mdx +++ b/src/content/docs/linter/rules/no-async-promise-executor.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-autofocus.mdx b/src/content/docs/linter/rules/no-autofocus.mdx index 74da01920..a85ba2113 100644 --- a/src/content/docs/linter/rules/no-autofocus.mdx +++ b/src/content/docs/linter/rules/no-autofocus.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-banned-types.mdx b/src/content/docs/linter/rules/no-banned-types.mdx index 916c29193..325791beb 100644 --- a/src/content/docs/linter/rules/no-banned-types.mdx +++ b/src/content/docs/linter/rules/no-banned-types.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-barrel-file.mdx b/src/content/docs/linter/rules/no-barrel-file.mdx index 1e5b24cbd..99ec4f84e 100644 --- a/src/content/docs/linter/rules/no-barrel-file.mdx +++ b/src/content/docs/linter/rules/no-barrel-file.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + Sources: - Inspired from: barrel-files/avoid-barrel-files diff --git a/src/content/docs/linter/rules/no-blank-target.mdx b/src/content/docs/linter/rules/no-blank-target.mdx index 8c3517d5c..308e1b059 100644 --- a/src/content/docs/linter/rules/no-blank-target.mdx +++ b/src/content/docs/linter/rules/no-blank-target.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-catch-assign.mdx b/src/content/docs/linter/rules/no-catch-assign.mdx index 6ea6246a0..7162d1a4d 100644 --- a/src/content/docs/linter/rules/no-catch-assign.mdx +++ b/src/content/docs/linter/rules/no-catch-assign.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-children-prop.mdx b/src/content/docs/linter/rules/no-children-prop.mdx index 7f30bc76f..76f8ec17f 100644 --- a/src/content/docs/linter/rules/no-children-prop.mdx +++ b/src/content/docs/linter/rules/no-children-prop.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-class-assign.mdx b/src/content/docs/linter/rules/no-class-assign.mdx index 7491feced..842fd7405 100644 --- a/src/content/docs/linter/rules/no-class-assign.mdx +++ b/src/content/docs/linter/rules/no-class-assign.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-comma-operator.mdx b/src/content/docs/linter/rules/no-comma-operator.mdx index b5ff35c7c..c4ce0068e 100644 --- a/src/content/docs/linter/rules/no-comma-operator.mdx +++ b/src/content/docs/linter/rules/no-comma-operator.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-comment-text.mdx b/src/content/docs/linter/rules/no-comment-text.mdx index 3b28b2928..2e69fe1f3 100644 --- a/src/content/docs/linter/rules/no-comment-text.mdx +++ b/src/content/docs/linter/rules/no-comment-text.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-common-js.mdx b/src/content/docs/linter/rules/no-common-js.mdx index 457404c84..01585cb44 100644 --- a/src/content/docs/linter/rules/no-common-js.mdx +++ b/src/content/docs/linter/rules/no-common-js.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-compare-neg-zero.mdx b/src/content/docs/linter/rules/no-compare-neg-zero.mdx index 98bbf01aa..e1c688eeb 100644 --- a/src/content/docs/linter/rules/no-compare-neg-zero.mdx +++ b/src/content/docs/linter/rules/no-compare-neg-zero.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-confusing-labels.mdx b/src/content/docs/linter/rules/no-confusing-labels.mdx index 657e820e4..a4d2820d6 100644 --- a/src/content/docs/linter/rules/no-confusing-labels.mdx +++ b/src/content/docs/linter/rules/no-confusing-labels.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-confusing-void-type.mdx b/src/content/docs/linter/rules/no-confusing-void-type.mdx index 271943264..d7c8f3c17 100644 --- a/src/content/docs/linter/rules/no-confusing-void-type.mdx +++ b/src/content/docs/linter/rules/no-confusing-void-type.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.2.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-console-log.mdx b/src/content/docs/linter/rules/no-console-log.mdx index 2aef0e3bf..948d96122 100644 --- a/src/content/docs/linter/rules/no-console-log.mdx +++ b/src/content/docs/linter/rules/no-console-log.mdx @@ -16,6 +16,7 @@ This rule is deprecated and will be removed in the next major release. **Reason**: Use the rule noConsole instead. ::: **Since**: `v1.0.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/no-console.mdx b/src/content/docs/linter/rules/no-console.mdx index ba8f102ce..82f421df7 100644 --- a/src/content/docs/linter/rules/no-console.mdx +++ b/src/content/docs/linter/rules/no-console.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/no-const-assign.mdx b/src/content/docs/linter/rules/no-const-assign.mdx index 6ef894cd0..b17657e80 100644 --- a/src/content/docs/linter/rules/no-const-assign.mdx +++ b/src/content/docs/linter/rules/no-const-assign.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-const-enum.mdx b/src/content/docs/linter/rules/no-const-enum.mdx index 97be572e0..7c3d54caa 100644 --- a/src/content/docs/linter/rules/no-const-enum.mdx +++ b/src/content/docs/linter/rules/no-const-enum.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-constant-condition.mdx b/src/content/docs/linter/rules/no-constant-condition.mdx index 786b5b1b0..9fd590f32 100644 --- a/src/content/docs/linter/rules/no-constant-condition.mdx +++ b/src/content/docs/linter/rules/no-constant-condition.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-constant-math-min-max-clamp.mdx b/src/content/docs/linter/rules/no-constant-math-min-max-clamp.mdx index 297d2b346..fbd9182d9 100644 --- a/src/content/docs/linter/rules/no-constant-math-min-max-clamp.mdx +++ b/src/content/docs/linter/rules/no-constant-math-min-max-clamp.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.7.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/no-constructor-return.mdx b/src/content/docs/linter/rules/no-constructor-return.mdx index 710168438..ddb7da591 100644 --- a/src/content/docs/linter/rules/no-constructor-return.mdx +++ b/src/content/docs/linter/rules/no-constructor-return.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-control-characters-in-regex.mdx b/src/content/docs/linter/rules/no-control-characters-in-regex.mdx index 8abbc74b9..9b39ec1b6 100644 --- a/src/content/docs/linter/rules/no-control-characters-in-regex.mdx +++ b/src/content/docs/linter/rules/no-control-characters-in-regex.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-dangerously-set-inner-html-with-children.mdx b/src/content/docs/linter/rules/no-dangerously-set-inner-html-with-children.mdx index b48350a3b..87e955b6f 100644 --- a/src/content/docs/linter/rules/no-dangerously-set-inner-html-with-children.mdx +++ b/src/content/docs/linter/rules/no-dangerously-set-inner-html-with-children.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-dangerously-set-inner-html.mdx b/src/content/docs/linter/rules/no-dangerously-set-inner-html.mdx index c1776a705..d32dfe7e5 100644 --- a/src/content/docs/linter/rules/no-dangerously-set-inner-html.mdx +++ b/src/content/docs/linter/rules/no-dangerously-set-inner-html.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-debugger.mdx b/src/content/docs/linter/rules/no-debugger.mdx index 82d00d581..39b39cb84 100644 --- a/src/content/docs/linter/rules/no-debugger.mdx +++ b/src/content/docs/linter/rules/no-debugger.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-default-export.mdx b/src/content/docs/linter/rules/no-default-export.mdx index 757713e50..85b72c987 100644 --- a/src/content/docs/linter/rules/no-default-export.mdx +++ b/src/content/docs/linter/rules/no-default-export.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.4.0` + Sources: - Same as: import/no-default-export diff --git a/src/content/docs/linter/rules/no-delete.mdx b/src/content/docs/linter/rules/no-delete.mdx index 74058d0f9..ecf788763 100644 --- a/src/content/docs/linter/rules/no-delete.mdx +++ b/src/content/docs/linter/rules/no-delete.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-descending-specificity.mdx b/src/content/docs/linter/rules/no-descending-specificity.mdx index 78992d7dd..1cc6af98e 100644 --- a/src/content/docs/linter/rules/no-descending-specificity.mdx +++ b/src/content/docs/linter/rules/no-descending-specificity.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.3` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-distracting-elements.mdx b/src/content/docs/linter/rules/no-distracting-elements.mdx index 637fbc6e3..76654d147 100644 --- a/src/content/docs/linter/rules/no-distracting-elements.mdx +++ b/src/content/docs/linter/rules/no-distracting-elements.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-document-cookie.mdx b/src/content/docs/linter/rules/no-document-cookie.mdx index f940c6f40..f7291d75a 100644 --- a/src/content/docs/linter/rules/no-document-cookie.mdx +++ b/src/content/docs/linter/rules/no-document-cookie.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.4` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-document-import-in-page.mdx b/src/content/docs/linter/rules/no-document-import-in-page.mdx index be30dae28..dd8e7a63b 100644 --- a/src/content/docs/linter/rules/no-document-import-in-page.mdx +++ b/src/content/docs/linter/rules/no-document-import-in-page.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.4` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-done-callback.mdx b/src/content/docs/linter/rules/no-done-callback.mdx index ccbbdc2cf..5cee61af9 100644 --- a/src/content/docs/linter/rules/no-done-callback.mdx +++ b/src/content/docs/linter/rules/no-done-callback.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.1` + Sources: - Same as: jest/no-done-callback diff --git a/src/content/docs/linter/rules/no-double-equals.mdx b/src/content/docs/linter/rules/no-double-equals.mdx index d87ec97ac..ce0d6188e 100644 --- a/src/content/docs/linter/rules/no-double-equals.mdx +++ b/src/content/docs/linter/rules/no-double-equals.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-duplicate-at-import-rules.mdx b/src/content/docs/linter/rules/no-duplicate-at-import-rules.mdx index 2e5701dfa..0a2ea9819 100644 --- a/src/content/docs/linter/rules/no-duplicate-at-import-rules.mdx +++ b/src/content/docs/linter/rules/no-duplicate-at-import-rules.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-duplicate-case.mdx b/src/content/docs/linter/rules/no-duplicate-case.mdx index 19ccf6ff4..874859335 100644 --- a/src/content/docs/linter/rules/no-duplicate-case.mdx +++ b/src/content/docs/linter/rules/no-duplicate-case.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-duplicate-class-members.mdx b/src/content/docs/linter/rules/no-duplicate-class-members.mdx index 3dfb581ed..7fac886ce 100644 --- a/src/content/docs/linter/rules/no-duplicate-class-members.mdx +++ b/src/content/docs/linter/rules/no-duplicate-class-members.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-duplicate-custom-properties.mdx b/src/content/docs/linter/rules/no-duplicate-custom-properties.mdx index 1452186f5..f68a15a35 100644 --- a/src/content/docs/linter/rules/no-duplicate-custom-properties.mdx +++ b/src/content/docs/linter/rules/no-duplicate-custom-properties.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-duplicate-else-if.mdx b/src/content/docs/linter/rules/no-duplicate-else-if.mdx index dbce10233..4333972e8 100644 --- a/src/content/docs/linter/rules/no-duplicate-else-if.mdx +++ b/src/content/docs/linter/rules/no-duplicate-else-if.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.2` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-duplicate-font-names.mdx b/src/content/docs/linter/rules/no-duplicate-font-names.mdx index 272da53e7..fd4776ade 100644 --- a/src/content/docs/linter/rules/no-duplicate-font-names.mdx +++ b/src/content/docs/linter/rules/no-duplicate-font-names.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-duplicate-jsx-props.mdx b/src/content/docs/linter/rules/no-duplicate-jsx-props.mdx index cb06fb6a4..ec80e347f 100644 --- a/src/content/docs/linter/rules/no-duplicate-jsx-props.mdx +++ b/src/content/docs/linter/rules/no-duplicate-jsx-props.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-duplicate-object-keys.mdx b/src/content/docs/linter/rules/no-duplicate-object-keys.mdx index 0395d5ea6..abdb741ef 100644 --- a/src/content/docs/linter/rules/no-duplicate-object-keys.mdx +++ b/src/content/docs/linter/rules/no-duplicate-object-keys.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. @@ -71,6 +72,7 @@ const obj = { **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-duplicate-parameters.mdx b/src/content/docs/linter/rules/no-duplicate-parameters.mdx index aeddf0566..e6c65dfae 100644 --- a/src/content/docs/linter/rules/no-duplicate-parameters.mdx +++ b/src/content/docs/linter/rules/no-duplicate-parameters.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-duplicate-properties.mdx b/src/content/docs/linter/rules/no-duplicate-properties.mdx index e610736c1..3190485db 100644 --- a/src/content/docs/linter/rules/no-duplicate-properties.mdx +++ b/src/content/docs/linter/rules/no-duplicate-properties.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.4` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-duplicate-selectors-keyframe-block.mdx b/src/content/docs/linter/rules/no-duplicate-selectors-keyframe-block.mdx index f6b76fc0c..553c2243f 100644 --- a/src/content/docs/linter/rules/no-duplicate-selectors-keyframe-block.mdx +++ b/src/content/docs/linter/rules/no-duplicate-selectors-keyframe-block.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-duplicate-test-hooks.mdx b/src/content/docs/linter/rules/no-duplicate-test-hooks.mdx index ca1cd9499..88122f6f7 100644 --- a/src/content/docs/linter/rules/no-duplicate-test-hooks.mdx +++ b/src/content/docs/linter/rules/no-duplicate-test-hooks.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-duplicated-fields.mdx b/src/content/docs/linter/rules/no-duplicated-fields.mdx index 3744d1a97..d059fbccb 100644 --- a/src/content/docs/linter/rules/no-duplicated-fields.mdx +++ b/src/content/docs/linter/rules/no-duplicated-fields.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: @@ -33,7 +34,7 @@ query test($v: String, $t: String, $v: String) { } ``` -
    +
    code-block.graphql:1:36 lint/nursery/noDuplicatedFields ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    Variable `v` defined multiple times.

    > 1 │ query test($v: String, $t: String, $v: String) {
    ^^^^^^^^^^
    2 │ id
    3 │ }

    Remove the duplicated variable.

    ### Valid diff --git a/src/content/docs/linter/rules/no-dynamic-namespace-import-access.mdx b/src/content/docs/linter/rules/no-dynamic-namespace-import-access.mdx index 07c498b7c..74323e61d 100644 --- a/src/content/docs/linter/rules/no-dynamic-namespace-import-access.mdx +++ b/src/content/docs/linter/rules/no-dynamic-namespace-import-access.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-empty-block-statements.mdx b/src/content/docs/linter/rules/no-empty-block-statements.mdx index 5dae086f6..cdb4fd652 100644 --- a/src/content/docs/linter/rules/no-empty-block-statements.mdx +++ b/src/content/docs/linter/rules/no-empty-block-statements.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.0` + Sources: - Same as: no-empty - Same as: no-empty-static-block diff --git a/src/content/docs/linter/rules/no-empty-block.mdx b/src/content/docs/linter/rules/no-empty-block.mdx index 4a18bc1a3..cc56a259e 100644 --- a/src/content/docs/linter/rules/no-empty-block.mdx +++ b/src/content/docs/linter/rules/no-empty-block.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-empty-character-class-in-regex.mdx b/src/content/docs/linter/rules/no-empty-character-class-in-regex.mdx index 892f36214..f26ed0265 100644 --- a/src/content/docs/linter/rules/no-empty-character-class-in-regex.mdx +++ b/src/content/docs/linter/rules/no-empty-character-class-in-regex.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-empty-interface.mdx b/src/content/docs/linter/rules/no-empty-interface.mdx index 4dd6ffc4a..04d0f67ac 100644 --- a/src/content/docs/linter/rules/no-empty-interface.mdx +++ b/src/content/docs/linter/rules/no-empty-interface.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-empty-pattern.mdx b/src/content/docs/linter/rules/no-empty-pattern.mdx index 68791b4a4..a4147a2f9 100644 --- a/src/content/docs/linter/rules/no-empty-pattern.mdx +++ b/src/content/docs/linter/rules/no-empty-pattern.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-empty-type-parameters.mdx b/src/content/docs/linter/rules/no-empty-type-parameters.mdx index f6847c885..3db45deaf 100644 --- a/src/content/docs/linter/rules/no-empty-type-parameters.mdx +++ b/src/content/docs/linter/rules/no-empty-type-parameters.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-enum.mdx b/src/content/docs/linter/rules/no-enum.mdx index 44732e941..96de14a78 100644 --- a/src/content/docs/linter/rules/no-enum.mdx +++ b/src/content/docs/linter/rules/no-enum.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-evolving-types.mdx b/src/content/docs/linter/rules/no-evolving-types.mdx index b85ca76fa..4eba163d3 100644 --- a/src/content/docs/linter/rules/no-evolving-types.mdx +++ b/src/content/docs/linter/rules/no-evolving-types.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.3` + Disallow variables from evolving into `any` type through reassignments. In TypeScript, variables without explicit type annotations can evolve their types based on subsequent assignments. diff --git a/src/content/docs/linter/rules/no-excessive-cognitive-complexity.mdx b/src/content/docs/linter/rules/no-excessive-cognitive-complexity.mdx index 90c9b3c41..63ee818a5 100644 --- a/src/content/docs/linter/rules/no-excessive-cognitive-complexity.mdx +++ b/src/content/docs/linter/rules/no-excessive-cognitive-complexity.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + Sources: - Same as: sonarjs/cognitive-complexity diff --git a/src/content/docs/linter/rules/no-excessive-nested-test-suites.mdx b/src/content/docs/linter/rules/no-excessive-nested-test-suites.mdx index fbcfcab75..c38e43b4f 100644 --- a/src/content/docs/linter/rules/no-excessive-nested-test-suites.mdx +++ b/src/content/docs/linter/rules/no-excessive-nested-test-suites.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-explicit-any.mdx b/src/content/docs/linter/rules/no-explicit-any.mdx index 854552320..f9be7edb0 100644 --- a/src/content/docs/linter/rules/no-explicit-any.mdx +++ b/src/content/docs/linter/rules/no-explicit-any.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-exported-imports.mdx b/src/content/docs/linter/rules/no-exported-imports.mdx index 5d6c0efec..1b2df4433 100644 --- a/src/content/docs/linter/rules/no-exported-imports.mdx +++ b/src/content/docs/linter/rules/no-exported-imports.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-exports-in-test.mdx b/src/content/docs/linter/rules/no-exports-in-test.mdx index bd2ffabc8..0e05fb398 100644 --- a/src/content/docs/linter/rules/no-exports-in-test.mdx +++ b/src/content/docs/linter/rules/no-exports-in-test.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-extra-boolean-cast.mdx b/src/content/docs/linter/rules/no-extra-boolean-cast.mdx index 364f59b79..c333b2fa2 100644 --- a/src/content/docs/linter/rules/no-extra-boolean-cast.mdx +++ b/src/content/docs/linter/rules/no-extra-boolean-cast.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-extra-non-null-assertion.mdx b/src/content/docs/linter/rules/no-extra-non-null-assertion.mdx index d6c48a505..9d5aae421 100644 --- a/src/content/docs/linter/rules/no-extra-non-null-assertion.mdx +++ b/src/content/docs/linter/rules/no-extra-non-null-assertion.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-fallthrough-switch-clause.mdx b/src/content/docs/linter/rules/no-fallthrough-switch-clause.mdx index caa78a04d..f04296511 100644 --- a/src/content/docs/linter/rules/no-fallthrough-switch-clause.mdx +++ b/src/content/docs/linter/rules/no-fallthrough-switch-clause.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-flat-map-identity.mdx b/src/content/docs/linter/rules/no-flat-map-identity.mdx index ef21375dc..798e93272 100644 --- a/src/content/docs/linter/rules/no-flat-map-identity.mdx +++ b/src/content/docs/linter/rules/no-flat-map-identity.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.7.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-focused-tests.mdx b/src/content/docs/linter/rules/no-focused-tests.mdx index ce17b1fa8..2b3c10c02 100644 --- a/src/content/docs/linter/rules/no-focused-tests.mdx +++ b/src/content/docs/linter/rules/no-focused-tests.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-for-each.mdx b/src/content/docs/linter/rules/no-for-each.mdx index 32a08e813..2aa18b570 100644 --- a/src/content/docs/linter/rules/no-for-each.mdx +++ b/src/content/docs/linter/rules/no-for-each.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-function-assign.mdx b/src/content/docs/linter/rules/no-function-assign.mdx index bd6f9a7d2..41a5f7e6d 100644 --- a/src/content/docs/linter/rules/no-function-assign.mdx +++ b/src/content/docs/linter/rules/no-function-assign.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-global-assign.mdx b/src/content/docs/linter/rules/no-global-assign.mdx index 183aa8798..a747ea610 100644 --- a/src/content/docs/linter/rules/no-global-assign.mdx +++ b/src/content/docs/linter/rules/no-global-assign.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-global-eval.mdx b/src/content/docs/linter/rules/no-global-eval.mdx index bc75be381..5e0cdc2d6 100644 --- a/src/content/docs/linter/rules/no-global-eval.mdx +++ b/src/content/docs/linter/rules/no-global-eval.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-global-is-finite.mdx b/src/content/docs/linter/rules/no-global-is-finite.mdx index 0f91b1b74..2ba738deb 100644 --- a/src/content/docs/linter/rules/no-global-is-finite.mdx +++ b/src/content/docs/linter/rules/no-global-is-finite.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-global-is-nan.mdx b/src/content/docs/linter/rules/no-global-is-nan.mdx index c63006a95..00f13b01f 100644 --- a/src/content/docs/linter/rules/no-global-is-nan.mdx +++ b/src/content/docs/linter/rules/no-global-is-nan.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-global-object-calls.mdx b/src/content/docs/linter/rules/no-global-object-calls.mdx index 82011d28b..d044225a2 100644 --- a/src/content/docs/linter/rules/no-global-object-calls.mdx +++ b/src/content/docs/linter/rules/no-global-object-calls.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-head-element.mdx b/src/content/docs/linter/rules/no-head-element.mdx index c871ebf62..8bf7276ef 100644 --- a/src/content/docs/linter/rules/no-head-element.mdx +++ b/src/content/docs/linter/rules/no-head-element.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.4` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-head-import-in-document.mdx b/src/content/docs/linter/rules/no-head-import-in-document.mdx index ef478f39f..da7689589 100644 --- a/src/content/docs/linter/rules/no-head-import-in-document.mdx +++ b/src/content/docs/linter/rules/no-head-import-in-document.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.4` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-header-scope.mdx b/src/content/docs/linter/rules/no-header-scope.mdx index e4d4e3938..1364b7e1b 100644 --- a/src/content/docs/linter/rules/no-header-scope.mdx +++ b/src/content/docs/linter/rules/no-header-scope.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-img-element.mdx b/src/content/docs/linter/rules/no-img-element.mdx index 72135281b..4ef1b6c50 100644 --- a/src/content/docs/linter/rules/no-img-element.mdx +++ b/src/content/docs/linter/rules/no-img-element.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.4` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-implicit-any-let.mdx b/src/content/docs/linter/rules/no-implicit-any-let.mdx index 0946fb76b..3ff2c7edf 100644 --- a/src/content/docs/linter/rules/no-implicit-any-let.mdx +++ b/src/content/docs/linter/rules/no-implicit-any-let.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.4.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-implicit-boolean.mdx b/src/content/docs/linter/rules/no-implicit-boolean.mdx index d09760d50..e155c0af1 100644 --- a/src/content/docs/linter/rules/no-implicit-boolean.mdx +++ b/src/content/docs/linter/rules/no-implicit-boolean.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/no-import-assign.mdx b/src/content/docs/linter/rules/no-import-assign.mdx index db52ea07b..8e7bdb5f0 100644 --- a/src/content/docs/linter/rules/no-import-assign.mdx +++ b/src/content/docs/linter/rules/no-import-assign.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-important-in-keyframe.mdx b/src/content/docs/linter/rules/no-important-in-keyframe.mdx index 38982a0f9..7f21781ba 100644 --- a/src/content/docs/linter/rules/no-important-in-keyframe.mdx +++ b/src/content/docs/linter/rules/no-important-in-keyframe.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-inferrable-types.mdx b/src/content/docs/linter/rules/no-inferrable-types.mdx index d92a7d42c..42b7e800d 100644 --- a/src/content/docs/linter/rules/no-inferrable-types.mdx +++ b/src/content/docs/linter/rules/no-inferrable-types.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-inner-declarations.mdx b/src/content/docs/linter/rules/no-inner-declarations.mdx index 89691d3ed..b3e3e4ee8 100644 --- a/src/content/docs/linter/rules/no-inner-declarations.mdx +++ b/src/content/docs/linter/rules/no-inner-declarations.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-interactive-element-to-noninteractive-role.mdx b/src/content/docs/linter/rules/no-interactive-element-to-noninteractive-role.mdx index 04eaa3951..3d916976a 100644 --- a/src/content/docs/linter/rules/no-interactive-element-to-noninteractive-role.mdx +++ b/src/content/docs/linter/rules/no-interactive-element-to-noninteractive-role.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-invalid-builtin-instantiation.mdx b/src/content/docs/linter/rules/no-invalid-builtin-instantiation.mdx index 0e9626187..c1f35a6a1 100644 --- a/src/content/docs/linter/rules/no-invalid-builtin-instantiation.mdx +++ b/src/content/docs/linter/rules/no-invalid-builtin-instantiation.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.7.2` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-invalid-constructor-super.mdx b/src/content/docs/linter/rules/no-invalid-constructor-super.mdx index b80fb56aa..998920602 100644 --- a/src/content/docs/linter/rules/no-invalid-constructor-super.mdx +++ b/src/content/docs/linter/rules/no-invalid-constructor-super.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-invalid-direction-in-linear-gradient.mdx b/src/content/docs/linter/rules/no-invalid-direction-in-linear-gradient.mdx index c5a3d8f1e..9c8623860 100644 --- a/src/content/docs/linter/rules/no-invalid-direction-in-linear-gradient.mdx +++ b/src/content/docs/linter/rules/no-invalid-direction-in-linear-gradient.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.9` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-invalid-grid-areas.mdx b/src/content/docs/linter/rules/no-invalid-grid-areas.mdx index dd1e709bb..b96271344 100644 --- a/src/content/docs/linter/rules/no-invalid-grid-areas.mdx +++ b/src/content/docs/linter/rules/no-invalid-grid-areas.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.9` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-invalid-new-builtin.mdx b/src/content/docs/linter/rules/no-invalid-new-builtin.mdx index 8edc1a3b1..965ff329b 100644 --- a/src/content/docs/linter/rules/no-invalid-new-builtin.mdx +++ b/src/content/docs/linter/rules/no-invalid-new-builtin.mdx @@ -16,6 +16,7 @@ This rule is deprecated and will be removed in the next major release. **Reason**: Use the rule noInvalidBuiltinInstantiation instead. ::: **Since**: `v1.3.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/no-invalid-position-at-import-rule.mdx b/src/content/docs/linter/rules/no-invalid-position-at-import-rule.mdx index 5e870ecd3..a456124b1 100644 --- a/src/content/docs/linter/rules/no-invalid-position-at-import-rule.mdx +++ b/src/content/docs/linter/rules/no-invalid-position-at-import-rule.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-invalid-use-before-declaration.mdx b/src/content/docs/linter/rules/no-invalid-use-before-declaration.mdx index b49372037..acd813cb7 100644 --- a/src/content/docs/linter/rules/no-invalid-use-before-declaration.mdx +++ b/src/content/docs/linter/rules/no-invalid-use-before-declaration.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-irregular-whitespace.mdx b/src/content/docs/linter/rules/no-irregular-whitespace.mdx index c6f2c0c6f..41e34ca22 100644 --- a/src/content/docs/linter/rules/no-irregular-whitespace.mdx +++ b/src/content/docs/linter/rules/no-irregular-whitespace.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: @@ -58,6 +59,7 @@ const foo = ' '; **Since**: `v1.9.9` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-label-var.mdx b/src/content/docs/linter/rules/no-label-var.mdx index 08bc2d306..83c211358 100644 --- a/src/content/docs/linter/rules/no-label-var.mdx +++ b/src/content/docs/linter/rules/no-label-var.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-label-without-control.mdx b/src/content/docs/linter/rules/no-label-without-control.mdx index c29788059..0abf3f676 100644 --- a/src/content/docs/linter/rules/no-label-without-control.mdx +++ b/src/content/docs/linter/rules/no-label-without-control.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-misleading-character-class.mdx b/src/content/docs/linter/rules/no-misleading-character-class.mdx index 8815aa310..cf3616b67 100644 --- a/src/content/docs/linter/rules/no-misleading-character-class.mdx +++ b/src/content/docs/linter/rules/no-misleading-character-class.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-misleading-instantiator.mdx b/src/content/docs/linter/rules/no-misleading-instantiator.mdx index c12a357fa..86050829c 100644 --- a/src/content/docs/linter/rules/no-misleading-instantiator.mdx +++ b/src/content/docs/linter/rules/no-misleading-instantiator.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-misplaced-assertion.mdx b/src/content/docs/linter/rules/no-misplaced-assertion.mdx index 0dcfe23d2..76e089968 100644 --- a/src/content/docs/linter/rules/no-misplaced-assertion.mdx +++ b/src/content/docs/linter/rules/no-misplaced-assertion.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + Sources: - Inspired from: jest/no-standalone-expect diff --git a/src/content/docs/linter/rules/no-misrefactored-shorthand-assign.mdx b/src/content/docs/linter/rules/no-misrefactored-shorthand-assign.mdx index 03685e424..2960989d4 100644 --- a/src/content/docs/linter/rules/no-misrefactored-shorthand-assign.mdx +++ b/src/content/docs/linter/rules/no-misrefactored-shorthand-assign.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-missing-var-function.mdx b/src/content/docs/linter/rules/no-missing-var-function.mdx index ed85b6d43..3425d1aa9 100644 --- a/src/content/docs/linter/rules/no-missing-var-function.mdx +++ b/src/content/docs/linter/rules/no-missing-var-function.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.2` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-multiple-spaces-in-regular-expression-literals.mdx b/src/content/docs/linter/rules/no-multiple-spaces-in-regular-expression-literals.mdx index 69e0caa0e..c0232ba61 100644 --- a/src/content/docs/linter/rules/no-multiple-spaces-in-regular-expression-literals.mdx +++ b/src/content/docs/linter/rules/no-multiple-spaces-in-regular-expression-literals.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-namespace-import.mdx b/src/content/docs/linter/rules/no-namespace-import.mdx index 3ddce10c8..4eb9d1bb6 100644 --- a/src/content/docs/linter/rules/no-namespace-import.mdx +++ b/src/content/docs/linter/rules/no-namespace-import.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + Sources: - Same as: barrel-files/avoid-namespace-import diff --git a/src/content/docs/linter/rules/no-namespace.mdx b/src/content/docs/linter/rules/no-namespace.mdx index ee3bdfbc6..100053e83 100644 --- a/src/content/docs/linter/rules/no-namespace.mdx +++ b/src/content/docs/linter/rules/no-namespace.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + Sources: - Same as: @typescript-eslint/no-namespace diff --git a/src/content/docs/linter/rules/no-negation-else.mdx b/src/content/docs/linter/rules/no-negation-else.mdx index 2051cc4fc..d3214102f 100644 --- a/src/content/docs/linter/rules/no-negation-else.mdx +++ b/src/content/docs/linter/rules/no-negation-else.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/no-nested-ternary.mdx b/src/content/docs/linter/rules/no-nested-ternary.mdx index 3cc6d3c10..4ba9a5629 100644 --- a/src/content/docs/linter/rules/no-nested-ternary.mdx +++ b/src/content/docs/linter/rules/no-nested-ternary.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.3` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-new-symbol.mdx b/src/content/docs/linter/rules/no-new-symbol.mdx index bb002fa7f..852d32f42 100644 --- a/src/content/docs/linter/rules/no-new-symbol.mdx +++ b/src/content/docs/linter/rules/no-new-symbol.mdx @@ -16,6 +16,7 @@ This rule is deprecated and will be removed in the next major release. **Reason**: Use `noInvalidNewBuiltin` instead. ::: **Since**: `v1.0.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/no-nodejs-modules.mdx b/src/content/docs/linter/rules/no-nodejs-modules.mdx index ff2b22859..f12095116 100644 --- a/src/content/docs/linter/rules/no-nodejs-modules.mdx +++ b/src/content/docs/linter/rules/no-nodejs-modules.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + Sources: - Same as: import/no-nodejs-modules diff --git a/src/content/docs/linter/rules/no-non-null-assertion.mdx b/src/content/docs/linter/rules/no-non-null-assertion.mdx index 763ce4dd2..3e76c01ac 100644 --- a/src/content/docs/linter/rules/no-non-null-assertion.mdx +++ b/src/content/docs/linter/rules/no-non-null-assertion.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-noninteractive-element-to-interactive-role.mdx b/src/content/docs/linter/rules/no-noninteractive-element-to-interactive-role.mdx index 34d69c603..4e5102df2 100644 --- a/src/content/docs/linter/rules/no-noninteractive-element-to-interactive-role.mdx +++ b/src/content/docs/linter/rules/no-noninteractive-element-to-interactive-role.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-noninteractive-tabindex.mdx b/src/content/docs/linter/rules/no-noninteractive-tabindex.mdx index c8ff0f739..2d7080e4b 100644 --- a/src/content/docs/linter/rules/no-noninteractive-tabindex.mdx +++ b/src/content/docs/linter/rules/no-noninteractive-tabindex.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-nonoctal-decimal-escape.mdx b/src/content/docs/linter/rules/no-nonoctal-decimal-escape.mdx index e38ecba9c..1ee2d4e32 100644 --- a/src/content/docs/linter/rules/no-nonoctal-decimal-escape.mdx +++ b/src/content/docs/linter/rules/no-nonoctal-decimal-escape.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-octal-escape.mdx b/src/content/docs/linter/rules/no-octal-escape.mdx index 856dc7711..942f053f7 100644 --- a/src/content/docs/linter/rules/no-octal-escape.mdx +++ b/src/content/docs/linter/rules/no-octal-escape.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.3` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-parameter-assign.mdx b/src/content/docs/linter/rules/no-parameter-assign.mdx index 1d3c5b5e7..17e13db46 100644 --- a/src/content/docs/linter/rules/no-parameter-assign.mdx +++ b/src/content/docs/linter/rules/no-parameter-assign.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-parameter-properties.mdx b/src/content/docs/linter/rules/no-parameter-properties.mdx index 915b19399..a9c628e78 100644 --- a/src/content/docs/linter/rules/no-parameter-properties.mdx +++ b/src/content/docs/linter/rules/no-parameter-properties.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + Sources: - Inspired from: @typescript-eslint/parameter-properties diff --git a/src/content/docs/linter/rules/no-positive-tabindex.mdx b/src/content/docs/linter/rules/no-positive-tabindex.mdx index 920d51622..318269d80 100644 --- a/src/content/docs/linter/rules/no-positive-tabindex.mdx +++ b/src/content/docs/linter/rules/no-positive-tabindex.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-precision-loss.mdx b/src/content/docs/linter/rules/no-precision-loss.mdx index fea9ba163..7ba4024d7 100644 --- a/src/content/docs/linter/rules/no-precision-loss.mdx +++ b/src/content/docs/linter/rules/no-precision-loss.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-process-env.mdx b/src/content/docs/linter/rules/no-process-env.mdx index 60418f667..fe09a5abb 100644 --- a/src/content/docs/linter/rules/no-process-env.mdx +++ b/src/content/docs/linter/rules/no-process-env.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.1` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-prototype-builtins.mdx b/src/content/docs/linter/rules/no-prototype-builtins.mdx index 72a3cb599..9cd05ae99 100644 --- a/src/content/docs/linter/rules/no-prototype-builtins.mdx +++ b/src/content/docs/linter/rules/no-prototype-builtins.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.1.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-re-export-all.mdx b/src/content/docs/linter/rules/no-re-export-all.mdx index b28aab832..154e2eddf 100644 --- a/src/content/docs/linter/rules/no-re-export-all.mdx +++ b/src/content/docs/linter/rules/no-re-export-all.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + Sources: - Same as: barrel-files/avoid-re-export-all diff --git a/src/content/docs/linter/rules/no-react-specific-props.mdx b/src/content/docs/linter/rules/no-react-specific-props.mdx index 3a80cbe99..1bc0be2d1 100644 --- a/src/content/docs/linter/rules/no-react-specific-props.mdx +++ b/src/content/docs/linter/rules/no-react-specific-props.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.7.2` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/no-redeclare.mdx b/src/content/docs/linter/rules/no-redeclare.mdx index ef9b07b40..402a049e6 100644 --- a/src/content/docs/linter/rules/no-redeclare.mdx +++ b/src/content/docs/linter/rules/no-redeclare.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-redundant-alt.mdx b/src/content/docs/linter/rules/no-redundant-alt.mdx index f68e5d4d0..98abc663b 100644 --- a/src/content/docs/linter/rules/no-redundant-alt.mdx +++ b/src/content/docs/linter/rules/no-redundant-alt.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-redundant-roles.mdx b/src/content/docs/linter/rules/no-redundant-roles.mdx index d59e3b0a6..e99ececd1 100644 --- a/src/content/docs/linter/rules/no-redundant-roles.mdx +++ b/src/content/docs/linter/rules/no-redundant-roles.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-redundant-use-strict.mdx b/src/content/docs/linter/rules/no-redundant-use-strict.mdx index e3f53d64c..91bc2ab54 100644 --- a/src/content/docs/linter/rules/no-redundant-use-strict.mdx +++ b/src/content/docs/linter/rules/no-redundant-use-strict.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-render-return-value.mdx b/src/content/docs/linter/rules/no-render-return-value.mdx index e02593f9e..9febf4a58 100644 --- a/src/content/docs/linter/rules/no-render-return-value.mdx +++ b/src/content/docs/linter/rules/no-render-return-value.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-restricted-globals.mdx b/src/content/docs/linter/rules/no-restricted-globals.mdx index 15ef6937f..0975341bc 100644 --- a/src/content/docs/linter/rules/no-restricted-globals.mdx +++ b/src/content/docs/linter/rules/no-restricted-globals.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + Sources: - Same as: no-restricted-globals diff --git a/src/content/docs/linter/rules/no-restricted-imports.mdx b/src/content/docs/linter/rules/no-restricted-imports.mdx index c118f2bd7..9d15b71c6 100644 --- a/src/content/docs/linter/rules/no-restricted-imports.mdx +++ b/src/content/docs/linter/rules/no-restricted-imports.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-restricted-types.mdx b/src/content/docs/linter/rules/no-restricted-types.mdx index 97be1a6f3..d8bd9b72e 100644 --- a/src/content/docs/linter/rules/no-restricted-types.mdx +++ b/src/content/docs/linter/rules/no-restricted-types.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/no-secrets.mdx b/src/content/docs/linter/rules/no-secrets.mdx index 4f639bf14..9b29878c3 100644 --- a/src/content/docs/linter/rules/no-secrets.mdx +++ b/src/content/docs/linter/rules/no-secrets.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-self-assign.mdx b/src/content/docs/linter/rules/no-self-assign.mdx index fb03a7c38..18973bb2e 100644 --- a/src/content/docs/linter/rules/no-self-assign.mdx +++ b/src/content/docs/linter/rules/no-self-assign.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-self-compare.mdx b/src/content/docs/linter/rules/no-self-compare.mdx index 63c6e466f..100dc3514 100644 --- a/src/content/docs/linter/rules/no-self-compare.mdx +++ b/src/content/docs/linter/rules/no-self-compare.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-setter-return.mdx b/src/content/docs/linter/rules/no-setter-return.mdx index 5713c2eea..69848fd43 100644 --- a/src/content/docs/linter/rules/no-setter-return.mdx +++ b/src/content/docs/linter/rules/no-setter-return.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-shadow-restricted-names.mdx b/src/content/docs/linter/rules/no-shadow-restricted-names.mdx index 2437160ac..f0e255a64 100644 --- a/src/content/docs/linter/rules/no-shadow-restricted-names.mdx +++ b/src/content/docs/linter/rules/no-shadow-restricted-names.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-shorthand-property-overrides.mdx b/src/content/docs/linter/rules/no-shorthand-property-overrides.mdx index fcd0332c8..a8dcd5df3 100644 --- a/src/content/docs/linter/rules/no-shorthand-property-overrides.mdx +++ b/src/content/docs/linter/rules/no-shorthand-property-overrides.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.2` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-shouty-constants.mdx b/src/content/docs/linter/rules/no-shouty-constants.mdx index f7a44c934..9284d19e2 100644 --- a/src/content/docs/linter/rules/no-shouty-constants.mdx +++ b/src/content/docs/linter/rules/no-shouty-constants.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/no-skipped-tests.mdx b/src/content/docs/linter/rules/no-skipped-tests.mdx index 64458d79c..5275abb67 100644 --- a/src/content/docs/linter/rules/no-skipped-tests.mdx +++ b/src/content/docs/linter/rules/no-skipped-tests.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/no-sparse-array.mdx b/src/content/docs/linter/rules/no-sparse-array.mdx index c68ca734a..f285253ed 100644 --- a/src/content/docs/linter/rules/no-sparse-array.mdx +++ b/src/content/docs/linter/rules/no-sparse-array.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-static-element-interactions.mdx b/src/content/docs/linter/rules/no-static-element-interactions.mdx index cf6357645..fb371de4d 100644 --- a/src/content/docs/linter/rules/no-static-element-interactions.mdx +++ b/src/content/docs/linter/rules/no-static-element-interactions.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-static-only-class.mdx b/src/content/docs/linter/rules/no-static-only-class.mdx index ee8cacf4c..affb6252f 100644 --- a/src/content/docs/linter/rules/no-static-only-class.mdx +++ b/src/content/docs/linter/rules/no-static-only-class.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-string-case-mismatch.mdx b/src/content/docs/linter/rules/no-string-case-mismatch.mdx index 6743915d7..ea3c7e5f9 100644 --- a/src/content/docs/linter/rules/no-string-case-mismatch.mdx +++ b/src/content/docs/linter/rules/no-string-case-mismatch.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-substr.mdx b/src/content/docs/linter/rules/no-substr.mdx index c07c52075..a316bceb5 100644 --- a/src/content/docs/linter/rules/no-substr.mdx +++ b/src/content/docs/linter/rules/no-substr.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.2` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/no-suspicious-semicolon-in-jsx.mdx b/src/content/docs/linter/rules/no-suspicious-semicolon-in-jsx.mdx index 1d19c0301..3fa680a27 100644 --- a/src/content/docs/linter/rules/no-suspicious-semicolon-in-jsx.mdx +++ b/src/content/docs/linter/rules/no-suspicious-semicolon-in-jsx.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-svg-without-title.mdx b/src/content/docs/linter/rules/no-svg-without-title.mdx index 9db1c8f29..74fca23c8 100644 --- a/src/content/docs/linter/rules/no-svg-without-title.mdx +++ b/src/content/docs/linter/rules/no-svg-without-title.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-switch-declarations.mdx b/src/content/docs/linter/rules/no-switch-declarations.mdx index 8a160c071..1ebc956bc 100644 --- a/src/content/docs/linter/rules/no-switch-declarations.mdx +++ b/src/content/docs/linter/rules/no-switch-declarations.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-template-curly-in-string.mdx b/src/content/docs/linter/rules/no-template-curly-in-string.mdx index 491e1188f..0d4d130e6 100644 --- a/src/content/docs/linter/rules/no-template-curly-in-string.mdx +++ b/src/content/docs/linter/rules/no-template-curly-in-string.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.3` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-then-property.mdx b/src/content/docs/linter/rules/no-then-property.mdx index c98e89798..b289e44f4 100644 --- a/src/content/docs/linter/rules/no-then-property.mdx +++ b/src/content/docs/linter/rules/no-then-property.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-this-in-static.mdx b/src/content/docs/linter/rules/no-this-in-static.mdx index daad5fa2a..ec5f98e7d 100644 --- a/src/content/docs/linter/rules/no-this-in-static.mdx +++ b/src/content/docs/linter/rules/no-this-in-static.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.1` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-undeclared-dependencies.mdx b/src/content/docs/linter/rules/no-undeclared-dependencies.mdx index a71b021f0..377dfea56 100644 --- a/src/content/docs/linter/rules/no-undeclared-dependencies.mdx +++ b/src/content/docs/linter/rules/no-undeclared-dependencies.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + Disallow the use of dependencies that aren't specified in the `package.json`. Indirect dependencies will trigger the rule because they aren't declared in the `package.json`. diff --git a/src/content/docs/linter/rules/no-undeclared-variables.mdx b/src/content/docs/linter/rules/no-undeclared-variables.mdx index 2429720e2..0ee2a9da2 100644 --- a/src/content/docs/linter/rules/no-undeclared-variables.mdx +++ b/src/content/docs/linter/rules/no-undeclared-variables.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + Sources: - Same as: no-undef diff --git a/src/content/docs/linter/rules/no-unknown-function.mdx b/src/content/docs/linter/rules/no-unknown-function.mdx index 4d3003509..0250c4063 100644 --- a/src/content/docs/linter/rules/no-unknown-function.mdx +++ b/src/content/docs/linter/rules/no-unknown-function.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-unknown-media-feature-name.mdx b/src/content/docs/linter/rules/no-unknown-media-feature-name.mdx index af4c2a179..9dd15ac85 100644 --- a/src/content/docs/linter/rules/no-unknown-media-feature-name.mdx +++ b/src/content/docs/linter/rules/no-unknown-media-feature-name.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-unknown-property.mdx b/src/content/docs/linter/rules/no-unknown-property.mdx index d6e11b67d..39b9fb5e0 100644 --- a/src/content/docs/linter/rules/no-unknown-property.mdx +++ b/src/content/docs/linter/rules/no-unknown-property.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-unknown-pseudo-class.mdx b/src/content/docs/linter/rules/no-unknown-pseudo-class.mdx index ebdc46701..0f3fe3725 100644 --- a/src/content/docs/linter/rules/no-unknown-pseudo-class.mdx +++ b/src/content/docs/linter/rules/no-unknown-pseudo-class.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-unknown-pseudo-element.mdx b/src/content/docs/linter/rules/no-unknown-pseudo-element.mdx index ddd471c89..38304ed8c 100644 --- a/src/content/docs/linter/rules/no-unknown-pseudo-element.mdx +++ b/src/content/docs/linter/rules/no-unknown-pseudo-element.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-unknown-type-selector.mdx b/src/content/docs/linter/rules/no-unknown-type-selector.mdx index c92f94c38..58242962f 100644 --- a/src/content/docs/linter/rules/no-unknown-type-selector.mdx +++ b/src/content/docs/linter/rules/no-unknown-type-selector.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.4` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-unknown-unit.mdx b/src/content/docs/linter/rules/no-unknown-unit.mdx index 26314019c..668501438 100644 --- a/src/content/docs/linter/rules/no-unknown-unit.mdx +++ b/src/content/docs/linter/rules/no-unknown-unit.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-unmatchable-anb-selector.mdx b/src/content/docs/linter/rules/no-unmatchable-anb-selector.mdx index 25707aff0..1c8c3a38c 100644 --- a/src/content/docs/linter/rules/no-unmatchable-anb-selector.mdx +++ b/src/content/docs/linter/rules/no-unmatchable-anb-selector.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-unnecessary-continue.mdx b/src/content/docs/linter/rules/no-unnecessary-continue.mdx index 69250945f..f45db6840 100644 --- a/src/content/docs/linter/rules/no-unnecessary-continue.mdx +++ b/src/content/docs/linter/rules/no-unnecessary-continue.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-unreachable-super.mdx b/src/content/docs/linter/rules/no-unreachable-super.mdx index d2532dbbe..02e1306b8 100644 --- a/src/content/docs/linter/rules/no-unreachable-super.mdx +++ b/src/content/docs/linter/rules/no-unreachable-super.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-unreachable.mdx b/src/content/docs/linter/rules/no-unreachable.mdx index 2ddbb307f..143394a4e 100644 --- a/src/content/docs/linter/rules/no-unreachable.mdx +++ b/src/content/docs/linter/rules/no-unreachable.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-unsafe-declaration-merging.mdx b/src/content/docs/linter/rules/no-unsafe-declaration-merging.mdx index 75dbff6f9..549b4195a 100644 --- a/src/content/docs/linter/rules/no-unsafe-declaration-merging.mdx +++ b/src/content/docs/linter/rules/no-unsafe-declaration-merging.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-unsafe-finally.mdx b/src/content/docs/linter/rules/no-unsafe-finally.mdx index 5782dd40d..8b753954f 100644 --- a/src/content/docs/linter/rules/no-unsafe-finally.mdx +++ b/src/content/docs/linter/rules/no-unsafe-finally.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-unsafe-negation.mdx b/src/content/docs/linter/rules/no-unsafe-negation.mdx index d753db16b..59121424e 100644 --- a/src/content/docs/linter/rules/no-unsafe-negation.mdx +++ b/src/content/docs/linter/rules/no-unsafe-negation.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-unsafe-optional-chaining.mdx b/src/content/docs/linter/rules/no-unsafe-optional-chaining.mdx index 9d453e3b7..db9a0b192 100644 --- a/src/content/docs/linter/rules/no-unsafe-optional-chaining.mdx +++ b/src/content/docs/linter/rules/no-unsafe-optional-chaining.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-unused-function-parameters.mdx b/src/content/docs/linter/rules/no-unused-function-parameters.mdx index f71617183..02d019f76 100644 --- a/src/content/docs/linter/rules/no-unused-function-parameters.mdx +++ b/src/content/docs/linter/rules/no-unused-function-parameters.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/no-unused-imports.mdx b/src/content/docs/linter/rules/no-unused-imports.mdx index 5845c4e30..0128c36e5 100644 --- a/src/content/docs/linter/rules/no-unused-imports.mdx +++ b/src/content/docs/linter/rules/no-unused-imports.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.0` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/no-unused-labels.mdx b/src/content/docs/linter/rules/no-unused-labels.mdx index 51582ffa8..755443746 100644 --- a/src/content/docs/linter/rules/no-unused-labels.mdx +++ b/src/content/docs/linter/rules/no-unused-labels.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-unused-private-class-members.mdx b/src/content/docs/linter/rules/no-unused-private-class-members.mdx index cba3173e5..e97e847a1 100644 --- a/src/content/docs/linter/rules/no-unused-private-class-members.mdx +++ b/src/content/docs/linter/rules/no-unused-private-class-members.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.3` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/no-unused-template-literal.mdx b/src/content/docs/linter/rules/no-unused-template-literal.mdx index 10939d895..40b38f160 100644 --- a/src/content/docs/linter/rules/no-unused-template-literal.mdx +++ b/src/content/docs/linter/rules/no-unused-template-literal.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-unused-variables.mdx b/src/content/docs/linter/rules/no-unused-variables.mdx index 5fc445719..1b45c074b 100644 --- a/src/content/docs/linter/rules/no-unused-variables.mdx +++ b/src/content/docs/linter/rules/no-unused-variables.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/no-useless-catch.mdx b/src/content/docs/linter/rules/no-useless-catch.mdx index 25a04d2fc..ecb0d55d4 100644 --- a/src/content/docs/linter/rules/no-useless-catch.mdx +++ b/src/content/docs/linter/rules/no-useless-catch.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-useless-constructor.mdx b/src/content/docs/linter/rules/no-useless-constructor.mdx index 2dd10e986..bb8b8f07c 100644 --- a/src/content/docs/linter/rules/no-useless-constructor.mdx +++ b/src/content/docs/linter/rules/no-useless-constructor.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-useless-else.mdx b/src/content/docs/linter/rules/no-useless-else.mdx index 7c39b1369..487d85f87 100644 --- a/src/content/docs/linter/rules/no-useless-else.mdx +++ b/src/content/docs/linter/rules/no-useless-else.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-useless-empty-export.mdx b/src/content/docs/linter/rules/no-useless-empty-export.mdx index d4c547ba2..2720ab343 100644 --- a/src/content/docs/linter/rules/no-useless-empty-export.mdx +++ b/src/content/docs/linter/rules/no-useless-empty-export.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-useless-escape-in-regex.mdx b/src/content/docs/linter/rules/no-useless-escape-in-regex.mdx index 804ba707d..b80db187f 100644 --- a/src/content/docs/linter/rules/no-useless-escape-in-regex.mdx +++ b/src/content/docs/linter/rules/no-useless-escape-in-regex.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/no-useless-fragments.mdx b/src/content/docs/linter/rules/no-useless-fragments.mdx index f4862192e..234042389 100644 --- a/src/content/docs/linter/rules/no-useless-fragments.mdx +++ b/src/content/docs/linter/rules/no-useless-fragments.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-useless-label.mdx b/src/content/docs/linter/rules/no-useless-label.mdx index 1c9e11b05..8202d2c89 100644 --- a/src/content/docs/linter/rules/no-useless-label.mdx +++ b/src/content/docs/linter/rules/no-useless-label.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-useless-lone-block-statements.mdx b/src/content/docs/linter/rules/no-useless-lone-block-statements.mdx index 6e18411ec..dcaf492f5 100644 --- a/src/content/docs/linter/rules/no-useless-lone-block-statements.mdx +++ b/src/content/docs/linter/rules/no-useless-lone-block-statements.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.3` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-useless-rename.mdx b/src/content/docs/linter/rules/no-useless-rename.mdx index fe43df4dc..0c9ef85ae 100644 --- a/src/content/docs/linter/rules/no-useless-rename.mdx +++ b/src/content/docs/linter/rules/no-useless-rename.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-useless-string-concat.mdx b/src/content/docs/linter/rules/no-useless-string-concat.mdx index 54e13598c..da6959078 100644 --- a/src/content/docs/linter/rules/no-useless-string-concat.mdx +++ b/src/content/docs/linter/rules/no-useless-string-concat.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/no-useless-string-raw.mdx b/src/content/docs/linter/rules/no-useless-string-raw.mdx index e418bac6f..627aa2c06 100644 --- a/src/content/docs/linter/rules/no-useless-string-raw.mdx +++ b/src/content/docs/linter/rules/no-useless-string-raw.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.4` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-useless-switch-case.mdx b/src/content/docs/linter/rules/no-useless-switch-case.mdx index a32c90cb5..8e43e7c15 100644 --- a/src/content/docs/linter/rules/no-useless-switch-case.mdx +++ b/src/content/docs/linter/rules/no-useless-switch-case.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-useless-ternary.mdx b/src/content/docs/linter/rules/no-useless-ternary.mdx index 6e844f3d2..f85d0de4f 100644 --- a/src/content/docs/linter/rules/no-useless-ternary.mdx +++ b/src/content/docs/linter/rules/no-useless-ternary.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-useless-this-alias.mdx b/src/content/docs/linter/rules/no-useless-this-alias.mdx index eaeb1fbeb..bcf84ea8b 100644 --- a/src/content/docs/linter/rules/no-useless-this-alias.mdx +++ b/src/content/docs/linter/rules/no-useless-this-alias.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-useless-type-constraint.mdx b/src/content/docs/linter/rules/no-useless-type-constraint.mdx index 02dd7d3dd..98c233e62 100644 --- a/src/content/docs/linter/rules/no-useless-type-constraint.mdx +++ b/src/content/docs/linter/rules/no-useless-type-constraint.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/no-useless-undefined-initialization.mdx b/src/content/docs/linter/rules/no-useless-undefined-initialization.mdx index d62496ffe..db1f7cdb6 100644 --- a/src/content/docs/linter/rules/no-useless-undefined-initialization.mdx +++ b/src/content/docs/linter/rules/no-useless-undefined-initialization.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.7.2` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/no-useless-undefined.mdx b/src/content/docs/linter/rules/no-useless-undefined.mdx index 87b30eeaf..1a85f58f0 100644 --- a/src/content/docs/linter/rules/no-useless-undefined.mdx +++ b/src/content/docs/linter/rules/no-useless-undefined.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `vnext` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/no-value-at-rule.mdx b/src/content/docs/linter/rules/no-value-at-rule.mdx index fbe1c65d5..5f687bca6 100644 --- a/src/content/docs/linter/rules/no-value-at-rule.mdx +++ b/src/content/docs/linter/rules/no-value-at-rule.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/no-var.mdx b/src/content/docs/linter/rules/no-var.mdx index 0f4317d4b..011088705 100644 --- a/src/content/docs/linter/rules/no-var.mdx +++ b/src/content/docs/linter/rules/no-var.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-void-elements-with-children.mdx b/src/content/docs/linter/rules/no-void-elements-with-children.mdx index 60c14ed1a..f036363ae 100644 --- a/src/content/docs/linter/rules/no-void-elements-with-children.mdx +++ b/src/content/docs/linter/rules/no-void-elements-with-children.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/no-void-type-return.mdx b/src/content/docs/linter/rules/no-void-type-return.mdx index b6aa813e0..7ceb78d24 100644 --- a/src/content/docs/linter/rules/no-void-type-return.mdx +++ b/src/content/docs/linter/rules/no-void-type-return.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-void.mdx b/src/content/docs/linter/rules/no-void.mdx index 3f860ebd8..4552e172a 100644 --- a/src/content/docs/linter/rules/no-void.mdx +++ b/src/content/docs/linter/rules/no-void.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + Sources: - Same as: no-void diff --git a/src/content/docs/linter/rules/no-with.mdx b/src/content/docs/linter/rules/no-with.mdx index abcb91c5e..cc7b3e627 100644 --- a/src/content/docs/linter/rules/no-with.mdx +++ b/src/content/docs/linter/rules/no-with.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/no-yoda-expression.mdx b/src/content/docs/linter/rules/no-yoda-expression.mdx index 4419d888d..a786c42a4 100644 --- a/src/content/docs/linter/rules/no-yoda-expression.mdx +++ b/src/content/docs/linter/rules/no-yoda-expression.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/use-adjacent-overload-signatures.mdx b/src/content/docs/linter/rules/use-adjacent-overload-signatures.mdx index b0c679a87..11fdeb584 100644 --- a/src/content/docs/linter/rules/use-adjacent-overload-signatures.mdx +++ b/src/content/docs/linter/rules/use-adjacent-overload-signatures.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/use-alt-text.mdx b/src/content/docs/linter/rules/use-alt-text.mdx index cacfaeb10..d31a08574 100644 --- a/src/content/docs/linter/rules/use-alt-text.mdx +++ b/src/content/docs/linter/rules/use-alt-text.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-anchor-content.mdx b/src/content/docs/linter/rules/use-anchor-content.mdx index 90e565812..695a006cc 100644 --- a/src/content/docs/linter/rules/use-anchor-content.mdx +++ b/src/content/docs/linter/rules/use-anchor-content.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-aria-activedescendant-with-tabindex.mdx b/src/content/docs/linter/rules/use-aria-activedescendant-with-tabindex.mdx index c4fd57a16..68f6ee82c 100644 --- a/src/content/docs/linter/rules/use-aria-activedescendant-with-tabindex.mdx +++ b/src/content/docs/linter/rules/use-aria-activedescendant-with-tabindex.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-aria-props-for-role.mdx b/src/content/docs/linter/rules/use-aria-props-for-role.mdx index e91976075..a19947e80 100644 --- a/src/content/docs/linter/rules/use-aria-props-for-role.mdx +++ b/src/content/docs/linter/rules/use-aria-props-for-role.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-aria-props-supported-by-role.mdx b/src/content/docs/linter/rules/use-aria-props-supported-by-role.mdx index e55047ecc..57fcb6e40 100644 --- a/src/content/docs/linter/rules/use-aria-props-supported-by-role.mdx +++ b/src/content/docs/linter/rules/use-aria-props-supported-by-role.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/use-array-literals.mdx b/src/content/docs/linter/rules/use-array-literals.mdx index c7d65b14d..8be785226 100644 --- a/src/content/docs/linter/rules/use-array-literals.mdx +++ b/src/content/docs/linter/rules/use-array-literals.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.7.2` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-arrow-function.mdx b/src/content/docs/linter/rules/use-arrow-function.mdx index aebe5ab70..7bcf95c23 100644 --- a/src/content/docs/linter/rules/use-arrow-function.mdx +++ b/src/content/docs/linter/rules/use-arrow-function.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-as-const-assertion.mdx b/src/content/docs/linter/rules/use-as-const-assertion.mdx index 4ba00f1dc..f3aa3f45b 100644 --- a/src/content/docs/linter/rules/use-as-const-assertion.mdx +++ b/src/content/docs/linter/rules/use-as-const-assertion.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-at-index.mdx b/src/content/docs/linter/rules/use-at-index.mdx index e882db5b2..7ebfa58ac 100644 --- a/src/content/docs/linter/rules/use-at-index.mdx +++ b/src/content/docs/linter/rules/use-at-index.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.4` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-await.mdx b/src/content/docs/linter/rules/use-await.mdx index 2f923d8d5..fdf04811d 100644 --- a/src/content/docs/linter/rules/use-await.mdx +++ b/src/content/docs/linter/rules/use-await.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.4.0` + Sources: - Same as: require-await - Same as: @typescript-eslint/require-await diff --git a/src/content/docs/linter/rules/use-block-statements.mdx b/src/content/docs/linter/rules/use-block-statements.mdx index 06a8df97f..e52305d80 100644 --- a/src/content/docs/linter/rules/use-block-statements.mdx +++ b/src/content/docs/linter/rules/use-block-statements.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-button-type.mdx b/src/content/docs/linter/rules/use-button-type.mdx index a8bbb7c0d..b7ffbc901 100644 --- a/src/content/docs/linter/rules/use-button-type.mdx +++ b/src/content/docs/linter/rules/use-button-type.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-collapsed-else-if.mdx b/src/content/docs/linter/rules/use-collapsed-else-if.mdx index 207857fe2..8128e2896 100644 --- a/src/content/docs/linter/rules/use-collapsed-else-if.mdx +++ b/src/content/docs/linter/rules/use-collapsed-else-if.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.1.0` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/use-collapsed-if.mdx b/src/content/docs/linter/rules/use-collapsed-if.mdx index 0d225e295..6ab307536 100644 --- a/src/content/docs/linter/rules/use-collapsed-if.mdx +++ b/src/content/docs/linter/rules/use-collapsed-if.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.4` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/use-component-export-only-modules.mdx b/src/content/docs/linter/rules/use-component-export-only-modules.mdx index 89e7fedf8..621b1f2e0 100644 --- a/src/content/docs/linter/rules/use-component-export-only-modules.mdx +++ b/src/content/docs/linter/rules/use-component-export-only-modules.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.2` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/use-consistent-array-type.mdx b/src/content/docs/linter/rules/use-consistent-array-type.mdx index 18842c0d3..e106a69e0 100644 --- a/src/content/docs/linter/rules/use-consistent-array-type.mdx +++ b/src/content/docs/linter/rules/use-consistent-array-type.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-consistent-builtin-instantiation.mdx b/src/content/docs/linter/rules/use-consistent-builtin-instantiation.mdx index 0502328a9..0002b2ccb 100644 --- a/src/content/docs/linter/rules/use-consistent-builtin-instantiation.mdx +++ b/src/content/docs/linter/rules/use-consistent-builtin-instantiation.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.7.2` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-consistent-curly-braces.mdx b/src/content/docs/linter/rules/use-consistent-curly-braces.mdx index 58f75936e..a7ad4f59c 100644 --- a/src/content/docs/linter/rules/use-consistent-curly-braces.mdx +++ b/src/content/docs/linter/rules/use-consistent-curly-braces.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.2` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-consistent-member-accessibility.mdx b/src/content/docs/linter/rules/use-consistent-member-accessibility.mdx index e18cf1e2e..5b2e0670b 100644 --- a/src/content/docs/linter/rules/use-consistent-member-accessibility.mdx +++ b/src/content/docs/linter/rules/use-consistent-member-accessibility.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/use-const.mdx b/src/content/docs/linter/rules/use-const.mdx index a6781319b..97d3a4b46 100644 --- a/src/content/docs/linter/rules/use-const.mdx +++ b/src/content/docs/linter/rules/use-const.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-date-now.mdx b/src/content/docs/linter/rules/use-date-now.mdx index 3387c446f..0139d4d2c 100644 --- a/src/content/docs/linter/rules/use-date-now.mdx +++ b/src/content/docs/linter/rules/use-date-now.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-default-parameter-last.mdx b/src/content/docs/linter/rules/use-default-parameter-last.mdx index 8ec0e0a6f..651a83653 100644 --- a/src/content/docs/linter/rules/use-default-parameter-last.mdx +++ b/src/content/docs/linter/rules/use-default-parameter-last.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-default-switch-clause-last.mdx b/src/content/docs/linter/rules/use-default-switch-clause-last.mdx index 360d9b1d3..67e2ae6b9 100644 --- a/src/content/docs/linter/rules/use-default-switch-clause-last.mdx +++ b/src/content/docs/linter/rules/use-default-switch-clause-last.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-default-switch-clause.mdx b/src/content/docs/linter/rules/use-default-switch-clause.mdx index 77d3fc752..7cd283843 100644 --- a/src/content/docs/linter/rules/use-default-switch-clause.mdx +++ b/src/content/docs/linter/rules/use-default-switch-clause.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.7.2` + Sources: - Same as: default-case diff --git a/src/content/docs/linter/rules/use-deprecated-reason.mdx b/src/content/docs/linter/rules/use-deprecated-reason.mdx index f05e375ab..ae56b135d 100644 --- a/src/content/docs/linter/rules/use-deprecated-reason.mdx +++ b/src/content/docs/linter/rules/use-deprecated-reason.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: @@ -34,7 +35,7 @@ query { } ``` -
    +
    code-block.graphql:2:10 lint/nursery/useDeprecatedReason ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    The directive `@deprecated` should have a `reason` argument.

    1 │ query {
    > 2 │ member @deprecated
    ^^^^^^^^^^^
    3 │ }
    4 │

    Add a `reason` argument to the directive.

    ### Valid diff --git a/src/content/docs/linter/rules/use-enum-initializers.mdx b/src/content/docs/linter/rules/use-enum-initializers.mdx index b5011b22f..dd40fb1d0 100644 --- a/src/content/docs/linter/rules/use-enum-initializers.mdx +++ b/src/content/docs/linter/rules/use-enum-initializers.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-error-message.mdx b/src/content/docs/linter/rules/use-error-message.mdx index ce8d2d13e..ab065b29a 100644 --- a/src/content/docs/linter/rules/use-error-message.mdx +++ b/src/content/docs/linter/rules/use-error-message.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + Sources: - Same as: unicorn/error-message diff --git a/src/content/docs/linter/rules/use-exhaustive-dependencies.mdx b/src/content/docs/linter/rules/use-exhaustive-dependencies.mdx index 090a0606a..92c43e585 100644 --- a/src/content/docs/linter/rules/use-exhaustive-dependencies.mdx +++ b/src/content/docs/linter/rules/use-exhaustive-dependencies.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-explicit-length-check.mdx b/src/content/docs/linter/rules/use-explicit-length-check.mdx index 17ac79b26..622bae29e 100644 --- a/src/content/docs/linter/rules/use-explicit-length-check.mdx +++ b/src/content/docs/linter/rules/use-explicit-length-check.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.7.3` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-explicit-type.mdx b/src/content/docs/linter/rules/use-explicit-type.mdx index 5a372b56f..cfca54684 100644 --- a/src/content/docs/linter/rules/use-explicit-type.mdx +++ b/src/content/docs/linter/rules/use-explicit-type.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.3` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/use-exponentiation-operator.mdx b/src/content/docs/linter/rules/use-exponentiation-operator.mdx index 45e4c5902..5e4cb6195 100644 --- a/src/content/docs/linter/rules/use-exponentiation-operator.mdx +++ b/src/content/docs/linter/rules/use-exponentiation-operator.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-export-type.mdx b/src/content/docs/linter/rules/use-export-type.mdx index 8a730101a..c572d9d13 100644 --- a/src/content/docs/linter/rules/use-export-type.mdx +++ b/src/content/docs/linter/rules/use-export-type.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-filenaming-convention.mdx b/src/content/docs/linter/rules/use-filenaming-convention.mdx index 4bbc66c7c..a72c1d6b0 100644 --- a/src/content/docs/linter/rules/use-filenaming-convention.mdx +++ b/src/content/docs/linter/rules/use-filenaming-convention.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + Sources: - Inspired from: unicorn/filename-case diff --git a/src/content/docs/linter/rules/use-flat-map.mdx b/src/content/docs/linter/rules/use-flat-map.mdx index 1a74c547f..4047bd2dd 100644 --- a/src/content/docs/linter/rules/use-flat-map.mdx +++ b/src/content/docs/linter/rules/use-flat-map.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-focusable-interactive.mdx b/src/content/docs/linter/rules/use-focusable-interactive.mdx index 87c32ecb2..fe2d78cfb 100644 --- a/src/content/docs/linter/rules/use-focusable-interactive.mdx +++ b/src/content/docs/linter/rules/use-focusable-interactive.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-for-of.mdx b/src/content/docs/linter/rules/use-for-of.mdx index 43335e42a..4e0a62f0f 100644 --- a/src/content/docs/linter/rules/use-for-of.mdx +++ b/src/content/docs/linter/rules/use-for-of.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + Sources: - Same as: @typescript-eslint/prefer-for-of - Same as: unicorn/no-for-loop diff --git a/src/content/docs/linter/rules/use-fragment-syntax.mdx b/src/content/docs/linter/rules/use-fragment-syntax.mdx index c357878e6..6a591a838 100644 --- a/src/content/docs/linter/rules/use-fragment-syntax.mdx +++ b/src/content/docs/linter/rules/use-fragment-syntax.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-generic-font-names.mdx b/src/content/docs/linter/rules/use-generic-font-names.mdx index ebfcb8302..ce00d7b32 100644 --- a/src/content/docs/linter/rules/use-generic-font-names.mdx +++ b/src/content/docs/linter/rules/use-generic-font-names.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-getter-return.mdx b/src/content/docs/linter/rules/use-getter-return.mdx index dc1192263..b426717c9 100644 --- a/src/content/docs/linter/rules/use-getter-return.mdx +++ b/src/content/docs/linter/rules/use-getter-return.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-google-font-display.mdx b/src/content/docs/linter/rules/use-google-font-display.mdx index f98d2131e..9f3f484a2 100644 --- a/src/content/docs/linter/rules/use-google-font-display.mdx +++ b/src/content/docs/linter/rules/use-google-font-display.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.4` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/use-google-font-preconnect.mdx b/src/content/docs/linter/rules/use-google-font-preconnect.mdx index f116063de..37e20a947 100644 --- a/src/content/docs/linter/rules/use-google-font-preconnect.mdx +++ b/src/content/docs/linter/rules/use-google-font-preconnect.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `vnext` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/use-guard-for-in.mdx b/src/content/docs/linter/rules/use-guard-for-in.mdx index 79ddb26df..4bb66ebb1 100644 --- a/src/content/docs/linter/rules/use-guard-for-in.mdx +++ b/src/content/docs/linter/rules/use-guard-for-in.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.4` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/use-heading-content.mdx b/src/content/docs/linter/rules/use-heading-content.mdx index 35f9ecb9d..398d7d1e3 100644 --- a/src/content/docs/linter/rules/use-heading-content.mdx +++ b/src/content/docs/linter/rules/use-heading-content.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-hook-at-top-level.mdx b/src/content/docs/linter/rules/use-hook-at-top-level.mdx index 6e3488301..096304bff 100644 --- a/src/content/docs/linter/rules/use-hook-at-top-level.mdx +++ b/src/content/docs/linter/rules/use-hook-at-top-level.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + Sources: - Same as: react-hooks/rules-of-hooks diff --git a/src/content/docs/linter/rules/use-html-lang.mdx b/src/content/docs/linter/rules/use-html-lang.mdx index 0060f9446..a563d1af7 100644 --- a/src/content/docs/linter/rules/use-html-lang.mdx +++ b/src/content/docs/linter/rules/use-html-lang.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-iframe-title.mdx b/src/content/docs/linter/rules/use-iframe-title.mdx index 08b05e672..2c02afc19 100644 --- a/src/content/docs/linter/rules/use-iframe-title.mdx +++ b/src/content/docs/linter/rules/use-iframe-title.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-import-extensions.mdx b/src/content/docs/linter/rules/use-import-extensions.mdx index 2c3606d05..0a6e4e9ee 100644 --- a/src/content/docs/linter/rules/use-import-extensions.mdx +++ b/src/content/docs/linter/rules/use-import-extensions.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-import-restrictions.mdx b/src/content/docs/linter/rules/use-import-restrictions.mdx index 1a5c643fa..f37e7d896 100644 --- a/src/content/docs/linter/rules/use-import-restrictions.mdx +++ b/src/content/docs/linter/rules/use-import-restrictions.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/use-import-type.mdx b/src/content/docs/linter/rules/use-import-type.mdx index 5423ed19c..c72e5e6d0 100644 --- a/src/content/docs/linter/rules/use-import-type.mdx +++ b/src/content/docs/linter/rules/use-import-type.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-is-array.mdx b/src/content/docs/linter/rules/use-is-array.mdx index a802362af..204791789 100644 --- a/src/content/docs/linter/rules/use-is-array.mdx +++ b/src/content/docs/linter/rules/use-is-array.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-is-nan.mdx b/src/content/docs/linter/rules/use-is-nan.mdx index eeb02a28a..33fba582f 100644 --- a/src/content/docs/linter/rules/use-is-nan.mdx +++ b/src/content/docs/linter/rules/use-is-nan.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-jsx-key-in-iterable.mdx b/src/content/docs/linter/rules/use-jsx-key-in-iterable.mdx index fca2dacf6..6e1b9871f 100644 --- a/src/content/docs/linter/rules/use-jsx-key-in-iterable.mdx +++ b/src/content/docs/linter/rules/use-jsx-key-in-iterable.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-key-with-click-events.mdx b/src/content/docs/linter/rules/use-key-with-click-events.mdx index b395ba186..ef7d7ddb6 100644 --- a/src/content/docs/linter/rules/use-key-with-click-events.mdx +++ b/src/content/docs/linter/rules/use-key-with-click-events.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-key-with-mouse-events.mdx b/src/content/docs/linter/rules/use-key-with-mouse-events.mdx index f2aafe36d..6a8214d07 100644 --- a/src/content/docs/linter/rules/use-key-with-mouse-events.mdx +++ b/src/content/docs/linter/rules/use-key-with-mouse-events.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-literal-enum-members.mdx b/src/content/docs/linter/rules/use-literal-enum-members.mdx index 68d94cc78..d7db12805 100644 --- a/src/content/docs/linter/rules/use-literal-enum-members.mdx +++ b/src/content/docs/linter/rules/use-literal-enum-members.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-literal-keys.mdx b/src/content/docs/linter/rules/use-literal-keys.mdx index ddc81582f..eebeff29f 100644 --- a/src/content/docs/linter/rules/use-literal-keys.mdx +++ b/src/content/docs/linter/rules/use-literal-keys.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-media-caption.mdx b/src/content/docs/linter/rules/use-media-caption.mdx index bcba3fe09..acff9d863 100644 --- a/src/content/docs/linter/rules/use-media-caption.mdx +++ b/src/content/docs/linter/rules/use-media-caption.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-named-operation.mdx b/src/content/docs/linter/rules/use-named-operation.mdx index 432402e6f..fcedda788 100644 --- a/src/content/docs/linter/rules/use-named-operation.mdx +++ b/src/content/docs/linter/rules/use-named-operation.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `vnext` + :::note - This rule has an **unsafe** fix. ::: @@ -35,7 +36,7 @@ This is useful because most GraphQL client libraries use the operation name for query {} ``` -
    +
    code-block.graphql:1:1 lint/nursery/useNamedOperation  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    Anonymous GraphQL operations are forbidden. Make sure to name your query.

    > 1 │ query {}
    ^^^^^
    2 │

    Most GraphQL client libraries use the operation name for caching purposes.

    Unsafe fix: Rename this query to Query.

    1 │ query·Query{}
    +++++
    ### Valid diff --git a/src/content/docs/linter/rules/use-namespace-keyword.mdx b/src/content/docs/linter/rules/use-namespace-keyword.mdx index a28ef766a..2b34afba9 100644 --- a/src/content/docs/linter/rules/use-namespace-keyword.mdx +++ b/src/content/docs/linter/rules/use-namespace-keyword.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-naming-convention.mdx b/src/content/docs/linter/rules/use-naming-convention.mdx index 6e5adce83..bc9558e80 100644 --- a/src/content/docs/linter/rules/use-naming-convention.mdx +++ b/src/content/docs/linter/rules/use-naming-convention.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/use-node-assert-strict.mdx b/src/content/docs/linter/rules/use-node-assert-strict.mdx index a577c8fe3..fc1b4aead 100644 --- a/src/content/docs/linter/rules/use-node-assert-strict.mdx +++ b/src/content/docs/linter/rules/use-node-assert-strict.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/use-nodejs-import-protocol.mdx b/src/content/docs/linter/rules/use-nodejs-import-protocol.mdx index 81af42a52..56285faea 100644 --- a/src/content/docs/linter/rules/use-nodejs-import-protocol.mdx +++ b/src/content/docs/linter/rules/use-nodejs-import-protocol.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-number-namespace.mdx b/src/content/docs/linter/rules/use-number-namespace.mdx index b0bb0e375..bbcbe2861 100644 --- a/src/content/docs/linter/rules/use-number-namespace.mdx +++ b/src/content/docs/linter/rules/use-number-namespace.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-number-to-fixed-digits-argument.mdx b/src/content/docs/linter/rules/use-number-to-fixed-digits-argument.mdx index 37d46827c..c40b609a9 100644 --- a/src/content/docs/linter/rules/use-number-to-fixed-digits-argument.mdx +++ b/src/content/docs/linter/rules/use-number-to-fixed-digits-argument.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-numeric-literals.mdx b/src/content/docs/linter/rules/use-numeric-literals.mdx index 4a2a1ca9c..901e6d470 100644 --- a/src/content/docs/linter/rules/use-numeric-literals.mdx +++ b/src/content/docs/linter/rules/use-numeric-literals.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-optional-chain.mdx b/src/content/docs/linter/rules/use-optional-chain.mdx index e5b0d4c27..e748a25a5 100644 --- a/src/content/docs/linter/rules/use-optional-chain.mdx +++ b/src/content/docs/linter/rules/use-optional-chain.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-regex-literals.mdx b/src/content/docs/linter/rules/use-regex-literals.mdx index f950f0600..32e89014e 100644 --- a/src/content/docs/linter/rules/use-regex-literals.mdx +++ b/src/content/docs/linter/rules/use-regex-literals.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-self-closing-elements.mdx b/src/content/docs/linter/rules/use-self-closing-elements.mdx index 56ff07c5d..d19aaf1be 100644 --- a/src/content/docs/linter/rules/use-self-closing-elements.mdx +++ b/src/content/docs/linter/rules/use-self-closing-elements.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-semantic-elements.mdx b/src/content/docs/linter/rules/use-semantic-elements.mdx index 83fba9f1f..e9e22d1f7 100644 --- a/src/content/docs/linter/rules/use-semantic-elements.mdx +++ b/src/content/docs/linter/rules/use-semantic-elements.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-shorthand-array-type.mdx b/src/content/docs/linter/rules/use-shorthand-array-type.mdx index 32f857d60..9ff9fabc3 100644 --- a/src/content/docs/linter/rules/use-shorthand-array-type.mdx +++ b/src/content/docs/linter/rules/use-shorthand-array-type.mdx @@ -16,6 +16,7 @@ This rule is deprecated and will be removed in the next major release. **Reason**: Use `useConsistentArrayType` instead. ::: **Since**: `v1.0.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-shorthand-assign.mdx b/src/content/docs/linter/rules/use-shorthand-assign.mdx index f1aa4f292..b1f8a36c2 100644 --- a/src/content/docs/linter/rules/use-shorthand-assign.mdx +++ b/src/content/docs/linter/rules/use-shorthand-assign.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.3.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-shorthand-function-type.mdx b/src/content/docs/linter/rules/use-shorthand-function-type.mdx index 0efd5a654..10ed06981 100644 --- a/src/content/docs/linter/rules/use-shorthand-function-type.mdx +++ b/src/content/docs/linter/rules/use-shorthand-function-type.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.5.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-simple-number-keys.mdx b/src/content/docs/linter/rules/use-simple-number-keys.mdx index 86039e6f0..0af8bc00c 100644 --- a/src/content/docs/linter/rules/use-simple-number-keys.mdx +++ b/src/content/docs/linter/rules/use-simple-number-keys.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-simplified-logic-expression.mdx b/src/content/docs/linter/rules/use-simplified-logic-expression.mdx index c6ea236d1..066173f88 100644 --- a/src/content/docs/linter/rules/use-simplified-logic-expression.mdx +++ b/src/content/docs/linter/rules/use-simplified-logic-expression.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-single-case-statement.mdx b/src/content/docs/linter/rules/use-single-case-statement.mdx index 5ffc7d0a0..2aac8bbf5 100644 --- a/src/content/docs/linter/rules/use-single-case-statement.mdx +++ b/src/content/docs/linter/rules/use-single-case-statement.mdx @@ -16,6 +16,7 @@ This rule is deprecated and will be removed in the next major release. **Reason**: Use the rule noSwitchDeclarations instead ::: **Since**: `v1.0.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-single-var-declarator.mdx b/src/content/docs/linter/rules/use-single-var-declarator.mdx index 9b5b3a606..53554f77e 100644 --- a/src/content/docs/linter/rules/use-single-var-declarator.mdx +++ b/src/content/docs/linter/rules/use-single-var-declarator.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-sorted-classes.mdx b/src/content/docs/linter/rules/use-sorted-classes.mdx index d1a4b7fb2..8f82d0a4c 100644 --- a/src/content/docs/linter/rules/use-sorted-classes.mdx +++ b/src/content/docs/linter/rules/use-sorted-classes.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.6.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-strict-mode.mdx b/src/content/docs/linter/rules/use-strict-mode.mdx index dfa971bb7..a2ba749ad 100644 --- a/src/content/docs/linter/rules/use-strict-mode.mdx +++ b/src/content/docs/linter/rules/use-strict-mode.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/use-template.mdx b/src/content/docs/linter/rules/use-template.mdx index d24cffafe..b5a3721b8 100644 --- a/src/content/docs/linter/rules/use-template.mdx +++ b/src/content/docs/linter/rules/use-template.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-throw-new-error.mdx b/src/content/docs/linter/rules/use-throw-new-error.mdx index ad5f68831..8829582f8 100644 --- a/src/content/docs/linter/rules/use-throw-new-error.mdx +++ b/src/content/docs/linter/rules/use-throw-new-error.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + :::note - This rule has an **unsafe** fix. ::: diff --git a/src/content/docs/linter/rules/use-throw-only-error.mdx b/src/content/docs/linter/rules/use-throw-only-error.mdx index 429957de3..361a3e6eb 100644 --- a/src/content/docs/linter/rules/use-throw-only-error.mdx +++ b/src/content/docs/linter/rules/use-throw-only-error.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + Sources: - Inspired from: no-throw-literal - Inspired from: @typescript-eslint/only-throw-error diff --git a/src/content/docs/linter/rules/use-top-level-regex.mdx b/src/content/docs/linter/rules/use-top-level-regex.mdx index f5e3ef60d..ec6b5b11e 100644 --- a/src/content/docs/linter/rules/use-top-level-regex.mdx +++ b/src/content/docs/linter/rules/use-top-level-regex.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.8.0` + Require regex literals to be declared at the top level. This rule is useful to avoid performance issues when using regex literals inside functions called many times (hot paths). Regex literals create a new RegExp object when they are evaluated. (See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) By declaring them at the top level, this overhead can be avoided. diff --git a/src/content/docs/linter/rules/use-trim-start-end.mdx b/src/content/docs/linter/rules/use-trim-start-end.mdx index 26556ae53..00aae5b7f 100644 --- a/src/content/docs/linter/rules/use-trim-start-end.mdx +++ b/src/content/docs/linter/rules/use-trim-start-end.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::note - This rule has a **safe** fix. ::: diff --git a/src/content/docs/linter/rules/use-valid-anchor.mdx b/src/content/docs/linter/rules/use-valid-anchor.mdx index a67e24983..ab7680bf6 100644 --- a/src/content/docs/linter/rules/use-valid-anchor.mdx +++ b/src/content/docs/linter/rules/use-valid-anchor.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-valid-aria-props.mdx b/src/content/docs/linter/rules/use-valid-aria-props.mdx index 1e0780ecf..e451fe143 100644 --- a/src/content/docs/linter/rules/use-valid-aria-props.mdx +++ b/src/content/docs/linter/rules/use-valid-aria-props.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-valid-aria-role.mdx b/src/content/docs/linter/rules/use-valid-aria-role.mdx index a0ff026d0..0b327666b 100644 --- a/src/content/docs/linter/rules/use-valid-aria-role.mdx +++ b/src/content/docs/linter/rules/use-valid-aria-role.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.4.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-valid-aria-values.mdx b/src/content/docs/linter/rules/use-valid-aria-values.mdx index fe27518d2..79a8da659 100644 --- a/src/content/docs/linter/rules/use-valid-aria-values.mdx +++ b/src/content/docs/linter/rules/use-valid-aria-values.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-valid-autocomplete.mdx b/src/content/docs/linter/rules/use-valid-autocomplete.mdx index 384c59336..031d3b0a4 100644 --- a/src/content/docs/linter/rules/use-valid-autocomplete.mdx +++ b/src/content/docs/linter/rules/use-valid-autocomplete.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.9.0` + :::caution This rule is part of the [nursery](/linter/rules/#nursery) group. ::: diff --git a/src/content/docs/linter/rules/use-valid-for-direction.mdx b/src/content/docs/linter/rules/use-valid-for-direction.mdx index 14879fc00..bbfb46b0e 100644 --- a/src/content/docs/linter/rules/use-valid-for-direction.mdx +++ b/src/content/docs/linter/rules/use-valid-for-direction.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-valid-lang.mdx b/src/content/docs/linter/rules/use-valid-lang.mdx index 5acfb5bc7..fe1efe9be 100644 --- a/src/content/docs/linter/rules/use-valid-lang.mdx +++ b/src/content/docs/linter/rules/use-valid-lang.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/linter/rules/use-valid-typeof.mdx b/src/content/docs/linter/rules/use-valid-typeof.mdx index db8304bdd..82a27a571 100644 --- a/src/content/docs/linter/rules/use-valid-typeof.mdx +++ b/src/content/docs/linter/rules/use-valid-typeof.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has an **unsafe** fix. diff --git a/src/content/docs/linter/rules/use-while.mdx b/src/content/docs/linter/rules/use-while.mdx index 21ca4b7ad..5323d00ea 100644 --- a/src/content/docs/linter/rules/use-while.mdx +++ b/src/content/docs/linter/rules/use-while.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. - This rule has a **safe** fix. diff --git a/src/content/docs/linter/rules/use-yield.mdx b/src/content/docs/linter/rules/use-yield.mdx index a060b8ade..68f866acd 100644 --- a/src/content/docs/linter/rules/use-yield.mdx +++ b/src/content/docs/linter/rules/use-yield.mdx @@ -12,6 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; **Since**: `v1.0.0` + :::note - This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: diff --git a/src/content/docs/pt-br/linter/index.mdx b/src/content/docs/pt-br/linter/index.mdx index 6ca53ef0f..15b87acda 100644 --- a/src/content/docs/pt-br/linter/index.mdx +++ b/src/content/docs/pt-br/linter/index.mdx @@ -3,8 +3,8 @@ title: Linter description: Como utilizar o Linter do Biome. --- -import NumberOfRules from "@/components/generated/NumberOfRules.astro"; -import RecommendedRules from "@/components/generated/RecommendedRules.astro"; +import NumberOfRules from "@/components/generated/linter/NumberOfRules.astro"; +import RecommendedRules from "@/components/generated/linter/RecommendedRules.astro"; O Linter do Biome analisa de forma estática o seu código para encontrar erros comuns e ajudar você a escrever códigos idiomáticos. diff --git a/src/content/docs/zh-cn/linter/index.mdx b/src/content/docs/zh-cn/linter/index.mdx index 895c028bd..b5663b5f9 100644 --- a/src/content/docs/zh-cn/linter/index.mdx +++ b/src/content/docs/zh-cn/linter/index.mdx @@ -3,8 +3,8 @@ title: Linter description: 如何使用 Biome linter。 --- -import NumberOfRules from "@/components/generated/NumberOfRules.astro"; -import RecommendedRules from "@/components/generated/RecommendedRules.astro"; +import NumberOfRules from "@/components/generated/linter/NumberOfRules.astro"; +import RecommendedRules from "@/components/generated/linter/RecommendedRules.astro"; Biome 的 linter 静态分析你的代码以捕获常见错误并帮助编写符合规范的代码。 From 72e2e1dd5dbebdc579f312c0b8cf1392158f420f Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Tue, 29 Oct 2024 16:10:50 +0000 Subject: [PATCH 2/3] clippy and fmt --- astro.config.ts | 928 ++++++++++++++++++++--------------------- codegen/src/lintdoc.rs | 13 +- package.json | 148 +++---- 3 files changed, 544 insertions(+), 545 deletions(-) diff --git a/astro.config.ts b/astro.config.ts index b425fb5d2..632f5ddd2 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -1,482 +1,482 @@ import netlify from "@astrojs/netlify"; import react from "@astrojs/react"; import starlight from "@astrojs/starlight"; -import {defineConfig} from "astro/config"; +import { defineConfig } from "astro/config"; import rehypeSlug from "rehype-slug"; -import {searchForWorkspaceRoot} from "vite"; -import {version as biomeVersion} from "./node_modules/@biomejs/wasm-web/package.json"; -import {version as prettierVersion} from "./node_modules/prettier/package.json"; -import {bundledLanguages} from "./node_modules/shiki"; -import {rehypeAutolink} from "./plugins/rehype-autolink"; +import { searchForWorkspaceRoot } from "vite"; +import { version as biomeVersion } from "./node_modules/@biomejs/wasm-web/package.json"; +import { version as prettierVersion } from "./node_modules/prettier/package.json"; +import { bundledLanguages } from "./node_modules/shiki"; +import { rehypeAutolink } from "./plugins/rehype-autolink"; const site = "https://biomejs.dev"; // https://astro.build/config export default defineConfig({ - site, - output: "static", + site, + output: "static", - compressHTML: true, + compressHTML: true, - integrations: [ - react(), - starlight({ - title: "Biome", - defaultLocale: "root", - locales: { - root: { - label: "English", - lang: "en", - }, - ja: { - label: "日本語", - lang: "ja", - }, - "zh-cn": { - label: "简体中文", - lang: "zh-CN", - }, - "pt-br": { - label: "Português", - lang: "pt-BR", - }, - }, - sidebar: [ - { - label: "Blog", - link: "../blog", - translations: {ja: "ブログ", "zh-CN": "博客"}, - }, - { - label: "Playground", - link: "../playground", - translations: { - ja: "プレイグラウンド", - "zh-CN": "演练场", - "pt-BR": "Ambiente de testes", - }, - }, - { - label: "Guides", - translations: {ja: "ガイド", "zh-CN": "指南", "pt-BR": "Guias"}, - items: [ - { - label: "Getting Started", - link: "/guides/getting-started", - translations: { - ja: "はじめる", - "zh-CN": "入门", - "pt-BR": "Primeiros passos", - }, - }, - { - label: "Manual installation", - link: "/guides/manual-installation", - translations: { - ja: "手動インストール", - "zh-CN": "手动安装", - "pt-BR": "Instalação manual", - }, - }, - { - label: "Configure Biome", - link: "/guides/configure-biome", - translations: { - ja: "Biome の設定", - "zh-CN": "配置生物群落", - "pt-BR": "Configurar Bioma", - }, - }, - { - label: "Use Biome in big projects", - link: "/guides/big-projects", - translations: { - ja: "大きなプロジェクトでのBiomeの使用方法", - "zh-CN": "大型项目中使用 Biome", - "pt-BR": "Usando o Biome em projetos grandes", - }, - }, - { - label: "Biome in your IDE", - translations: { - ja: "Biome をあなたのエディタに導入する", - "zh-CN": "编辑器中使用 Biome", - "pt-BR": "Biome no seu editor", - }, - items: [ - { - label: "First-party extensions", - link: "/guides/editors/first-party-extensions", - }, - { - label: "Third-party extensions", - link: "/guides/editors/third-party-extensions", - }, - { - label: "Integrate Biome in an editor extension", - link: "/guides/editors/create-a-extension", - }, - ], - }, - { - label: "Integrate Biome with your VCS", - link: "/guides/integrate-in-vcs", - translations: { - ja: "Biome をあなたの VCS と統合する", - "zh-CN": "与版本控制系统集成", - "pt-BR": "Integrando o Biome com o seu VCS", - }, - }, - { - label: "Migrate from ESLint & Prettier", - link: "/guides/migrate-eslint-prettier", - translations: { - ja: "ESLintとPrettierからの移行", - }, - }, - ], - }, - { - label: "Analyzer", - items: [ - { - label: "Introduction", - link: "/analyzer", - translations: { - ja: "イントロダクション", - "zh-CN": "介绍", - "pt-BR": "Introdução", - }, - }, - { - label: "Linter", - items: [ - { - label: "Introduction", - link: "/linter", - translations: { - ja: "イントロダクション", - "zh-CN": "介绍", - "pt-BR": "Introdução", - }, - }, - { - label: "Rules", - link: "/linter/rules", - translations: { - ja: "ルール", - "zh-CN": "规则", - "pt-BR": "Regras", - }, - }, - { - label: "Rules sources", - link: "/linter/rules-sources", - }, - ], - }, - { - label: "Assist", - badge: "new", - items: [ - { - label: "Introduction", - link: "/assist", - }, - { - label: "Actions", - link: "/assist/actions", - }, - ], - }, - { - label: "Import Sorting", - link: "/analyzer/import-sorting", - translations: { - ja: "Import文のソート", - "zh-CN": "导入排序", - "pt-BR": "Ordenação de importações", - }, - }, - ], - translations: { - ja: "Analyzer", - "zh-CN": "分析器", - "pt-BR": "Analisador", - }, - }, - { - label: "Formatter", - items: [ - { - label: "Introduction", - link: "/formatter", - translations: { - ja: "イントロダクション", - "zh-CN": "介绍", - "pt-BR": "Introdução", - }, - }, - { - label: "Differences with Prettier", - link: "/formatter/differences-with-prettier", - translations: { - ja: "Prettier との違い", - "zh-CN": "与 Prettier 的区别", - "pt-BR": "Diferenças em relação ao Prettier", - }, - }, - { - label: "Formatter Option Philosophy", - link: "/formatter/option-philosophy", - translations: { - ja: "Formatterオプションに対する考え方", - "zh-CN": "格式化配置理念", - "pt-BR": "Princípios de configuração", - }, - }, - ], - translations: { - "zh-CN": "格式化程序", - "pt-BR": "Formatador", - }, - }, - { - label: "Reference", - translations: { - ja: "リファレンス", - "zh-CN": "参考", - "pt-BR": "Referências", - }, - items: [ - { - label: "CLI", - link: "/reference/cli", - }, - { - label: "Diagnostics", - link: "/reference/diagnostics", - }, - { - label: "Environment variables", - link: "/reference/environment-variables", - }, - { - label: "Reporters", - link: "/reference/reporters", - }, - { - label: "Configuration", - link: "/reference/configuration", - translations: { - ja: "設定", - "zh-CN": "配置", - "pt-BR": "Configuração", - }, - }, - { - label: "VSCode extension", - link: "/reference/vscode", - translations: { - ja: "VSCode拡張機能", - "zh-CN": "VSCode 扩展", - "pt-BR": "Extensão do VSCode", - }, - }, - { - label: "Zed extension", - link: "/reference/zed", - translations: { - ja: "Zed拡張機能", - "zh-CN": "Zed 扩展", - "pt-BR": "Extensão do Zed", - }, - }, - { - label: "GritQL", - link: "/reference/gritql", - badge: "experimental", - }, - ], - }, - { - label: "Recipes", - translations: {ja: "レシピ", "zh-CN": "实例", "pt-BR": "Receitas"}, - items: [ - { - label: "Continuous Integration", - link: "/recipes/continuous-integration", - translations: { - ja: "継続的インテグレーション", - "zh-CN": "持续集成", - "pt-BR": "Integração Contínua", - }, - }, - { - label: "Git Hooks", - link: "/recipes/git-hooks", - }, - { - label: "Renovate", - link: "/recipes/renovate", - }, - { - label: "Social Badges", - link: "/recipes/badges", - translations: { - ja: "ソーシャルバッジ", - }, - }, - ], - }, - { - label: "Internals", - translations: { - ja: "内部原理", - "zh-CN": "内部原理", - "pt-BR": "Aspectos Internos", - }, - items: [ - { - label: "Philosophy", - link: "/internals/philosophy", - translations: { - ja: "理念", - "zh-CN": "理念", - "pt-BR": "Filosofia", - }, - }, - { - label: "Language support", - link: "/internals/language-support", - translations: { - ja: "言語サポート", - "zh-CN": "语言支持", - "pt-BR": "Suporte de linguagens", - }, - }, - { - label: "Architecture", - link: "/internals/architecture", - translations: { - ja: "アーキテクチャ", - "zh-CN": "架构", - "pt-BR": "Arquitetura", - }, - }, - { - label: "Credits", - link: "/internals/credits", - translations: { - ja: "クレジット", - "zh-CN": "鸣谢", - "pt-BR": "Créditos", - }, - }, - { - label: "Versioning", - link: "/internals/versioning", - translations: { - ja: "バージョニング", - "zh-CN": "版本控制", - "pt-BR": "Versionamento", - }, - }, - { - label: "Changelog", - link: "/internals/changelog", - translations: { - "zh-CN": "更新日志", - "pt-BR": "Alterações", - }, - }, - ], - }, - ], - logo: { - light: "./src/assets/svg/logo-light-transparent.svg", - dark: "./src/assets/svg/logo-dark-transparent.svg", - replacesTitle: true, - }, - favicon: "/img/favicon.svg", - head: [ - { - tag: "link", - attrs: { - rel: "alternate", - type: "application/rss+xml", - href: `${site}/feed.xml`, - }, - }, - ], - customCss: [ - // Relative path to your custom CSS file - "./src/styles/index.css", - ], - social: { - discord: "https://biomejs.dev/chat", - github: "https://github.com/biomejs/biome", - "x.com": "https://twitter.com/biomejs", - mastodon: "https://fosstodon.org/@biomejs", - openCollective: "https://opencollective.com/biome", - youtube: "https://youtube.com/@Biomejs", - }, - editLink: { - baseUrl: "https://github.com/biomejs/website/edit/main/", - }, - components: { - SiteTitle: "./src/components/starlight/SiteTitle.astro", - Sidebar: "./src/components/starlight/Sidebar.astro", - Hero: "./src/components/starlight/Hero.astro", - Head: "./src/components/starlight/Head.astro", - }, - }), - ], + integrations: [ + react(), + starlight({ + title: "Biome", + defaultLocale: "root", + locales: { + root: { + label: "English", + lang: "en", + }, + ja: { + label: "日本語", + lang: "ja", + }, + "zh-cn": { + label: "简体中文", + lang: "zh-CN", + }, + "pt-br": { + label: "Português", + lang: "pt-BR", + }, + }, + sidebar: [ + { + label: "Blog", + link: "../blog", + translations: { ja: "ブログ", "zh-CN": "博客" }, + }, + { + label: "Playground", + link: "../playground", + translations: { + ja: "プレイグラウンド", + "zh-CN": "演练场", + "pt-BR": "Ambiente de testes", + }, + }, + { + label: "Guides", + translations: { ja: "ガイド", "zh-CN": "指南", "pt-BR": "Guias" }, + items: [ + { + label: "Getting Started", + link: "/guides/getting-started", + translations: { + ja: "はじめる", + "zh-CN": "入门", + "pt-BR": "Primeiros passos", + }, + }, + { + label: "Manual installation", + link: "/guides/manual-installation", + translations: { + ja: "手動インストール", + "zh-CN": "手动安装", + "pt-BR": "Instalação manual", + }, + }, + { + label: "Configure Biome", + link: "/guides/configure-biome", + translations: { + ja: "Biome の設定", + "zh-CN": "配置生物群落", + "pt-BR": "Configurar Bioma", + }, + }, + { + label: "Use Biome in big projects", + link: "/guides/big-projects", + translations: { + ja: "大きなプロジェクトでのBiomeの使用方法", + "zh-CN": "大型项目中使用 Biome", + "pt-BR": "Usando o Biome em projetos grandes", + }, + }, + { + label: "Biome in your IDE", + translations: { + ja: "Biome をあなたのエディタに導入する", + "zh-CN": "编辑器中使用 Biome", + "pt-BR": "Biome no seu editor", + }, + items: [ + { + label: "First-party extensions", + link: "/guides/editors/first-party-extensions", + }, + { + label: "Third-party extensions", + link: "/guides/editors/third-party-extensions", + }, + { + label: "Integrate Biome in an editor extension", + link: "/guides/editors/create-a-extension", + }, + ], + }, + { + label: "Integrate Biome with your VCS", + link: "/guides/integrate-in-vcs", + translations: { + ja: "Biome をあなたの VCS と統合する", + "zh-CN": "与版本控制系统集成", + "pt-BR": "Integrando o Biome com o seu VCS", + }, + }, + { + label: "Migrate from ESLint & Prettier", + link: "/guides/migrate-eslint-prettier", + translations: { + ja: "ESLintとPrettierからの移行", + }, + }, + ], + }, + { + label: "Analyzer", + items: [ + { + label: "Introduction", + link: "/analyzer", + translations: { + ja: "イントロダクション", + "zh-CN": "介绍", + "pt-BR": "Introdução", + }, + }, + { + label: "Linter", + items: [ + { + label: "Introduction", + link: "/linter", + translations: { + ja: "イントロダクション", + "zh-CN": "介绍", + "pt-BR": "Introdução", + }, + }, + { + label: "Rules", + link: "/linter/rules", + translations: { + ja: "ルール", + "zh-CN": "规则", + "pt-BR": "Regras", + }, + }, + { + label: "Rules sources", + link: "/linter/rules-sources", + }, + ], + }, + { + label: "Assist", + badge: "new", + items: [ + { + label: "Introduction", + link: "/assist", + }, + { + label: "Actions", + link: "/assist/actions", + }, + ], + }, + { + label: "Import Sorting", + link: "/analyzer/import-sorting", + translations: { + ja: "Import文のソート", + "zh-CN": "导入排序", + "pt-BR": "Ordenação de importações", + }, + }, + ], + translations: { + ja: "Analyzer", + "zh-CN": "分析器", + "pt-BR": "Analisador", + }, + }, + { + label: "Formatter", + items: [ + { + label: "Introduction", + link: "/formatter", + translations: { + ja: "イントロダクション", + "zh-CN": "介绍", + "pt-BR": "Introdução", + }, + }, + { + label: "Differences with Prettier", + link: "/formatter/differences-with-prettier", + translations: { + ja: "Prettier との違い", + "zh-CN": "与 Prettier 的区别", + "pt-BR": "Diferenças em relação ao Prettier", + }, + }, + { + label: "Formatter Option Philosophy", + link: "/formatter/option-philosophy", + translations: { + ja: "Formatterオプションに対する考え方", + "zh-CN": "格式化配置理念", + "pt-BR": "Princípios de configuração", + }, + }, + ], + translations: { + "zh-CN": "格式化程序", + "pt-BR": "Formatador", + }, + }, + { + label: "Reference", + translations: { + ja: "リファレンス", + "zh-CN": "参考", + "pt-BR": "Referências", + }, + items: [ + { + label: "CLI", + link: "/reference/cli", + }, + { + label: "Diagnostics", + link: "/reference/diagnostics", + }, + { + label: "Environment variables", + link: "/reference/environment-variables", + }, + { + label: "Reporters", + link: "/reference/reporters", + }, + { + label: "Configuration", + link: "/reference/configuration", + translations: { + ja: "設定", + "zh-CN": "配置", + "pt-BR": "Configuração", + }, + }, + { + label: "VSCode extension", + link: "/reference/vscode", + translations: { + ja: "VSCode拡張機能", + "zh-CN": "VSCode 扩展", + "pt-BR": "Extensão do VSCode", + }, + }, + { + label: "Zed extension", + link: "/reference/zed", + translations: { + ja: "Zed拡張機能", + "zh-CN": "Zed 扩展", + "pt-BR": "Extensão do Zed", + }, + }, + { + label: "GritQL", + link: "/reference/gritql", + badge: "experimental", + }, + ], + }, + { + label: "Recipes", + translations: { ja: "レシピ", "zh-CN": "实例", "pt-BR": "Receitas" }, + items: [ + { + label: "Continuous Integration", + link: "/recipes/continuous-integration", + translations: { + ja: "継続的インテグレーション", + "zh-CN": "持续集成", + "pt-BR": "Integração Contínua", + }, + }, + { + label: "Git Hooks", + link: "/recipes/git-hooks", + }, + { + label: "Renovate", + link: "/recipes/renovate", + }, + { + label: "Social Badges", + link: "/recipes/badges", + translations: { + ja: "ソーシャルバッジ", + }, + }, + ], + }, + { + label: "Internals", + translations: { + ja: "内部原理", + "zh-CN": "内部原理", + "pt-BR": "Aspectos Internos", + }, + items: [ + { + label: "Philosophy", + link: "/internals/philosophy", + translations: { + ja: "理念", + "zh-CN": "理念", + "pt-BR": "Filosofia", + }, + }, + { + label: "Language support", + link: "/internals/language-support", + translations: { + ja: "言語サポート", + "zh-CN": "语言支持", + "pt-BR": "Suporte de linguagens", + }, + }, + { + label: "Architecture", + link: "/internals/architecture", + translations: { + ja: "アーキテクチャ", + "zh-CN": "架构", + "pt-BR": "Arquitetura", + }, + }, + { + label: "Credits", + link: "/internals/credits", + translations: { + ja: "クレジット", + "zh-CN": "鸣谢", + "pt-BR": "Créditos", + }, + }, + { + label: "Versioning", + link: "/internals/versioning", + translations: { + ja: "バージョニング", + "zh-CN": "版本控制", + "pt-BR": "Versionamento", + }, + }, + { + label: "Changelog", + link: "/internals/changelog", + translations: { + "zh-CN": "更新日志", + "pt-BR": "Alterações", + }, + }, + ], + }, + ], + logo: { + light: "./src/assets/svg/logo-light-transparent.svg", + dark: "./src/assets/svg/logo-dark-transparent.svg", + replacesTitle: true, + }, + favicon: "/img/favicon.svg", + head: [ + { + tag: "link", + attrs: { + rel: "alternate", + type: "application/rss+xml", + href: `${site}/feed.xml`, + }, + }, + ], + customCss: [ + // Relative path to your custom CSS file + "./src/styles/index.css", + ], + social: { + discord: "https://biomejs.dev/chat", + github: "https://github.com/biomejs/biome", + "x.com": "https://twitter.com/biomejs", + mastodon: "https://fosstodon.org/@biomejs", + openCollective: "https://opencollective.com/biome", + youtube: "https://youtube.com/@Biomejs", + }, + editLink: { + baseUrl: "https://github.com/biomejs/website/edit/main/", + }, + components: { + SiteTitle: "./src/components/starlight/SiteTitle.astro", + Sidebar: "./src/components/starlight/Sidebar.astro", + Hero: "./src/components/starlight/Hero.astro", + Head: "./src/components/starlight/Head.astro", + }, + }), + ], - build: { - format: "directory", - }, + build: { + format: "directory", + }, - markdown: { - syntaxHighlight: "shiki", - rehypePlugins: [rehypeSlug, ...rehypeAutolink()], - shikiConfig: { - langs: [ - // @ts-expect-error - { - ...(await bundledLanguages.javascript()).default[0], - scopeName: "source.cjs", - aliases: ["cjs"], - }, - ], - }, - }, + markdown: { + syntaxHighlight: "shiki", + rehypePlugins: [rehypeSlug, ...rehypeAutolink()], + shikiConfig: { + langs: [ + // @ts-expect-error + { + ...(await bundledLanguages.javascript()).default[0], + scopeName: "source.cjs", + aliases: ["cjs"], + }, + ], + }, + }, - adapter: netlify({ - imageCDN: false, - }), + adapter: netlify({ + imageCDN: false, + }), - vite: { - resolve: { - alias: { - "@": new URL("./src", import.meta.url).pathname, - }, - }, - plugins: [], + vite: { + resolve: { + alias: { + "@": new URL("./src", import.meta.url).pathname, + }, + }, + plugins: [], - worker: { - format: "es", - }, + worker: { + format: "es", + }, - server: { - fs: { - // https://vitejs.dev/config/server-options.html#server-fs-allow - allow: [searchForWorkspaceRoot(process.cwd())], - }, - }, + server: { + fs: { + // https://vitejs.dev/config/server-options.html#server-fs-allow + allow: [searchForWorkspaceRoot(process.cwd())], + }, + }, - define: { - PRETTIER_VERSION: JSON.stringify(prettierVersion), - BIOME_VERSION: JSON.stringify(biomeVersion), - }, - }, + define: { + PRETTIER_VERSION: JSON.stringify(prettierVersion), + BIOME_VERSION: JSON.stringify(biomeVersion), + }, + }, }); diff --git a/codegen/src/lintdoc.rs b/codegen/src/lintdoc.rs index 2fe5a8ed7..f456ee728 100644 --- a/codegen/src/lintdoc.rs +++ b/codegen/src/lintdoc.rs @@ -239,9 +239,6 @@ fn generate_and_write_rule_pages(rule_category: RuleCategory, rules: Rules) -> R } fs::create_dir_all(&root)?; - // create rule sources - if matches!(rule_category, RuleCategory::Lint) {} - let mut recommended_rules = String::new(); let Rules { @@ -358,6 +355,7 @@ The recommended rules are: Ok(()) } +#[allow(clippy::too_many_arguments)] fn generate_group( group: &'static str, rules: &BTreeMap<&'static str, RuleToDocument>, @@ -389,7 +387,7 @@ fn generate_group( group, rule_name, is_nursery, - rule_to_document: &rule_to_document, + rule_to_document, }, path_prefix, middle_path, @@ -497,7 +495,7 @@ fn generate_rule( writeln!( content, "description: |\n {}", - summary_text.replace("'", "\'") + summary_text.replace("'", "\\'") )?; writeln!(content, "---")?; @@ -537,7 +535,8 @@ fn generate_rule( Ok(summary) } -fn generate_rule_content<'a>( +#[allow(clippy::too_many_arguments)] +fn generate_rule_content( language: &'static str, group: &'static str, rule_name: &'static str, @@ -902,7 +901,7 @@ impl FromStr for CodeBlockTest { // This is based on the parsing logic for code block languages in `rustdoc`: // https://github.com/rust-lang/rust/blob/6ac8adad1f7d733b5b97d1df4e7f96e73a46db42/src/librustdoc/html/markdown.rs#L873 let tokens = input - .split(|c| c == ',' || c == ' ' || c == '\t') + .split([',', ' ', '\t']) .map(str::trim) .filter(|token| !token.is_empty()); diff --git a/package.json b/package.json index 06db8ffd7..7e73a1d84 100644 --- a/package.json +++ b/package.json @@ -1,76 +1,76 @@ { - "name": "@biomejs/website", - "private": true, - "scripts": { - "dev": "astro dev", - "format": "pnpm biome format --write", - "check": "pnpm biome check --write", - "tsc": "tsc --skipLibCheck", - "build": "astro build", - "preview": "astro preview", - "textlint": "textlint './src/content/docs/ja/**/*.{md,mdx}'", - "textlint:fix": "textlint --fix './src/content/docs/ja/**/*.{md,mdx}'", - "codegen": "cargo run -p codegen", - "codegen:rules": "pnpm codegen rules", - "codegen:release-files": "pnpm codegen release-files", - "codegen:metadata": "pnpm codegen metadata", - "codegen:env": "pnpm codegen env", - "codegen:diagnostics": "pnpm codegen diagnostics", - "codegen:all": "pnpm codegen all" - }, - "devDependencies": { - "@astrojs/netlify": "5.5.3", - "@astrojs/prism": "3.1.0", - "@astrojs/react": "3.6.2", - "@astrojs/rss": "4.0.9", - "@astrojs/starlight": "0.26.1", - "@biomejs/biome": "1.8.3", - "@biomejs/wasm-web": "https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@92286ab", - "@codemirror/lang-css": "6.3.0", - "@codemirror/lang-html": "6.4.9", - "@codemirror/lang-javascript": "6.2.2", - "@codemirror/lang-json": "6.0.1", - "@codemirror/lang-vue": "0.1.3", - "@codemirror/lint": "6.8.2", - "@codemirror/state": "6.4.1", - "@codemirror/view": "6.34.1", - "@playwright/test": "1.47.2", - "@replit/codemirror-lang-svelte": "6.0.0", - "@types/node": "20.16.10", - "@types/react": "18.3.11", - "@types/react-dom": "18.3.1", - "@uiw/react-codemirror": "4.23.5", - "@vitejs/plugin-react": "4.3.2", - "astro": "4.16.7", - "astro-og-canvas": "0.5.3", - "autoprefixer": "10.4.20", - "canvaskit-wasm": "0.39.1", - "cm6-graphql": "0.0.15", - "codemirror-lang-rome-ast": "0.0.6", - "fast-diff": "1.3.0", - "hast-util-to-html": "9.0.3", - "hast-util-to-string": "3.0.1", - "hastscript": "9.0.0", - "html-escaper": "3.0.3", - "lang-rome-formatter-ir": "0.0.2", - "mdast-util-to-hast": "13.2.0", - "mermaid": "10.9.3", - "postcss": "8.4.47", - "postcss-mixins": "11.0.3", - "prettier": "3.3.3", - "prettier-plugin-svelte": "3.2.7", - "react": "18.3.1", - "react-dom": "18.3.1", - "rehype-autolink-headings": "7.1.0", - "rehype-slug": "6.0.0", - "remark-toc": "9.0.0", - "sharp": "0.33.5", - "textlint": "14.2.0", - "textlint-rule-preset-jtf-style": "2.3.14", - "textlint-rule-prh": "6.0.0", - "typescript": "5.5.4", - "vite": "5.4.10", - "vite-plugin-svgr": "4.2.0" - }, - "packageManager": "pnpm@9.6.0" + "name": "@biomejs/website", + "private": true, + "scripts": { + "dev": "astro dev", + "format": "pnpm biome format --write", + "check": "pnpm biome check --write", + "tsc": "tsc --skipLibCheck", + "build": "astro build", + "preview": "astro preview", + "textlint": "textlint './src/content/docs/ja/**/*.{md,mdx}'", + "textlint:fix": "textlint --fix './src/content/docs/ja/**/*.{md,mdx}'", + "codegen": "cargo run -p codegen", + "codegen:rules": "pnpm codegen rules", + "codegen:release-files": "pnpm codegen release-files", + "codegen:metadata": "pnpm codegen metadata", + "codegen:env": "pnpm codegen env", + "codegen:diagnostics": "pnpm codegen diagnostics", + "codegen:all": "pnpm codegen all" + }, + "devDependencies": { + "@astrojs/netlify": "5.5.3", + "@astrojs/prism": "3.1.0", + "@astrojs/react": "3.6.2", + "@astrojs/rss": "4.0.9", + "@astrojs/starlight": "0.26.1", + "@biomejs/biome": "1.8.3", + "@biomejs/wasm-web": "https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@92286ab", + "@codemirror/lang-css": "6.3.0", + "@codemirror/lang-html": "6.4.9", + "@codemirror/lang-javascript": "6.2.2", + "@codemirror/lang-json": "6.0.1", + "@codemirror/lang-vue": "0.1.3", + "@codemirror/lint": "6.8.2", + "@codemirror/state": "6.4.1", + "@codemirror/view": "6.34.1", + "@playwright/test": "1.47.2", + "@replit/codemirror-lang-svelte": "6.0.0", + "@types/node": "20.16.10", + "@types/react": "18.3.11", + "@types/react-dom": "18.3.1", + "@uiw/react-codemirror": "4.23.5", + "@vitejs/plugin-react": "4.3.2", + "astro": "4.16.7", + "astro-og-canvas": "0.5.3", + "autoprefixer": "10.4.20", + "canvaskit-wasm": "0.39.1", + "cm6-graphql": "0.0.15", + "codemirror-lang-rome-ast": "0.0.6", + "fast-diff": "1.3.0", + "hast-util-to-html": "9.0.3", + "hast-util-to-string": "3.0.1", + "hastscript": "9.0.0", + "html-escaper": "3.0.3", + "lang-rome-formatter-ir": "0.0.2", + "mdast-util-to-hast": "13.2.0", + "mermaid": "10.9.3", + "postcss": "8.4.47", + "postcss-mixins": "11.0.3", + "prettier": "3.3.3", + "prettier-plugin-svelte": "3.2.7", + "react": "18.3.1", + "react-dom": "18.3.1", + "rehype-autolink-headings": "7.1.0", + "rehype-slug": "6.0.0", + "remark-toc": "9.0.0", + "sharp": "0.33.5", + "textlint": "14.2.0", + "textlint-rule-preset-jtf-style": "2.3.14", + "textlint-rule-prh": "6.0.0", + "typescript": "5.5.4", + "vite": "5.4.10", + "vite-plugin-svgr": "4.2.0" + }, + "packageManager": "pnpm@9.6.0" } From 63272610cceded362558abac94490196484c63cf Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Mon, 4 Nov 2024 11:42:25 +0000 Subject: [PATCH 3/3] fix --- .npmrc | 3 - astro.config.ts | 21 +- pnpm-lock.yaml | 384 +++++++++++++++--- src/content/docs/assist/index.mdx | 10 +- .../docs/ja/reference/configuration.mdx | 32 +- src/content/docs/reference/configuration.mdx | 38 +- .../docs/zh-cn/reference/configuration.mdx | 2 +- 7 files changed, 381 insertions(+), 109 deletions(-) delete mode 100644 .npmrc diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 2a8653fe4..000000000 --- a/.npmrc +++ /dev/null @@ -1,3 +0,0 @@ -# Hoist the shiki package so we can import language grammars from it. -# We use this approach to add syntax highlighting support for the cjs code block. -shamefully-hoist=true diff --git a/astro.config.ts b/astro.config.ts index 632f5ddd2..87944ab81 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -4,9 +4,12 @@ import starlight from "@astrojs/starlight"; import { defineConfig } from "astro/config"; import rehypeSlug from "rehype-slug"; import { searchForWorkspaceRoot } from "vite"; -import { version as biomeVersion } from "./node_modules/@biomejs/wasm-web/package.json"; -import { version as prettierVersion } from "./node_modules/prettier/package.json"; -import { bundledLanguages } from "./node_modules/shiki"; +import { version as biomeVersion } from "./node_modules/@biomejs/wasm-web/package.json" with { + type: "json", +}; +import { version as prettierVersion } from "./node_modules/prettier/package.json" with { + type: "json", +}; import { rehypeAutolink } from "./plugins/rehype-autolink"; const site = "https://biomejs.dev"; @@ -440,14 +443,10 @@ export default defineConfig({ syntaxHighlight: "shiki", rehypePlugins: [rehypeSlug, ...rehypeAutolink()], shikiConfig: { - langs: [ - // @ts-expect-error - { - ...(await bundledLanguages.javascript()).default[0], - scopeName: "source.cjs", - aliases: ["cjs"], - }, - ], + langAlias: { + cjs: "javascript", + grit: "text", + }, }, }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0e4d261cd..a6a30f7cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: devDependencies: '@astrojs/netlify': specifier: 5.5.3 - version: 5.5.3(@opentelemetry/api@1.9.0)(@types/node@20.16.10)(astro@4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4))(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47)) + version: 5.5.3(@opentelemetry/api@1.9.0)(@types/node@20.16.10)(astro@4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4))(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47)) '@astrojs/prism': specifier: 3.1.0 version: 3.1.0 @@ -22,7 +22,7 @@ importers: version: 4.0.9 '@astrojs/starlight': specifier: 0.26.1 - version: 0.26.1(astro@4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4)) + version: 0.26.1(astro@4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4)) '@biomejs/biome': specifier: 1.8.3 version: 1.8.3 @@ -76,10 +76,10 @@ importers: version: 4.3.2(vite@5.4.10(@types/node@20.16.10)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))) astro: specifier: 4.16.7 - version: 4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4) + version: 4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4) astro-og-canvas: specifier: 0.5.3 - version: 0.5.3(astro@4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4)) + version: 0.5.3(astro@4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4)) autoprefixer: specifier: 10.4.20 version: 10.4.20(postcss@8.4.47) @@ -163,7 +163,7 @@ importers: version: 5.4.10(@types/node@20.16.10)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47)) vite-plugin-svgr: specifier: 4.2.0 - version: 4.2.0(rollup@4.21.2)(typescript@5.5.4)(vite@5.4.10(@types/node@20.16.10)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))) + version: 4.2.0(rollup@4.24.3)(typescript@5.5.4)(vite@5.4.10(@types/node@20.16.10)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))) packages: @@ -243,6 +243,10 @@ packages: resolution: {integrity: sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==} engines: {node: '>=6.9.0'} + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} + engines: {node: '>=6.9.0'} + '@babel/compat-data@7.25.2': resolution: {integrity: sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==} engines: {node: '>=6.9.0'} @@ -267,8 +271,12 @@ packages: resolution: {integrity: sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==} engines: {node: '>=6.9.0'} - '@babel/helper-annotate-as-pure@7.25.7': - resolution: {integrity: sha512-4xwU8StnqnlIhhioZf1tqnVWeQ9pvH/ujS8hRfw/WOza+/a+1qv69BWNy+oY231maTCWgKWhfBU7kDpsds6zAA==} + '@babel/generator@7.26.2': + resolution: {integrity: sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-annotate-as-pure@7.25.9': + resolution: {integrity: sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==} engines: {node: '>=6.9.0'} '@babel/helper-compilation-targets@7.25.2': @@ -283,6 +291,10 @@ packages: resolution: {integrity: sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==} engines: {node: '>=6.9.0'} + '@babel/helper-module-imports@7.25.9': + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} + engines: {node: '>=6.9.0'} + '@babel/helper-module-transforms@7.25.2': resolution: {integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==} engines: {node: '>=6.9.0'} @@ -299,8 +311,8 @@ packages: resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} engines: {node: '>=6.9.0'} - '@babel/helper-plugin-utils@7.25.7': - resolution: {integrity: sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==} + '@babel/helper-plugin-utils@7.25.9': + resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} engines: {node: '>=6.9.0'} '@babel/helper-simple-access@7.24.7': @@ -315,10 +327,18 @@ packages: resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.25.7': resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.24.8': resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} engines: {node: '>=6.9.0'} @@ -363,8 +383,13 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/plugin-syntax-jsx@7.25.7': - resolution: {integrity: sha512-ruZOnKO+ajVL/MVx+PwNBPOkrnXTXoWMtte1MBpegfCArhqOe3Bj52avVj1huLLxNKYKXYaSxZ2F+woK1ekXfw==} + '@babel/parser@7.26.2': + resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-syntax-jsx@7.25.9': + resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -381,8 +406,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx@7.25.7': - resolution: {integrity: sha512-vILAg5nwGlR9EXE8JIOX4NHXd49lrYbN8hnjffDtoULwpL9hUx/N55nqh2qd0q6FyNDfjl9V79ecKGvFbcSA0Q==} + '@babel/plugin-transform-react-jsx@7.25.9': + resolution: {integrity: sha512-s5XwpQYCqGerXl+Pu6VDL3x0j2d82eiV77UJ8a2mDHAW7j9SWRqQ2y1fNo1Z74CdcYipl5Z41zvjj4Nfzq36rw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -399,6 +424,10 @@ packages: resolution: {integrity: sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==} engines: {node: '>=6.9.0'} + '@babel/template@7.25.9': + resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} + engines: {node: '>=6.9.0'} + '@babel/traverse@7.25.3': resolution: {integrity: sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==} engines: {node: '>=6.9.0'} @@ -407,10 +436,18 @@ packages: resolution: {integrity: sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==} engines: {node: '>=6.9.0'} + '@babel/traverse@7.25.9': + resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} + engines: {node: '>=6.9.0'} + '@babel/types@7.25.8': resolution: {integrity: sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==} engines: {node: '>=6.9.0'} + '@babel/types@7.26.0': + resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} + engines: {node: '>=6.9.0'} + '@biomejs/biome@1.8.3': resolution: {integrity: sha512-/uUV3MV+vyAczO+vKrPdOW0Iaet7UnJMU4bNMinggGJTAnBPjCoLEYcyYtYHNnUNYlv4xZMH6hVIQCAozq8d5w==} engines: {node: '>=14.21.3'} @@ -1095,81 +1132,171 @@ packages: cpu: [arm] os: [android] + '@rollup/rollup-android-arm-eabi@4.24.3': + resolution: {integrity: sha512-ufb2CH2KfBWPJok95frEZZ82LtDl0A6QKTa8MoM+cWwDZvVGl5/jNb79pIhRvAalUu+7LD91VYR0nwRD799HkQ==} + cpu: [arm] + os: [android] + '@rollup/rollup-android-arm64@4.21.2': resolution: {integrity: sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==} cpu: [arm64] os: [android] + '@rollup/rollup-android-arm64@4.24.3': + resolution: {integrity: sha512-iAHpft/eQk9vkWIV5t22V77d90CRofgR2006UiCjHcHJFVI1E0oBkQIAbz+pLtthFw3hWEmVB4ilxGyBf48i2Q==} + cpu: [arm64] + os: [android] + '@rollup/rollup-darwin-arm64@4.21.2': resolution: {integrity: sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==} cpu: [arm64] os: [darwin] + '@rollup/rollup-darwin-arm64@4.24.3': + resolution: {integrity: sha512-QPW2YmkWLlvqmOa2OwrfqLJqkHm7kJCIMq9kOz40Zo9Ipi40kf9ONG5Sz76zszrmIZZ4hgRIkez69YnTHgEz1w==} + cpu: [arm64] + os: [darwin] + '@rollup/rollup-darwin-x64@4.21.2': resolution: {integrity: sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==} cpu: [x64] os: [darwin] + '@rollup/rollup-darwin-x64@4.24.3': + resolution: {integrity: sha512-KO0pN5x3+uZm1ZXeIfDqwcvnQ9UEGN8JX5ufhmgH5Lz4ujjZMAnxQygZAVGemFWn+ZZC0FQopruV4lqmGMshow==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.24.3': + resolution: {integrity: sha512-CsC+ZdIiZCZbBI+aRlWpYJMSWvVssPuWqrDy/zi9YfnatKKSLFCe6fjna1grHuo/nVaHG+kiglpRhyBQYRTK4A==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.24.3': + resolution: {integrity: sha512-F0nqiLThcfKvRQhZEzMIXOQG4EeX61im61VYL1jo4eBxv4aZRmpin6crnBJQ/nWnCsjH5F6J3W6Stdm0mBNqBg==} + cpu: [x64] + os: [freebsd] + '@rollup/rollup-linux-arm-gnueabihf@4.21.2': resolution: {integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-gnueabihf@4.24.3': + resolution: {integrity: sha512-KRSFHyE/RdxQ1CSeOIBVIAxStFC/hnBgVcaiCkQaVC+EYDtTe4X7z5tBkFyRoBgUGtB6Xg6t9t2kulnX6wJc6A==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.21.2': resolution: {integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.24.3': + resolution: {integrity: sha512-h6Q8MT+e05zP5BxEKz0vi0DhthLdrNEnspdLzkoFqGwnmOzakEHSlXfVyA4HJ322QtFy7biUAVFPvIDEDQa6rw==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.21.2': resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.24.3': + resolution: {integrity: sha512-fKElSyXhXIJ9pqiYRqisfirIo2Z5pTTve5K438URf08fsypXrEkVmShkSfM8GJ1aUyvjakT+fn2W7Czlpd/0FQ==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-arm64-musl@4.21.2': resolution: {integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-musl@4.24.3': + resolution: {integrity: sha512-YlddZSUk8G0px9/+V9PVilVDC6ydMz7WquxozToozSnfFK6wa6ne1ATUjUvjin09jp34p84milxlY5ikueoenw==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': resolution: {integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==} cpu: [ppc64] os: [linux] + '@rollup/rollup-linux-powerpc64le-gnu@4.24.3': + resolution: {integrity: sha512-yNaWw+GAO8JjVx3s3cMeG5Esz1cKVzz8PkTJSfYzE5u7A+NvGmbVFEHP+BikTIyYWuz0+DX9kaA3pH9Sqxp69g==} + cpu: [ppc64] + os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.21.2': resolution: {integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==} cpu: [riscv64] os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.24.3': + resolution: {integrity: sha512-lWKNQfsbpv14ZCtM/HkjCTm4oWTKTfxPmr7iPfp3AHSqyoTz5AgLemYkWLwOBWc+XxBbrU9SCokZP0WlBZM9lA==} + cpu: [riscv64] + os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.21.2': resolution: {integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==} cpu: [s390x] os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.24.3': + resolution: {integrity: sha512-HoojGXTC2CgCcq0Woc/dn12wQUlkNyfH0I1ABK4Ni9YXyFQa86Fkt2Q0nqgLfbhkyfQ6003i3qQk9pLh/SpAYw==} + cpu: [s390x] + os: [linux] + '@rollup/rollup-linux-x64-gnu@4.21.2': resolution: {integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==} cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-gnu@4.24.3': + resolution: {integrity: sha512-mnEOh4iE4USSccBOtcrjF5nj+5/zm6NcNhbSEfR3Ot0pxBwvEn5QVUXcuOwwPkapDtGZ6pT02xLoPaNv06w7KQ==} + cpu: [x64] + os: [linux] + '@rollup/rollup-linux-x64-musl@4.21.2': resolution: {integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==} cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-musl@4.24.3': + resolution: {integrity: sha512-rMTzawBPimBQkG9NKpNHvquIUTQPzrnPxPbCY1Xt+mFkW7pshvyIS5kYgcf74goxXOQk0CP3EoOC1zcEezKXhw==} + cpu: [x64] + os: [linux] + '@rollup/rollup-win32-arm64-msvc@4.21.2': resolution: {integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==} cpu: [arm64] os: [win32] + '@rollup/rollup-win32-arm64-msvc@4.24.3': + resolution: {integrity: sha512-2lg1CE305xNvnH3SyiKwPVsTVLCg4TmNCF1z7PSHX2uZY2VbUpdkgAllVoISD7JO7zu+YynpWNSKAtOrX3AiuA==} + cpu: [arm64] + os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.21.2': resolution: {integrity: sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==} cpu: [ia32] os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.24.3': + resolution: {integrity: sha512-9SjYp1sPyxJsPWuhOCX6F4jUMXGbVVd5obVpoVEi8ClZqo52ViZewA6eFz85y8ezuOA+uJMP5A5zo6Oz4S5rVQ==} + cpu: [ia32] + os: [win32] + '@rollup/rollup-win32-x64-msvc@4.21.2': resolution: {integrity: sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==} cpu: [x64] os: [win32] + '@rollup/rollup-win32-x64-msvc@4.24.3': + resolution: {integrity: sha512-HGZgRFFYrMrP3TJlq58nR1xy8zHKId25vhmm5S9jETEfDf6xybPxsavFTJaufe2zgOGYJBskGlj49CwtEuFhWQ==} + cpu: [x64] + os: [win32] + '@shikijs/core@1.22.0': resolution: {integrity: sha512-S8sMe4q71TJAW+qG93s5VaiihujRK6rqDFqBnxqvga/3LvqHEnxqBIOPkt//IdXVtHkQWKu4nOQNk0uBGicU7Q==} @@ -1340,6 +1467,9 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} @@ -2571,8 +2701,8 @@ packages: resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} engines: {node: '>=12'} - is-unicode-supported@2.0.0: - resolution: {integrity: sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==} + is-unicode-supported@2.1.0: + resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} engines: {node: '>=18'} is-utf8@0.2.1: @@ -3639,6 +3769,11 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rollup@4.24.3: + resolution: {integrity: sha512-HBW896xR5HGmoksbi3JBDtmVzWiPAYqp7wip50hjQ67JbDz61nyoMPdqu1DvVW9asYb2M65Z20ZHsyJCMqMyDg==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -4262,12 +4397,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/mdx@3.1.3(astro@4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4))': + '@astrojs/mdx@3.1.3(astro@4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4))': dependencies: '@astrojs/markdown-remark': 5.2.0 '@mdx-js/mdx': 3.0.1 acorn: 8.12.1 - astro: 4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4) + astro: 4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4) es-module-lexer: 1.5.4 estree-util-visit: 2.0.0 github-slugger: 2.0.0 @@ -4283,13 +4418,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/netlify@5.5.3(@opentelemetry/api@1.9.0)(@types/node@20.16.10)(astro@4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4))(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))': + '@astrojs/netlify@5.5.3(@opentelemetry/api@1.9.0)(@types/node@20.16.10)(astro@4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4))(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))': dependencies: '@astrojs/internal-helpers': 0.4.1 '@astrojs/underscore-redirects': 0.3.4 '@netlify/functions': 2.8.0(@opentelemetry/api@1.9.0) '@vercel/nft': 0.27.4 - astro: 4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4) + astro: 4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4) esbuild: 0.21.5 vite: 5.4.10(@types/node@20.16.10)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47)) transitivePeerDependencies: @@ -4332,15 +4467,15 @@ snapshots: stream-replace-string: 2.0.0 zod: 3.23.8 - '@astrojs/starlight@0.26.1(astro@4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4))': + '@astrojs/starlight@0.26.1(astro@4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4))': dependencies: - '@astrojs/mdx': 3.1.3(astro@4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4)) + '@astrojs/mdx': 3.1.3(astro@4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4)) '@astrojs/sitemap': 3.1.6 '@pagefind/default-ui': 1.1.0 '@types/hast': 3.0.4 '@types/mdast': 4.0.4 - astro: 4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4) - astro-expressive-code: 0.35.6(astro@4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4)) + astro: 4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4) + astro-expressive-code: 0.35.6(astro@4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4)) bcp-47: 2.1.0 hast-util-from-html: 2.0.1 hast-util-select: 6.0.2 @@ -4389,6 +4524,12 @@ snapshots: '@babel/highlight': 7.25.7 picocolors: 1.1.0 + '@babel/code-frame@7.26.2': + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.0 + '@babel/compat-data@7.25.2': {} '@babel/compat-data@7.25.8': {} @@ -4447,9 +4588,17 @@ snapshots: '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.0.2 - '@babel/helper-annotate-as-pure@7.25.7': + '@babel/generator@7.26.2': dependencies: - '@babel/types': 7.25.8 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.0.2 + + '@babel/helper-annotate-as-pure@7.25.9': + dependencies: + '@babel/types': 7.26.0 '@babel/helper-compilation-targets@7.25.2': dependencies: @@ -4474,6 +4623,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-module-imports@7.25.9': + dependencies: + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + transitivePeerDependencies: + - supports-color + '@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 @@ -4496,7 +4652,7 @@ snapshots: '@babel/helper-plugin-utils@7.24.8': {} - '@babel/helper-plugin-utils@7.25.7': {} + '@babel/helper-plugin-utils@7.25.9': {} '@babel/helper-simple-access@7.24.7': dependencies: @@ -4514,8 +4670,12 @@ snapshots: '@babel/helper-string-parser@7.25.7': {} + '@babel/helper-string-parser@7.25.9': {} + '@babel/helper-validator-identifier@7.25.7': {} + '@babel/helper-validator-identifier@7.25.9': {} + '@babel/helper-validator-option@7.24.8': {} '@babel/helper-validator-option@7.25.7': {} @@ -4560,10 +4720,14 @@ snapshots: dependencies: '@babel/types': 7.25.8 - '@babel/plugin-syntax-jsx@7.25.7(@babel/core@7.25.8)': + '@babel/parser@7.26.2': + dependencies: + '@babel/types': 7.26.0 + + '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.25.8)': dependencies: '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.25.9 '@babel/plugin-transform-react-jsx-self@7.24.7(@babel/core@7.25.2)': dependencies: @@ -4575,14 +4739,14 @@ snapshots: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.25.8)': dependencies: '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.8) - '@babel/types': 7.25.8 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.25.8) + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color @@ -4602,6 +4766,12 @@ snapshots: '@babel/parser': 7.25.8 '@babel/types': 7.25.8 + '@babel/template@7.25.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 + '@babel/traverse@7.25.3': dependencies: '@babel/code-frame': 7.25.7 @@ -4626,12 +4796,29 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/traverse@7.25.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 + debug: 4.3.7 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + '@babel/types@7.25.8': dependencies: '@babel/helper-string-parser': 7.25.7 '@babel/helper-validator-identifier': 7.25.7 to-fast-properties: 2.0.0 + '@babel/types@7.26.0': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@biomejs/biome@1.8.3': optionalDependencies: '@biomejs/cli-darwin-arm64': 1.8.3 @@ -5318,70 +5505,124 @@ snapshots: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/pluginutils@5.1.0(rollup@4.21.2)': + '@rollup/pluginutils@5.1.0(rollup@4.24.3)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.21.2 + rollup: 4.24.3 - '@rollup/pluginutils@5.1.2(rollup@4.21.2)': + '@rollup/pluginutils@5.1.2(rollup@4.24.3)': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.21.2 + rollup: 4.24.3 '@rollup/rollup-android-arm-eabi@4.21.2': optional: true + '@rollup/rollup-android-arm-eabi@4.24.3': + optional: true + '@rollup/rollup-android-arm64@4.21.2': optional: true + '@rollup/rollup-android-arm64@4.24.3': + optional: true + '@rollup/rollup-darwin-arm64@4.21.2': optional: true + '@rollup/rollup-darwin-arm64@4.24.3': + optional: true + '@rollup/rollup-darwin-x64@4.21.2': optional: true + '@rollup/rollup-darwin-x64@4.24.3': + optional: true + + '@rollup/rollup-freebsd-arm64@4.24.3': + optional: true + + '@rollup/rollup-freebsd-x64@4.24.3': + optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.21.2': optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.24.3': + optional: true + '@rollup/rollup-linux-arm-musleabihf@4.21.2': optional: true + '@rollup/rollup-linux-arm-musleabihf@4.24.3': + optional: true + '@rollup/rollup-linux-arm64-gnu@4.21.2': optional: true + '@rollup/rollup-linux-arm64-gnu@4.24.3': + optional: true + '@rollup/rollup-linux-arm64-musl@4.21.2': optional: true + '@rollup/rollup-linux-arm64-musl@4.24.3': + optional: true + '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': optional: true + '@rollup/rollup-linux-powerpc64le-gnu@4.24.3': + optional: true + '@rollup/rollup-linux-riscv64-gnu@4.21.2': optional: true + '@rollup/rollup-linux-riscv64-gnu@4.24.3': + optional: true + '@rollup/rollup-linux-s390x-gnu@4.21.2': optional: true + '@rollup/rollup-linux-s390x-gnu@4.24.3': + optional: true + '@rollup/rollup-linux-x64-gnu@4.21.2': optional: true + '@rollup/rollup-linux-x64-gnu@4.24.3': + optional: true + '@rollup/rollup-linux-x64-musl@4.21.2': optional: true + '@rollup/rollup-linux-x64-musl@4.24.3': + optional: true + '@rollup/rollup-win32-arm64-msvc@4.21.2': optional: true + '@rollup/rollup-win32-arm64-msvc@4.24.3': + optional: true + '@rollup/rollup-win32-ia32-msvc@4.21.2': optional: true + '@rollup/rollup-win32-ia32-msvc@4.24.3': + optional: true + '@rollup/rollup-win32-x64-msvc@4.21.2': optional: true + '@rollup/rollup-win32-x64-msvc@4.24.3': + optional: true + '@shikijs/core@1.22.0': dependencies: '@shikijs/engine-javascript': 1.22.0 @@ -5644,6 +5885,8 @@ snapshots: '@types/estree@1.0.5': {} + '@types/estree@1.0.6': {} + '@types/hast@3.0.4': dependencies: '@types/unist': 3.0.2 @@ -5730,8 +5973,8 @@ snapshots: dependencies: '@mapbox/node-pre-gyp': 1.0.11 '@rollup/pluginutils': 4.2.1 - acorn: 8.12.1 - acorn-import-attributes: 1.9.5(acorn@8.12.1) + acorn: 8.13.0 + acorn-import-attributes: 1.9.5(acorn@8.13.0) async-sema: 3.1.1 bindings: 1.5.0 estree-walker: 2.0.2 @@ -5759,9 +6002,9 @@ snapshots: abbrev@1.1.1: {} - acorn-import-attributes@1.9.5(acorn@8.12.1): + acorn-import-attributes@1.9.5(acorn@8.13.0): dependencies: - acorn: 8.12.1 + acorn: 8.13.0 acorn-jsx@5.3.2(acorn@8.12.1): dependencies: @@ -5833,29 +6076,29 @@ snapshots: astring@1.8.6: {} - astro-expressive-code@0.35.6(astro@4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4)): + astro-expressive-code@0.35.6(astro@4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4)): dependencies: - astro: 4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4) + astro: 4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4) rehype-expressive-code: 0.35.6 - astro-og-canvas@0.5.3(astro@4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4)): + astro-og-canvas@0.5.3(astro@4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4)): dependencies: - astro: 4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4) + astro: 4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4) canvaskit-wasm: 0.39.1 deterministic-object-hash: 2.0.2 entities: 4.5.0 - astro@4.16.7(@types/node@20.16.10)(rollup@4.21.2)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4): + astro@4.16.7(@types/node@20.16.10)(rollup@4.24.3)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))(typescript@5.5.4): dependencies: '@astrojs/compiler': 2.10.3 '@astrojs/internal-helpers': 0.4.1 '@astrojs/markdown-remark': 5.3.0 '@astrojs/telemetry': 3.1.0 '@babel/core': 7.25.8 - '@babel/plugin-transform-react-jsx': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.25.8) '@babel/types': 7.25.8 '@oslojs/encoding': 1.1.0 - '@rollup/pluginutils': 5.1.2(rollup@4.21.2) + '@rollup/pluginutils': 5.1.2(rollup@4.24.3) '@types/babel__core': 7.20.5 '@types/cookie': 0.6.0 acorn: 8.13.0 @@ -6109,7 +6352,7 @@ snapshots: code-red@1.0.4: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 acorn: 8.13.0 estree-walker: 3.0.3 periscopic: 3.1.0 @@ -6982,8 +7225,8 @@ snapshots: import-in-the-middle@1.8.1: dependencies: - acorn: 8.12.1 - acorn-import-attributes: 1.9.5(acorn@8.12.1) + acorn: 8.13.0 + acorn-import-attributes: 1.9.5(acorn@8.13.0) cjs-module-lexer: 1.3.1 module-details-from-path: 1.0.3 @@ -7073,7 +7316,7 @@ snapshots: is-unicode-supported@1.3.0: {} - is-unicode-supported@2.0.0: {} + is-unicode-supported@2.1.0: {} is-utf8@0.2.1: {} @@ -8154,7 +8397,7 @@ snapshots: cli-cursor: 5.0.0 cli-spinners: 2.9.2 is-interactive: 2.0.0 - is-unicode-supported: 2.0.0 + is-unicode-supported: 2.1.0 log-symbols: 6.0.0 stdin-discarder: 0.2.2 string-width: 7.2.0 @@ -8730,6 +8973,31 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.21.2 fsevents: 2.3.3 + rollup@4.24.3: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.24.3 + '@rollup/rollup-android-arm64': 4.24.3 + '@rollup/rollup-darwin-arm64': 4.24.3 + '@rollup/rollup-darwin-x64': 4.24.3 + '@rollup/rollup-freebsd-arm64': 4.24.3 + '@rollup/rollup-freebsd-x64': 4.24.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.3 + '@rollup/rollup-linux-arm-musleabihf': 4.24.3 + '@rollup/rollup-linux-arm64-gnu': 4.24.3 + '@rollup/rollup-linux-arm64-musl': 4.24.3 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.3 + '@rollup/rollup-linux-riscv64-gnu': 4.24.3 + '@rollup/rollup-linux-s390x-gnu': 4.24.3 + '@rollup/rollup-linux-x64-gnu': 4.24.3 + '@rollup/rollup-linux-x64-musl': 4.24.3 + '@rollup/rollup-win32-arm64-msvc': 4.24.3 + '@rollup/rollup-win32-ia32-msvc': 4.24.3 + '@rollup/rollup-win32-x64-msvc': 4.24.3 + fsevents: 2.3.3 + optional: true + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 @@ -8963,7 +9231,7 @@ snapshots: '@ampproject/remapping': 2.3.0 '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 acorn: 8.13.0 aria-query: 5.3.2 axobject-query: 4.1.0 @@ -9275,9 +9543,9 @@ snapshots: '@types/unist': 3.0.2 vfile-message: 4.0.2 - vite-plugin-svgr@4.2.0(rollup@4.21.2)(typescript@5.5.4)(vite@5.4.10(@types/node@20.16.10)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))): + vite-plugin-svgr@4.2.0(rollup@4.24.3)(typescript@5.5.4)(vite@5.4.10(@types/node@20.16.10)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47))): dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.21.2) + '@rollup/pluginutils': 5.1.0(rollup@4.24.3) '@svgr/core': 8.1.0(typescript@5.5.4) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.5.4)) vite: 5.4.10(@types/node@20.16.10)(sass@1.77.8)(sugarss@4.0.1(postcss@8.4.47)) diff --git a/src/content/docs/assist/index.mdx b/src/content/docs/assist/index.mdx index 6f0780bf3..ab6c9a7ac 100644 --- a/src/content/docs/assist/index.mdx +++ b/src/content/docs/assist/index.mdx @@ -3,4 +3,12 @@ title: Assist description: Learn about Biome assist --- -Biome assist offers a series of actions that users can opt-in to \ No newline at end of file +import NumberOfRules from "@/components/generated/assist/NumberOfrules.astro"; + +Biome assist offers a series of actions (or rules) meant to improve code quality and DX of the users. + +Contrary to linter rules, assist actions are meant for editors and IDEs, and they can include things like sorting of properties or fields, simplification of binary expressions and more. The assist has **[ actions](/assist/actions)**. + +Assist actions are very close [LSP code actions](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionKind) in semantics. + + diff --git a/src/content/docs/ja/reference/configuration.mdx b/src/content/docs/ja/reference/configuration.mdx index 0b27e0905..2553b65dc 100644 --- a/src/content/docs/ja/reference/configuration.mdx +++ b/src/content/docs/ja/reference/configuration.mdx @@ -3,7 +3,7 @@ title: 設定 description: biome.jsonを使用してBiomeをカスタマイズおよび設定する方法 --- -import LintGroups from "@/components/generated/Groups.astro"; +import LintGroups from "@/components/generated/linter/Groups.astro"; {/** 設定のタイトルを変更する際は、static/_redirects 内のリダイレクトも忘れずに更新してください。 --> **/} @@ -387,11 +387,11 @@ Unixシェル形式のパターンのリストで指定します。 このオプションは廃止されました。代わりに [`formatter.indentWidth`](#formatterindentwidth) を使用してください。
    -廃止されました + 廃止されました -インデントのサイズを指定します。 + インデントのサイズを指定します。 -> デフォルト: `2` + > デフォルト: `2`
    @@ -527,14 +527,14 @@ JSXの文字列リテラルを表現する際に使用する引用符の種類 このオプションは廃止されました。代わりに [`javascript.formatter.trailingCommas`](#javascriptformattertrailingcommas) を使用してください。
    -廃止されました + 廃止されました -複数行のカンマ区切りの構文構造で、可能な限り末尾カンマを追加します。可能な値は次の通りです。 -- `"all"`: 末尾カンマが常に追加されます。 -- `"es5"`: 末尾カンマが、古いバージョンのJavaScriptでサポートされている場所にのみ追加されます。 -- `"none"`: 末尾カンマは決して追加されません。 + 複数行のカンマ区切りの構文構造で、可能な限り末尾カンマを追加します。可能な値は次の通りです。 + - `"all"`: 末尾カンマが常に追加されます。 + - `"es5"`: 末尾カンマが、古いバージョンのJavaScriptでサポートされている場所にのみ追加されます。 + - `"none"`: 末尾カンマは決して追加されません。 -> デフォルト: `"all"` + > デフォルト: `"all"`
    @@ -593,11 +593,11 @@ JavaScript(およびその拡張言語)ファイルのインデントスタ このオプションは廃止されました。代わりに [`javascript.formatter.indentWidth`](#javascriptformatterindentwidth) を使用してください。
    -廃止されました + 廃止されました -JavaScript(およびその拡張言語)ファイルのインデントサイズを指定します。 + JavaScript(およびその拡張言語)ファイルのインデントサイズを指定します。 -> デフォルト: `2` + > デフォルト: `2`
    @@ -741,11 +741,11 @@ JSON(およびその拡張言語)ファイルのインデントスタイル このオプションは廃止されました。代わりに [`json.formatter.indentWidth`](#jsonformatterindentwidth) を使用してください。
    -廃止されました + 廃止されました -JSON(およびその拡張言語)ファイルのインデントサイズを指定します。 + JSON(およびその拡張言語)ファイルのインデントサイズを指定します。 -> デフォルト: `2` + > デフォルト: `2`
    diff --git a/src/content/docs/reference/configuration.mdx b/src/content/docs/reference/configuration.mdx index f4541e431..36b3e3812 100644 --- a/src/content/docs/reference/configuration.mdx +++ b/src/content/docs/reference/configuration.mdx @@ -3,7 +3,7 @@ title: Configuration description: How to customize and configure Biome with biome.json. --- -import LintGroups from "@/components/generated/Groups.astro"; +import LintGroups from "@/components/generated/linter/Groups.astro"; {/** Make sure to update the redirect in `static/_redirects` when changing the configuration title --> **/} @@ -388,11 +388,11 @@ The style of the indentation. It can be `"tab"` or `"space"`. This option is deprecated, please use [`formatter.indentWidth`](#formatterindentwidth) instead.
    -Deprecated + Deprecated -How big the indentation should be. + How big the indentation should be. -> Default: `2` + > Default: `2`
    @@ -538,14 +538,14 @@ When properties inside objects should be quoted. It can be `"asNeeded"` or `"pre This option is deprecated, please use [`javascript.formatter.trailingCommas`](#javascriptformattertrailingcommas) instead.
    -Deprecated + Deprecated -Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Possible values: -- `"all"`, the trailing comma is always added; -- `"es5"`, the trailing comma is added only in places where it's supported by older version of JavaScript; -- `"none"`, trailing commas are never added. + Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Possible values: + - `"all"`, the trailing comma is always added; + - `"es5"`, the trailing comma is added only in places where it's supported by older version of JavaScript; + - `"none"`, trailing commas are never added. -> Default: `"all"` + > Default: `"all"`
    @@ -605,11 +605,11 @@ The style of the indentation for JavaScript (and its super languages) files. It This option is deprecated, please use [`javascript.formatter.indentWidth`](#javascriptformatterindentwidth) instead.
    -Deprecated + Deprecated -How big the indentation should be for JavaScript (and its super languages) files. + How big the indentation should be for JavaScript (and its super languages) files. -> Default: `2` + > Default: `2`
    @@ -671,10 +671,10 @@ A list of global names that Biome should ignore (analyzer, linter, etc.) Indicates the type of runtime or transformation used for interpreting JSX. - `"transparent"` — Indicates a modern or native JSX environment, that - doesn't require special handling by Biome. +doesn't require special handling by Biome. - `"reactClassic"` — Indicates a classic React environment that requires - the `React` import. Corresponds to the `react` value for the - `jsx` option in TypeScript's [`tsconfig.json`](https://www.typescriptlang.org/tsconfig#jsx). +the `React` import. Corresponds to the `react` value for the +`jsx` option in TypeScript's [`tsconfig.json`](https://www.typescriptlang.org/tsconfig#jsx). ```json title="biome.json" { @@ -750,11 +750,11 @@ The style of the indentation for JSON (and its super languages) files. It can be This option is deprecated, please use [`json.formatter.indentWidth`](#jsonformatterindentwidth) instead.
    -Deprecated + Deprecated -How big the indentation should be for JSON (and its super languages) files. + How big the indentation should be for JSON (and its super languages) files. -> Default: `2` + > Default: `2`
    diff --git a/src/content/docs/zh-cn/reference/configuration.mdx b/src/content/docs/zh-cn/reference/configuration.mdx index 3a2c64ad4..0a70dbb7f 100644 --- a/src/content/docs/zh-cn/reference/configuration.mdx +++ b/src/content/docs/zh-cn/reference/configuration.mdx @@ -5,7 +5,7 @@ category: 参考 description: 如何使用biome.json自定义和配置Biome。 --- -import LintGroups from "@/components/generated/Groups.astro"; +import LintGroups from "@/components/generated/linter/Groups.astro"; {/* * 当更改配置标题时,请确保更新 `static/_redirects` 中的重定向 * */}