diff --git a/src/content/docs/guides/configure-biome.mdx b/src/content/docs/guides/configure-biome.mdx index d6882a396..f6a30a2be 100644 --- a/src/content/docs/guides/configure-biome.mdx +++ b/src/content/docs/guides/configure-biome.mdx @@ -101,9 +101,8 @@ Here's an example: - Biome commands that run in `app/frontend/legacy/package.json` and `app/frontend/new/package.json` will use the configuration file `app/frontend/biome.json`; -:::caution -Biome doesn't yet support nested `biome.json` files, neither in CLI nor in LSP. -[Follow and help the support in the related issue](https://github.com/biomejs/biome/issues/2228) +:::note +Please refer [Monorepo](/guides/big-projects#monorepo) if you want to use Biome in a monorepo project. ::: @@ -206,7 +205,7 @@ and use the negated patterns, using the leading `!`. Before listing the negated globs, **they must be preceded by the `**` pattern**. -In the following example, we tell Biome to include files, excluded the `dist` directory, and all files that have `.generated.js` in their name +In the following example, we tell Biome to include files, excluded the `dist` directory, and all files that have `.generated.js` in their name: ```json title="biome.json" { diff --git a/src/content/docs/ja/guides/big-projects.mdx b/src/content/docs/ja/guides/big-projects.mdx index 31d9b115c..abbbbd4fc 100644 --- a/src/content/docs/ja/guides/big-projects.mdx +++ b/src/content/docs/ja/guides/big-projects.mdx @@ -3,7 +3,7 @@ title: 大規模プロジェクトでのBiomeの使用方法 description: 大規模プロジェクトでBiomeを使用するための簡単なガイド --- -import {FileTree} from '@astrojs/starlight/components'; +import {FileTree, Steps} from '@astrojs/starlight/components'; Biomeは、モノレポや複数のプロジェクトを含むワークスペースなどの大規模なプロジェクトで、適切に使用するためのツールを提供しています。 @@ -98,30 +98,81 @@ Biomeの機能をCLIやLSPで使用する場合、ツールは現在の作業デ モノレポは、複数のライブラリを単一の大きなリポジトリに保存して管理されるリポジトリです。それぞれのライブラリは独立したプロジェクトであり、異なる構成を持つことがあります。 -Biomeはネストされた設定ファイルの解決においていくらかの制限があり、モノレポを適切にサポートしていません。[関連したIssueを手伝い、フォロー](https://github.com/biomejs/biome/issues/2228)してください。 - -現在の制限の下でより良い開発者体験を実現するには、モノレポのルートに `biome.json` を配置し、[`overrides`](/reference/configuration/#overrides) 設定を使っていくつかのパッケージでBiomeの動作を変更することを推奨しています。 - -以下の例では、パッケージ `packages/logger` の中ではルール `suspecious/noConsoleLog` を無効化しています。 - -```json title="biome.jsonc" - -{ - "linter": { - "enabled": true, - "rules": { - "recommended": true +v2以降では、Biomeはモノレポをサポートしており、以下のようにプロジェクトを準備する必要があります: + + +1. モノレポのルートに `biome.json` ファイルを作成します。推奨されたルールを使い、フォーマッタのオプションをカスタマイズします。: + + ```json title="biome.json" + { + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + }, + "formatter": { + "lineWidth": 120, + "indentStyle": "space", + "indentWidth": 6, + } } - }, - "overrides": [{ - "include": ["packages/logger/**"], - "linter": { - "rules": { - "suspicious": { - "noConsoleLog": "off" - } + ``` + このファイルは**ルートの設定**と呼ばれ、プロジェクト内の基本的なオプションを設定します。ただし、ネストされた設定はこれらのオプションに従うかどうかを決めることができます。見てみましょう。 + +2. 必要な各パッケージに一つずつ、ネストされた設定ファイルを作成します。これらのネストされた設定ファイルは `"root"` フィールドを `false` にしている必要があります。 + していない場合はエラーになります。 + 加えて、これらのパッケージはルートの設定で指定したフォーマットの標準に従うようにしましょう。 + そのために、Biome v2 で追加された**新しいマイクロ構文**である `"extends": "//"` を利用します。 + この構文はネストされた設定がどこにあるかに関わらず、**ルートの設定**を継承するようBiomeに指示します。 + + 一つは `packages/logger` の中に、もう一つは `packages/generate` の中に、合わせて二つの設定ファイルを作成しましょう。 + 前者では `noConsole` を無効化し、 `packages/generate` ではコード生成されたファイルのフォーマッタを無効化します: + + ```json title="packages/logger/biome.json" + { + "root": false, + "extends": "//", + "linter": { + "rules": { + "suspicious": { + "noConsole": "off" + } + } } - } - }] -} -``` + } + ``` + + ```json title="packages/generate/biome.json" + { + "root": false, + "extends": "//", + "formatter": { + "enabled": false + } + } + ``` + しかし、 `extends: "//"` のマイクロ構文を使うときは、この設定はルートの設定ではなく、ルートの設定を継承することが明らかなので、 `"root": false` を**省略**できます: + + ```diff title="packages/generate/biome.json" + { + - "root": false, + "extends": "//", + "formatter": { + "enabled": false + } + ``` +3. ここで、とても異なるコーディング標準を持った別のチームによって、`packages/analytics` に新しいパッケージが追加されたと仮定しましょう。 + これらのオプションを変更するには、設定ファイルから `"extends": "//"` を省略して、フォーマットのオプションを変更するだけです: + ```json title="packages/analytics/biome.json" + { + "root": false, + "formatter": { + "lineWidth": 100, + } + } + + ``` +4. これですべての準備は整いました。`biome` コマンドをプロジェクトのルートから実行することも、単一のパッケージから実行することもできます。 + Biomeはすべての設定に従います! + diff --git a/src/content/docs/ja/guides/configure-biome.mdx b/src/content/docs/ja/guides/configure-biome.mdx index e3cc7a6a9..13595ef41 100644 --- a/src/content/docs/ja/guides/configure-biome.mdx +++ b/src/content/docs/ja/guides/configure-biome.mdx @@ -80,16 +80,16 @@ Biomeは最も近い設定ファイルを見つけるために自動探索を利 以下は例です: -- app - - backend +- app/ + - backend/ - biome.json - package.json - - frontend - - biome.json - - legacy + - frontend/ + - legacy/ - package.json - - new + - new/ - package.json + - biome.json @@ -97,75 +97,26 @@ Biomeは最も近い設定ファイルを見つけるために自動探索を利 - `app/frontend/legacy/package.json` または `app/frontend/new/package.json` で実行されたBiomeのコマンドは `app/frontend/biome.json` の設定ファイルを使います -:::caution -BiomeはCLIとLSPのいずれにおいてもネストされた `biome.json` ファイルをサポートしていません。[関連するIssueをフォローして手伝ってください](https://github.com/biomejs/biome/issues/2228). -::: - :::note -Biomeのコマンドは `--config-path` オプションと `BIOME_CONFIG_PATH` 環境変数の利用をサポートしています。 -カスタムの設定ファイル、もしくは `biome.json` や `biome.jsonc` ファイルを見つけるためのディレクトリを指定できます。 -`--config-path` または `BIOME_CONFIG_PATH` を使う場合、標準的な設定ファイルの解決は**無効になります**。 - -`--config-path` または `BIOME_CONFIG_PATH` がファイルを直接参照する場合、`biome.json` と `biome.jsonc` 以外の名前を使えます。 -Biomeは `.json` ファイルを標準的なJSONパーサで読み込みます。 -他の拡張子を持つファイルについては、Biomeは `.jsonc` ファイルとして扱い、コメントや末尾のカンマを許容するより柔軟なJSONパーサを使います。 +モノレポのプロジェクトでBiomeを使用する場合は、[モノレポ](/ja/guides/big-projects#モノレポ)を参照してください。 ::: +# 処理するファイルを指定する -## 設定ファイルの共有 - -`extends` フィールドは設定を複数のファイルに分割することを可能にします。 -この方法により、異なるプロジェクトやフォルダとの間で共通の設定を共有できます。 - -以下は `common.json` 設定ファイルを継承した設定を行う方法を示した例です: - -```json title="biome.json" -{ - "extends": ["./common.json"] -} -``` - -`extends` に定義されたエントリは `biome.json` ファイルの定義されたパスから解決されます。 -記載された順に処理され、後に記載されたファイルの設定がその前の設定を上書きします。 +CLI、設定、またはVCSを使用して、処理するファイルおよびフォルダを制御できます。 -Biomeは `node_modules/` ディレクトリから設定ファイルを解決できます。 -従って、パッケージから設定ファイルをエクスポートして、複数のプロジェクトでそれをインポートできます。 - -そのようにするためには、まず "共有された" Biomeの設定を作成する必要があります。 -パッケージ `@org/shared-configs` から設定ファイルを指定子 `@org/shared-configs/biome` で共有することを考えましょう。 -このパッケージの `package.json` に `exports` エントリを作成する必要があります: - -```json title="package.json" ins={5,3} -{ - "name": "@org/shared-configs", - "type": "module", - "exports": { - "./biome": "./biome.json" - } -} -``` -`@org/shared-configs` がプロジェクトに正しくインストールされていることを確認し、`biome.json` を以下の例のように更新します: - -```json title="biome.json" -{ - "extends": ["@org/shared-configs/biome"] -} -``` -Biomeは `@org/shared-configs/` を作業ディレクトリから **解決** しようとします。 -作業ディレクトリは: - -- CLIを利用している場合、スクリプトを実行するディレクトリです。 - 一般的にこれは `package.json` ファイルの場所と同じです -- LSPを利用している場合、プロジェクトのルートディレクトリです +:::note +デフォルトでは、Biomeは**保護されたファイル**と呼ばれるファイルを常に無視します。 +つまり、これらのファイルに対してはBiomeが診断結果を出力することはありません。 +現時点では、以下のファイルが保護されています: -:::caution -どのように解決されるかの破壊的な変更を防ぐために、ドット `.` で始まるパスと `.json` または `.jsonc` で終わるパスは `node_modules/` から解決**されません**。 +- `composer.lock` +- `npm-shrinkwrap.json` +- `package-lock.json` +- `yarn.lock` ::: -解決アルゴリズムの詳細な情報については、[Node.jsのドキュメント](https://nodejs.org/api/esm.html#resolution-and-loading-algorithm)を参照してください。 - - -## ファイルを無視する +## CLIでファイルを含める Biomeが処理するファイルまたはディレクトリを制御する最初の方法は、それらをCLIで列挙することです。 以下のコマンドでは、 `file1.js` および `src` ディレクトリ内のすべてのファイルのみをフォーマットします。 @@ -180,34 +131,30 @@ biome format file1.js src/ いくつかのシェルは再帰的なglob `**` をサポートしていません。 ::: +### 設定でファイルを制御する + Biomeの設定ファイルはどのファイルが処理されるかを調整するのに利用できます。 -`include` で処理するファイルを明示的に列挙し、`ignore` を使用して処理しないファイルを列挙できます。 -`include` と `ignore` は `src/**/*.js` などのglobパターンを受け入れます。 -どのglob文法がサポートされているかについては[関連するセクション](#glob文法の説明)を参照してください。 -`include` は常に `ignore` よりも先に適用されます。 -これにより、一部のファイルを含めたり、含めたファイルの一部を無視したりできます。 +[`files.includes` フィールド](/ja/reference/configuration)を使用して、処理するファイルを明示的に指定できます。 +`files.includes` は `src/**/*.js` のような[globパターン](/ja/reference/configuration#glob文法の説明)を受け入れます。 `!` で始まる否定パターンはファイルを除外するのに使用できます。 -:::note -`include` と `ignore` は少し違うセマンティクスを持ちます。 -`include` はBiomeがフォルダを探索するのを妨げません。 -従って、Biomeがフォルダを探索するのを防ぎたい場合は、フォルダを `ignore` に追加する必要があります。 -::: +Biome設定ファイル内のパスとglobは設定ファイルのあるフォルダから相対的に解決されます。 +ただし、設定ファイルが他の設定に[継承](#設定でファイルを制御する)されている場合は例外です。 -Biomeは、すべてのツールに適用されるグローバルな `files.include` および `files.ignore` フィールドを提供します。 -`.include` および `.ignore` によって、ツールレベルでファイルを含めたり無視したりすることもできます。 -これらはグローバルな `files.include` および `files.ignore` を上書きしないことに注意してください。 -`files.include` および `files.ignore` は、ツールの `include` および `ignore` よりも先に適用されます。 +`files.includes` はすべてのBiomeツールに適用され、他に指定のない限り、ここで指定されたファイルはリンタ、フォーマッタ、アシストによって処理されます。 +個別のツールについては、 `.includes` を使用して一致するファイルを調整できます。 -次のような設定を考えます: + +#### 設定でファイルを含める + +`src/` フォルダと `test/` フォルダの中にあるJavaScriptファイル (`.js`) のみを含め、名前に `.min.js` を含むファイルを無視するには、以下の設定を使用します: ```json title="biome.json" { "files": { - "include": ["src/**/*.js", "test/**/*.js"], - "ignore": ["**/*.min.js"] + "includes": ["src/**/*.js", "test/**/*.js", "!**/*.min.js"] }, "linter": { - "ignore": ["test"] + "includes": ["!test/**"] } } ``` @@ -219,6 +166,7 @@ biome format test/ ``` このコマンドは、`test` ディレクトリにおいて `.js` 拡張子で終わり `.min.js` 拡張子で終わらないファイルをフォーマットします。 + ディレクトリがCLIで列挙されていないため、`src` 内のファイルはフォーマットされません。 次のコマンドを実行すると、`test` ディレクトリはリンタに対して明示的に無視されているため、ファイルはリントされません。 @@ -227,71 +175,36 @@ biome format test/ biome lint test/ ``` -Biomeは、作業ディレクトリから相対的にglobを解決します。 -作業ディレクトリは通常、CLIコマンドを実行するディレクトリです。 -つまり、設定ファイルがコマンドを実行するのとは別のディレクトリに配置されている場合は、**特に注意**する必要があります。 -エディタ(LSP)の場合、作業ディレクトリはプロジェクトのルートディレクトリです。 +:::caution +グローバルな `files.includes` は、より詳細な `.includes` フィールドとは少し違ったセマンティクスを持ちます。 +`files.includes` に一致しないファイルとフォルダは、いずれのBiomeツールからも除外されます。 +`files.includes` に一致しないファイルは、ツール固有の `includes` フィールドにも一致しません。 +::: -2つのディレクトリ `backend/` と `frontend/` と、先ほど紹介したBiomeの設定ファイルを含むプロジェクトを考えてみましょう。 -`frontend/` ディレクトリ内では、`package.json` がBiomeのフォーマッタを実行する `format` スクリプトを指定します。 +#### 設定でファイルを除外する - -- backend - - ... -- biome.json -- frontend - - package.json - - src - - ... - - test - - ... - +Biomeによって処理されるファイルやフォルダを除外したい場合は、 `files.includes` の設定と `!` で始まる否定パターンを使用できます。 -```json title="frontend/package.json" -{ - "name": "frontend-project", - "scripts": { - "format": "biome format --write ./" - } -} -``` +否定されたglobを列挙するよりも前に、 **`**` パターンを置く必要があります**。 -`frontend/package.json` からスクリプト `format` を実行すると、そのスクリプトにおける作業ディレクトリは `frontend/` になります。 -`src/**/*.js` と `test/**/*.js` のglobは、`frontend/` を "ベース" ディレクトリとします。 -従って、`frontend/src/` と `frontend/test/` のファイルのみがフォーマットされます。 +次の例では、ファイルを含め、 `dist` ディレクトリと `.generated.js` を名前に含むすべてのファイルを除外するようBiomeに指示します: ```json title="biome.json" { "files": { - "include": ["src/**/*.js", "src/**/*.ts"], - "ignore": ["test"] - }, - "formatter": { - "indentStyle": "space" + "includes": [ + "**", + "!**/dist/**", + "!**/*.generated.js" + ] } } ``` -:::caution -`overrides` 内の `ignore` と `include` は**異なる**セマンティクスを持ちます: -- `ignore` の場合: ファイルがglobにマッチする場合、このオーバライド内の設定を**_適用しない_**で、次のオーバライドを適用します。 -- `include` の場合: ファイルがglobにマッチする場合、このオーバライド内の設定を**適用**し、次のオーバライドを適用します。 -::: -:::note -デフォルトでは、Biomeは**保護されたファイル**と呼ばれるファイルを常に無視します。 -つまり、これらのファイルに対してはBiomeが診断結果を出力することはありません。 -現時点では、以下のファイルが保護されています: +### VCSでファイルを制御する -- `composer.lock` -- `npm-shrinkwrap.json` -- `package-lock.json` -- `yarn.lock` -::: - -:::note [VCSで無視されたファイルを無視する](/guides/integrate-in-vcs#use-the-ignore-file)こともできます。 -::: ## 既知のファイル @@ -349,33 +262,111 @@ Biomeは、作業ディレクトリから相対的にglobを解決します。 - `typescript.json` -## Glob文法の説明 +## 設定ファイルの共有 -globパターンはファイル名の集合を指定します。 -Biomeは次のglobをサポートしています: +`extends` フィールドは設定を複数のファイルに分割することを可能にします。 +この方法により、異なるプロジェクトやフォルダとの間で共通の設定を共有できます。 -- `*` は0個以上の文字にマッチします。パス区切り文字 `/` にはマッチしません。 -- `**` はディレクトリとファイルに対して再帰的にマッチします。 - このシーケンスは単一のパスコンポーネント**でなければなりません**。 - したがって、`**a` と `b**` はどちらも無効であり、エラーになります。 - 連続する `*` 文字が2つ以上続くシーケンスも無効です。 -- `[...]` は括弧内の任意の文字にマッチします。 - Unicodeの順序による文字の範囲も指定できます。 - 例えば、`[0-9]` は0から9までの任意の文字を指定します。 -- `[!...]` は `[...]` の否定です。つまり、括弧内に**含まれない**任意の文字に一致します。 +以下は `common.json` 設定ファイルを継承した設定を行う方法を示した例です: -いくつかの例です: +```json title="biome.json" +{ + "extends": ["./common.json"] +} +``` + +`extends` に定義されたエントリは `biome.json` ファイルの定義されたパスから解決されます。 +記載された順に処理され、後に記載されたファイルの設定がその前の設定を上書きします。 -- `dist/**` は、distディレクトリと、その中のすべてのファイルにマッチします。 -- `**/test/**` は、場所に関係なく、`test` という名前のディレクトリの下にあるすべてのファイルにマッチします。例: `dist/test`、`src/test`。 -- `**/*.js` は、すべてのディレクトリ内の拡張子 `.js` で終わるすべてのファイルにマッチします。 +Files that you `extend` from cannot `extend` other files in turn. -Biomeが利用するglobライブラリは、すべてのglobが `**/` 接頭辞を持つものとして扱います。 -つまり、`src/**/*.js` と `**/src/**/*.js` は同一として扱われます。 -これらは `src/file.js` と `test/src/file.js` の両方にマッチします。 +Note that paths in a configuration file are always resolved from the folder in +which the `biome.json`/`biome.jsonc` file resides. When using the `extends` +field, this means that paths in a shared configuration are interpreted from the +location of the configuration that is extending it, and not from the folder +of the file being extended. + +For example, let's assume a project that contains two directories `backend/` and +`frontend/`, each having their own `biome.json` that both extend a `common.json` +configuration in the root folder: + + +- backend/ + - src/ + - ... + - test/ + - ... + - biome.json +- frontend/ + - src/ + - ... + - test/ + - ... + - biome.json +- common.json + + +```json title="common.json" +{ + "files": { + "includes": ["src/**/*.js", "test/**/*.js"], + }, + "linter": { + "includes": ["!test/**"] + } +} +``` + +```json title="frontend/biome.json" +{ + "extends": ["../common.json"] +} +``` + +* When running Biome from the `frontend/` folder, it will be configured to + format and lint all JavaScript files in the `frontend/src/` and + `frontend/test/` folders, and only format the files in the `frontend/src/` + folder. This works because the paths specified in `common.json` are + interpreted from the `frontend/` folder, because that's where the `biome.json` + file resides. +* Assuming `backend/biome.json` looks the same as `frontend/biome.json`, it will + have the same behaviour, except the paths will be interpreted from the + `backend/` folder. + +### NPMパッケージからBiomeの設定をエクスポートする + +Biomeは `node_modules/` ディレクトリから設定ファイルを解決できます。 +従って、パッケージから設定ファイルをエクスポートして、複数のプロジェクトでそれをインポートできます。 + +そのようにするためには、まず "共有された" Biomeの設定を作成する必要があります。 +パッケージ `@org/shared-configs` から設定ファイルを指定子 `@org/shared-configs/biome` で共有することを考えましょう。 +このパッケージの `package.json` に `exports` エントリを作成する必要があります: + +```json title="package.json" ins={5,3} +{ + "name": "@org/shared-configs", + "type": "module", + "exports": { + "./biome": "./biome.json" + } +} +``` +`@org/shared-configs` がプロジェクトに正しくインストールされていることを確認し、`biome.json` を以下の例のように更新します: + +```json title="biome.json" +{ + "extends": ["@org/shared-configs/biome"] +} +``` +Biomeは `@org/shared-configs/` を作業ディレクトリから **解決** しようとします。 +作業ディレクトリは: + +- CLIを利用している場合、スクリプトを実行するディレクトリです。 + 一般的にこれは `package.json` ファイルの場所と同じです +- LSPを利用している場合、プロジェクトのルートディレクトリです :::caution -これらのパターンはBiome設定ファイルで利用できます。 -コマンドラインで利用されるglobパターンはBiomeでは解釈されず、シェルによって展開されます。 -一部のシェルは再帰的なglob `**` をサポートしていません。 +どのように解決されるかの破壊的な変更を防ぐために、ドット `.` で始まるパスと `.json` または `.jsonc` で終わるパスは `node_modules/` から解決**されません**。 ::: + +解決アルゴリズムの詳細な情報については、[Node.jsのドキュメント](https://nodejs.org/api/esm.html#resolution-and-loading-algorithm)を参照してください。 diff --git a/src/content/docs/ja/index.mdx b/src/content/docs/ja/index.mdx index b3f4fa3ad..3fe78ed89 100644 --- a/src/content/docs/ja/index.mdx +++ b/src/content/docs/ja/index.mdx @@ -8,6 +8,10 @@ description: フォーマット、リントなどが一瞬で完了します! editUrl: false next: false +banner: + content: | + Biome v2—Biotypeリリースされました 🚀 + hero: title: Web開発のためのたった1つのツールチェーン tagline: フォーマット、リントなどが一瞬で完了します! @@ -40,6 +44,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/linter/NumberOfRules.astro"; import AwardBanner from "@/components/AwardBanner.astro"
@@ -48,7 +53,7 @@ import AwardBanner from "@/components/AwardBanner.astro"

Prettierのようにコードをフォーマット、しかも高速

- **Biomeは _JavaScript_、_TypeScript_、_JSX_、_JSON_、_CSS_ そして _GraphQL_ のための[高速なフォーマッタ](https://github.com/biomejs/biome/tree/main/benchmark#formatting)** であり、[**_Prettier_ と97%の互換性**](https://console.algora.io/challenges/prettier)を持ち、**CIと開発者の時間を節約します**。 + **Biomeは _JavaScript_、_TypeScript_、_JSX_、_JSON_、_HTML_、_CSS_ そして _GraphQL_ のための[高速なフォーマッタ](https://github.com/biomejs/biome/tree/main/benchmark#formatting)** であり、[**_Prettier_ と97%の互換性**](https://console.algora.io/challenges/prettier)を持ち、**CIと開発者の時間を節約します**。 Biomeは、[お気に入りのエディタ](/ja/guides/editors/first-party-extensions/)でコードを書く際に、**不正な形式のコード**さえもフォーマットできます。 @@ -97,7 +102,7 @@ import AwardBanner from "@/components/AwardBanner.astro"

問題を修正し、ベストプラクティスを学ぶ

- **Biomeは _JavaScript_、_TypeScript_、_JSX_、_CSS_ そして _GraphQL_ のための[高性能なリンタ](https://github.com/biomejs/biome/tree/main/benchmark#linting)** であり、ESLint、typescript-eslint、[その他のソース](https://github.com/biomejs/biome/discussions/3)に由来する **[200以上のルール](/linter/rules/)** を備えています。 + **Biomeは _JavaScript_、_TypeScript_、_JSX_、_HTML_、_CSS_ そして _GraphQL_ のための[高性能なリンタ](https://github.com/biomejs/biome/tree/main/benchmark#linting)** であり、ESLint、typescript-eslint、[その他のソース](https://github.com/biomejs/biome/discussions/3)に由来する **[個のルール](/linter/rules/)** を備えています。 **Biomeは、文脈を考慮した詳細な診断を出力**してくれるため、あなたがコードを改善してより優れたプログラマーになるのに役立ちます! @@ -152,6 +157,9 @@ import AwardBanner from "@/components/AwardBanner.astro" フロントエンド開発で利用される言語に対して、優れたサポートを提供します。特にTypeScriptおよびJSXへのサポートを第一にしています。 + + 貢献者のコミュニティによる有償サポートを必要とする組織に提供しています。 +
@@ -195,11 +203,11 @@ import AwardBanner from "@/components/AwardBanner.astro" -

Github

+

GitHub

-

BlueSky

+

Bluesky

diff --git a/src/content/docs/ja/reference/configuration.mdx b/src/content/docs/ja/reference/configuration.mdx index 91ba60976..3c1a88596 100644 --- a/src/content/docs/ja/reference/configuration.mdx +++ b/src/content/docs/ja/reference/configuration.mdx @@ -13,7 +13,6 @@ JSONスキーマファイルへのパスを指定できます。 `@biomejs/biome` パッケージが `node_modules` フォルダにインストールされている場合、そのスキーマへの相対パスを指定できます。 - ```json title="biome.json" { "$schema": "./node_modules/@biomejs/biome/configuration_schema.json" @@ -22,8 +21,6 @@ JSONスキーマファイルへのパスを指定できます。 スキーマファイルの解決に問題がある場合は、このサイトで提供されているスキーマも使用できます。 - - ```json title="biome.json" { "$schema": "https://biomejs.dev/schemas/2.0.0-beta/schema.json" @@ -32,74 +29,104 @@ JSONスキーマファイルへのパスを指定できます。 ## `extends` -他のJSONファイルへのパスのリストです。Biomeは `extends` リストに含まれるファイルのオプションを解決して適用し、最終的に `biome.json` ファイルに含まれるオプションを適用します。 +他のJSONファイルへのパスのリストです。Biomeは `extends` リストに含まれるファイルのオプションを解決して適用し、最終的に `biome.json`/`biome.jsonc` ファイルに含まれるオプションを適用します。 -```json title="biome.json" -{ - "extends": ["./biome.base.json"] -} -``` +The order of paths to extend goes from least relevant to most relevant. +Since v2, this option accepts a string that must match the value `"//"`, which can be used +when setting up [monorepos](/guides/big-projects#monorepo) -## `files` +## `root` -### `files.maxSize` +Whether this configuration should be treated as a root. By default, any configuration file is considered a root by default. +When a configuration file is a "nested configuration", it must set `"root": false`, otherwise an error is thrown. -ソースコードファイルの最大許容サイズをバイト単位で指定します。この制限を超えるファイルは、パフォーマンス上の理由で無視されます。 +This is required so Biome can orchestrate multiple files in CLI and editors at the same time. -> デフォルト: `1048576` (1024*1024, 1MB) +> デフォルト: `true` + + +## `files` + +### `files.includes` -### `files.ignore` +処理するファイルの[globパターン](#glob-syntax-reference)のリストです。 -Biomeは、パターンに一致するファイルやフォルダを無視します。 -Unixシェル形式のパターンのリストで指定します。 +フォルダがglobパターンに一致する場合は、そのフォルダに含まれるすべてのファイルが処理されます。 +次の例では、 `src` フォルダ内の `.js` 拡張子を持つすべてのファイルに一致します: ```json title="biome.json" { "files": { - "ignore": ["scripts/*.js"] + "includes": ["src/**/*.js"] } } ``` +`*` is used to match _all files in a folder_, while `**` _recursively_ matches +all files and subfolders in a folder. For more information on globs, see the +[glob syntax reference](#glob-syntax-reference) -### `files.include` +`includes` also supports negated patterns, or exceptions. These are patterns +that start with `!` and they can be used to instruct Biome to process all files +_except_ those matching the negated pattern. When using a negated pattern, you +should always specify `**` first to match all files and folders, otherwise +the negated pattern will not match any files. -Biomeは、これらのパターンに一致するファイルやフォルダのみを処理します。 -Unixシェル形式のパターンのリストで指定します。 +Note that exceptions are processed in order, allowing you to specify exceptions +to exceptions. +Consider the following example: ```json title="biome.json" { "files": { - "include": ["scripts/*.js"] + "includes": ["**", "!**/*.test.js", "**/special.test.js", "!test"] } } ``` -:::caution -`include` と `ignore` の両方が指定されている場合、`ignore` が `include` よりも**優先**されます。 -::: +This example specifies that: -例えば、下記のような指定を考えます。 +1. All files inside all (sub)folders are processed, thanks to the `**` pattern... +2. ... _except_ when those files have a `.test.js` extension... +3. ... but the file `special.test.ts` _is_ still processed... +4. ... _except_ when it occurs in the folder named `test`, because _no_ files + inside that folder are processed. -```json title="biome.json" -{ - "files": { - "include": ["scripts/**/*.js", "src/**/*.js"], - "ignore": ["scripts/**/*.js"] - } -} -``` +これは以下を意味します: -パターン `src/**/*.js` に一致するファイルのみが処理され、パターン `scripts/**/*.js` に一致するファイルは無視されます。 +* `src/app.js` は処理**されます**。 +* `src/app.test.js` は処理**されません**。 +* `src/special.test.js` は処理**されます**。 +* `test/special.test.js` は処理**されません**。 -### `files.ignoreUnknown` +#### Biomeのスキャナについて -Biomeは、処理できないファイルに遭遇した場合、診断情報を出力しません。 +Biome has a scanner that is responsible for discovering `.gitignore` files as +well as indexing projects if any of the rules from the project domain are +enabled. +The scanner respects `files.includes`, with two exceptions: +* If the project domain or one of its rules is enabled, dependencies in + `node_modules` are still read, even if they're ignored in `files.includes`. + This is because they may be a valuable source of type information. +* The scanner will not ignore individual files if they are in a non-ignored + directory. This is because files that are co-located with regular + (non-ignored) files are likely to be a valuable source of type information, + and they are also more likely to form import cycles with other files. + +This means that if you use `files.includes` to ignore folders with generated +code, type information from such folders is inaccessible to the scanner. If you +do wish to have such type information available, we advise to _not_ ignore these +folders through `files.includes` and instead ignore them using tool-specific +settings such as `linter.includes` and `formatter.includes` only. + +### `files.ignoreUnknown` + +Biomeは、処理できないファイルに遭遇した場合、診断情報を出力しません。 ```json title="biome.json" { @@ -111,6 +138,12 @@ Biomeは、処理できないファイルに遭遇した場合、診断情報を > デフォルト: `false` +### `files.maxSize` + +ソースコードファイルの最大許容サイズをバイト単位で指定します。この制限を超えるファイルは、パフォーマンス上の理由で無視されます。 + +> デフォルト: `1048576` (1024*1024, 1MB) + ## `vcs` BiomeをVCS(バージョン管理システム)ソフトウェアと統合するためのプロパティのセットです。 @@ -150,54 +183,77 @@ Biomeのリンタを有効にします。 > デフォルト: `true` -### `linter.ignore` - -Biomeのリンタは、パターンに一致するファイルやフォルダを無視します。 -Unixシェル形式のパターンのリストで指定します。 +### `linter.includes` +リントするファイルの[globパターン](#glob文法の説明)のリスト。 +次の例では、 `src` フォルダ内の `.js` 拡張子を持つすべてのファイルでリントを行います: ```json title="biome.json" { "linter": { - "ignore": ["scripts/*.js"] + "includes": ["src/**/*.js"] } } ``` +`*` is used to match _all files in a folder_, while `**` _recursively_ matches +all files and subfolders in a folder. For more information on globs, see the +[glob syntax reference](#glob-syntax-reference) -### `linter.include` - -Biomeのリンタは、これらのパターンに一致するファイルやフォルダのみを処理します。 -Unixシェル形式のパターンのリストで指定します。 +`includes` also supports negated patterns, or exceptions. These are patterns +that start with `!` and they can be used to instruct Biome to process all files +_except_ those matching the negated pattern. +Note that exceptions are processed in order, allowing you to specify exceptions +to exceptions. +Consider the following example: ```json title="biome.json" { "linter": { - "include": ["scripts/*.js"] + "includes": ["**", "!**/*.test.js", "**/special.test.js"] } } ``` -:::caution -`include` と `ignore` の両方が指定されている場合、`ignore` が `include` よりも**優先**されます。 -::: +This example specifies that: -例えば、下記のような指定を考えます。 +1. All files inside all (sub)folders are linted, thanks to the `**` pattern... +2. ... _except_ when those files have a `.test.js` extension... +3. ... but the file `special.test.ts` _is_ still linted. -```json title="biome.json" +This means that: + +* `src/app.js` **is** linted. +* `src/app.test.js` **is not** linted. +* `src/special.test.js` **is* linted. + +Note that `linter.includes` is applied *after* `files.includes`. This means +that any file that is not matched by `files.includes` can no longer be matched +`linter.includes`. This means the following example **doesn't work**: + +```json5 title="biome.jsonc" { + "files": { + "includes": "src/**" + }, "linter": { - "include": ["scripts/**/*.js", "src/**/*.js"], - "ignore": ["scripts/**/*.js"] + // This matches nothing because there is no overlap with `files.includes`: + "includes": "scripts/**" } } ``` -パターン `src/**/*.js` に一致するファイルのみが処理され、パターン `scripts/**/*.js` に一致するファイルは無視されます。 +If `linter.includes` is not specified, all files matched by +[`files.includes`](#filesincludes) are linted. +:::note +Due to a technical limitation, `linter.includes` also cannot match folders +while `files.includes` can. If you want to match all files inside a folder, +you should explicitly add `/**` at the end. +::: ### `linter.rules.recommended` @@ -275,51 +331,78 @@ Biomeのフォーマッタを有効にします。 > デフォルト: `true` -### `formatter.ignore` +### `formatter.includes` -Biomeのフォーマッタは、パターンに一致するファイルやフォルダを無視します。 -Unixシェル形式のパターンのリストで指定します。 +A list of [glob patterns](#glob-syntax-reference) of files to format. +The following example formats all files with a `.js` extension inside the `src` +folder: ```json title="biome.json" { "formatter": { - "ignore": ["scripts/*.js"] + "includes": ["src/**/*.js"] } } ``` -### `formatter.include` +`*` is used to match _all files in a folder_, while `**` _recursively_ matches +all files and subfolders in a folder. For more information on globs, see the +[glob syntax reference](#glob-syntax-reference) + +`includes` also supports negated patterns, or exceptions. These are patterns +that start with `!` and they can be used to instruct Biome to process all files +_except_ those matching the negated pattern. -Biomeのフォーマッタは、これらのパターンに一致するファイルやフォルダのみを処理します。 -Unixシェル形式のパターンのリストで指定します。 +Note that exceptions are processed in order, allowing you to specify exceptions +to exceptions. +Consider the following example: ```json title="biome.json" { "formatter": { - "include": ["scripts/*.js"] + "includes": ["**", "!**/*.test.js", "**/special.test.js"] } } ``` -:::caution -`include` と `ignore` の両方が指定されている場合、`ignore` が `include` よりも**優先**されます。 -::: +This example specifies that: -例えば、下記のような指定を考えます。 +1. All files inside all (sub)folders are formatted, thanks to the `**` pattern... +2. ... _except_ when those files have a `.test.js` extension... +3. ... but the file `special.test.ts` _is_ still formatted. -```json title="biome.json" +This means that: + +* `src/app.js` **is** formatted. +* `src/app.test.js` **is not** formatted. +* `src/special.test.js` **is* formatted. + +Note that `formatter.includes` is applied *after* `files.includes`. This means +that any file that is not matched by `files.includes` can no longer be matched +`formatter.includes`. This means the following example **doesn't work**: + +```json5 title="biome.jsonc" { + "files": { + "includes": "src/**" + }, "formatter": { - "include": ["scripts/**/*.js", "src/**/*.js"], - "ignore": ["scripts/**/*.js"] + // This matches nothing because there is no overlap with `files.includes`: + "includes": "scripts/**" } } ``` -パターン `src/**/*.js` に一致するファイルのみが処理され、パターン `scripts/**/*.js` に一致するファイルは無視されます。 +If `formatter.includes` is not specified, all files matched by +[`files.includes`](#filesincludes) are formatted. +:::note +Due to a technical limitation, `formatter.includes` also cannot match folders +while `files.includes` can. If you want to match all files inside a folder, +you should explicitly add `/**` at the end. +::: ### `formatter.formatWithErrors` @@ -345,18 +428,6 @@ Unixシェル形式のパターンのリストで指定します。 > デフォルト: `"tab"` -### `formatter.indentSize` - -このオプションは廃止されました。代わりに [`formatter.indentWidth`](#formatterindentwidth) を使用してください。 - -
- 廃止されました - - インデントのサイズを指定します。 - - > デフォルト: `2` - -
### `formatter.indentWidth` @@ -408,68 +479,14 @@ HTML言語(あるいはHTMLベースの言語)における属性の位置ス ### `formatter.useEditorconfig` フォーマットのオプションを導出するために `.editorconfig` ファイルを利用するかを指定します。 -`true` の場合、`.editorconfig` ファイルの中の適用可能なオプションが利用されますが、`biome.json` ファイルの設定が優先されます。 - -`biome migrate` でPrettierから移行する場合、このオプションはPrettierの動作と一致させるため `true` に設定されます。 - -> デフォルト: `false` - -## `organizeImports` - -### `organizeImports.enabled` - -Biomeのインポートのソート機能を有効にします。 - -> デフォルト: `true` -### `organizeImports.ignore` - - -Biomeは、パターンに一致するファイルやフォルダを無視します。 -Unixシェル形式のパターンのリストで指定します。 - - - -```json title="biome.json" -{ - "organizeImports": { - "ignore": ["scripts/*.js"] - } -} -``` +設定ファイル `.editorconfig` および `biome.json` は次のルールに従います: +- `biome.json` のフォーマット設定は常に `.editorconfig` ファイルよりも優先されます。 +- `.editorconfig` files that exist higher up in the hierarchy than a `biome.json` file are already ignored. This is to avoid loading formatting settings from someone's home directory into a project with a `biome.json` file. +- Nested `.editorconfig` files aren't supported currently. -### `organizeImports.include` - -Biomeは、これらのパターンに一致するファイルやフォルダのみを処理します。 -Unixシェル形式のパターンのリストで指定します。 - - - -```json title="biome.json" -{ - "organizeImports": { - "include": ["scripts/*.js"] - } -} -``` - -:::caution -`include` と `ignore` の両方が指定されている場合、`ignore` が `include` よりも**優先**されます。 -::: - -例えば、下記のような指定を考えます。 - -```json title="biome.json" -{ - "organizeImports": { - "include": ["scripts/**/*.js", "src/**/*.js"], - "ignore": ["scripts/**/*.js"] - } -} -``` - -パターン `src/**/*.js` に一致するファイルのみが処理され、パターン `scripts/**/*.js` に一致するファイルは無視されます。 +> デフォルト: `false` ## `javascript` @@ -888,6 +905,17 @@ CSSファイルのインデントサイズを指定します。 > デフォルト: `2` + +```json title="biome.json" +{ + "css": { + "formatter": { + "indentWidth": 2 + } + } +} +``` + ### `css.formatter.lineEnding` CSSファイルの改行コードの種類を指定します。 @@ -1043,50 +1071,62 @@ Gritファイルの行の文字数を指定します。 Gritファイル用のBiomeのリンタを有効にします。 -> デフォルト: `false` +> デフォルト: `true` + +```json title="biome.json" +{ + "grit": { + "linter": { + "enabled": false + } + } +} +``` ### `grit.assist.enabled` Gritファイル用のBiomeのアシストを有効にします。 -> デフォルト: `false` +> デフォルト: `true` -## `overrides` +```json title="biome.json" +{ + "grit": { + "assist": { + "enabled": false + } + } +} +``` -パターンのリストです。 -この設定を使用して、特定のファイルに対するツールの動作を変更します。 -ファイルがオーバーライドパターンに一致すると、そのパターンに指定された設定がトップレベルの設定を上書きします。 -パターンの順序は重要です。ファイルが3つのパターンに一致する場合、最初のパターンのみが使用されます。 -### `overrides..ignore` +## `overrides` -Unixシェル形式のパターンのリストです。Biomeは、これらのパターンに一致するファイルに対してオーバーライドを適用しません。 +パターンのリストです。 +この設定を使用して、特定のファイルに対するツールの動作を変更します。 -```json title="biome.json" -{ - "overrides": [{ - "ignore": ["scripts/*.js"] - }] -} -``` +ファイルがオーバーライドパターンに一致すると、そのパターンに指定された設定がトップレベルの設定を上書きします。 -### `overrides..include` +パターンの順序は重要です。ファイルが3つのパターンに一致する場合、最初のパターンのみが使用されます。 -Unixシェル形式のパターンのリストです。Biomeは、これらのパターンに一致するファイルにのみオーバーライドを適用します。 +### `overrides..includes` +A list of [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)) of +files for which to apply customised settings. -```json title="biome.json" +```jsonc title="biome.jsonc" { "overrides": [{ - "include": ["scripts/*.js"] + "includes": ["scripts/*.js"], + // settings that should only apply to the files specified in the includes field. }] } ``` ### `overrides..formatter` -`ignore` と `include` を除いた、[上位のformatter](#formatter) 設定のオプションが含まれます。 +`includes` を除いた、[上位のformatter](#formatter) 設定のオプションが含まれます。 #### Examples @@ -1100,7 +1140,7 @@ Unixシェル形式のパターンのリストです。Biomeは、これらの }, "overrides": [ { - "include": ["generated/**"], + "includes": ["generated/**"], "formatter": { "lineWidth": 160, "indentStyle": "space" @@ -1112,7 +1152,7 @@ Unixシェル形式のパターンのリストです。Biomeは、これらの ### `overrides..linter` -`ignore` と `include` を除いた、[上位のlinter](#linter) 設定のオプションが含まれます。 +`includes` を除いた、[上位のlinter](#linter) 設定のオプションが含まれます。 #### Examples @@ -1130,7 +1170,7 @@ Unixシェル形式のパターンのリストです。Biomeは、これらの }, "overrides": [ { - "include": ["lib/**"], + "includes": ["lib/**"], "linter": { "rules": { "suspicious": { @@ -1140,7 +1180,7 @@ Unixシェル形式のパターンのリストです。Biomeは、これらの } }, { - "include": ["shims/**"], + "includes": ["shims/**"], "linter": { "enabled": false } @@ -1149,9 +1189,9 @@ Unixシェル形式のパターンのリストです。Biomeは、これらの } ``` -### `overrides..organizeImports` +### `overrides..assist` -`ignore` と `include` を除いた、[上位のorganizeImports](#organizeimports) 設定のオプションが含まれます。 +`includes` を除いた、[上位のassist](#assist) 設定のオプションが含まれます。 ### `overrides..javascript` @@ -1176,7 +1216,7 @@ Unixシェル形式のパターンのリストです。Biomeは、これらの }, "overrides": [ { - "include": ["lib/**"], + "includes": ["lib/**"], "javascript": { "formatter": { "quoteStyle": "double" @@ -1197,8 +1237,6 @@ Unixシェル形式のパターンのリストです。Biomeは、これらの 特定のJSONファイルに対して解析機能を有効にすることができます。 - - ```json title="biome.json" { "linter": { @@ -1209,7 +1247,7 @@ Unixシェル形式のパターンのリストです。Biomeは、これらの }, "overrides": [ { - "include": [".vscode/**"], + "includes": [".vscode/**"], "json": { "parser": { "allowComments": true, @@ -1220,3 +1258,32 @@ Unixシェル形式のパターンのリストです。Biomeは、これらの ] } ``` + +## Glob文法の説明 + +globパターンはファイル名の集合を指定します。 +Biomeは次のglobをサポートしています: + +- `*` は0個以上の文字にマッチします。パス区切り文字 `/` にはマッチしません。 +- `**` はディレクトリとファイルに対して再帰的にマッチします。 + このシーケンスは単一のパスコンポーネント**でなければなりません**。 + したがって、`**a` と `b**` はどちらも無効であり、エラーになります。 + 連続する `*` 文字が2つ以上続くシーケンスも無効です。 +- `[...]` は括弧内の任意の文字にマッチします。 + Unicodeの順序による文字の範囲も指定できます。 + 例えば、`[0-9]` は0から9までの任意の文字を指定します。 +- `[!...]` は `[...]` の否定です。つまり、括弧内に**含まれない**任意の文字に一致します。 +- glob全体が `!` で始まる場合は、否定パターンと呼ばれます。このglobはパスがglobに一致しないときに一致します。否定パターンは単独では使用できず、通常のglobの_例外_としてでのみ使用できます。 + +いくつかの例です: + +- `dist/**` は、distディレクトリと、その中のすべてのファイルにマッチします。 +- `**/test/**` は、場所に関係なく、`test` という名前のディレクトリの下にあるすべてのファイルにマッチします。例: `dist/test`、`src/test`。 +- `**/*.js` は、すべてのディレクトリ内の拡張子 `.js` で終わるすべてのファイルにマッチします。 + + +:::caution +これらのパターンはBiome設定ファイルで利用できます。 +コマンドラインで利用されるglobパターンはBiomeでは解釈されず、シェルによって展開されます。 +一部のシェルは再帰的なglob `**` をサポートしていません。 +::: diff --git a/src/content/docs/reference/configuration.mdx b/src/content/docs/reference/configuration.mdx index dfb9078cc..a1144211d 100644 --- a/src/content/docs/reference/configuration.mdx +++ b/src/content/docs/reference/configuration.mdx @@ -128,7 +128,7 @@ The scanner respects `files.includes`, with two exceptions: This means that if you use `files.includes` to ignore folders with generated code, type information from such folders is inaccessible to the scanner. If you do wish to have such type information available, we advise to _not_ ignore these -folders through `files.includes` and instead ignore them using tool-specific +folders through `files.includes` and instead ignore them using tool-specific settings such as `linter.includes` and `formatter.includes` only. ### `files.ignoreUnknown` @@ -489,9 +489,9 @@ When formatting `package.json`, Biome will use `always` unless configured otherw ### `formatter.useEditorconfig` -Whether Biome should use the `.editorconfig` file to determine the formatting options. +Whether Biome should use the `.editorconfig` file to determine the formatting options. -The config files `.editorconfig` and `biome.json` will follow the follwing rules: +The config files `.editorconfig` and `biome.json` will follow the following rules: - Formatting settings in `biome.json` always take precedence over `.editorconfig` files. - `.editorconfig` files that exist higher up in the hierarchy than a `biome.json` file are already ignored. This is to avoid loading formatting settings from someone's home directory into a project with a `biome.json` file. @@ -520,7 +520,6 @@ Allows to support the unsafe/experimental parameter decorators. > Default: `false` - ### `javascript.parser.jsxEverywhere` When set to `true`, allows to parse JSX syntax inside `.js` files. When set to `false`, Biome will raise diagnostics when it encounters JSX syntax inside `.js` files. @@ -541,8 +540,6 @@ When set to `true`, allows to parse JSX syntax inside `.js` files. When set to ` The type of quote used when representing string literals. It can be `"single"` or `"double"`. - - > Default: `"double"` ### `javascript.formatter.jsxQuoteStyle` @@ -596,7 +593,6 @@ It configures where the formatter prints semicolons: Example: - ```json title="biome.json" { "javascript": { @@ -627,7 +623,6 @@ The style of the indentation for JavaScript (and its super languages) files. It > Default: `"tab"` - ### `javascript.formatter.indentWidth` How big the indentation should be for JavaScript (and its super languages) files. @@ -731,7 +726,6 @@ Enables Biome's linter for JavaScript (and its super languages) files. } ``` - ### `javascript.assist.enabled` Enables Biome's assist for JavaScript (and its super languages) files. @@ -802,12 +796,10 @@ Enables Biome's formatter for JSON (and its super languages) files. ### `json.formatter.indentStyle` - The style of the indentation for JSON (and its super languages) files. It can be `"tab"` or `"space"`. > Default: `"tab"` - ### `json.formatter.indentWidth` How big the indentation should be for JSON (and its super languages) files. @@ -918,7 +910,6 @@ Enables Biome's formatter for CSS files. ### `css.formatter.indentStyle` - The style of the indentation for CSS files. It can be `"tab"` or `"space"`. > Default: `"tab"` @@ -950,8 +941,6 @@ The type of line ending for CSS files. > Default: `"lf"` - - ### `css.formatter.lineWidth` The amount of characters that can be written on a single line in CSS files. @@ -1000,7 +989,6 @@ Enables Biome's assist for CSS files. Options applied to the GraphQL files. - ### `graphql.formatter.enabled` Enables Biome's formatter for GraphQL files. @@ -1009,12 +997,10 @@ Enables Biome's formatter for GraphQL files. ### `graphql.formatter.indentStyle` - The style of the indentation for GraphQL files. It can be `"tab"` or `"space"`. > Default: `"tab"` - ### `graphql.formatter.indentWidth` How big the indentation should be for GraphQL files. @@ -1054,13 +1040,10 @@ Enables Biome's assist for GraphQL files. > Default: `true` - - ## `grit` Options applied to the Grit files. - ### `grit.formatter.enabled` Enables Biome's formatter for Grit files. @@ -1069,12 +1052,10 @@ Enables Biome's formatter for Grit files. ### `grit.formatter.indentStyle` - The style of the indentation for Grit files. It can be `"tab"` or `"space"`. > Default: `"tab"` - ### `grit.formatter.indentWidth` How big the indentation should be for Grit files. @@ -1161,7 +1142,7 @@ files for which to apply customised settings. ### `overrides..formatter` -It will include the options of [top level formatter](#formatter) configuration, minus `ignore` and `include`. +It will include the options of [top level formatter](#formatter) configuration, minus `includes`. #### Examples @@ -1186,7 +1167,7 @@ For example, it's possible to modify the formatter `lineWidth`, `indentStyle` fo ### `overrides..linter` -It will include the options of [top level linter](#linter) configuration, minus `ignore` and `include`. +It will include the options of [top level linter](#linter) configuration, minus `includes`. #### Examples @@ -1222,9 +1203,9 @@ You can disable certain rules for certain glob paths, and disable the linter for } ``` -### `overrides..organizeImports` +### `overrides..assist` -It will include the options of [top level organize imports](#organizeimports), minus `ignore` and `include`. +It will include the options of [top level assist](#assist), minus `includes`. ### `overrides..javascript`