From 0a18fecd2ba39954c5d4d6c47f0ee7b64e938f43 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Sat, 18 Jul 2026 14:01:25 +0800 Subject: [PATCH] Consistently use array in `overrides.files` (#19667) Consistently use array in `overrires.files` --- docs/configuration.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 055e6574c..9da8ec02e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -139,7 +139,7 @@ JSON: "semi": false, "overrides": [ { - "files": "*.test.js", + "files": ["*.test.js"], "options": { "semi": true } @@ -159,7 +159,8 @@ YAML: ```yaml title=".prettierrc" semi: false overrides: - - files: "*.test.js" + - files: + - "*.test.js" options: semi: true - files: @@ -181,8 +182,10 @@ For example, to get Prettier to format its own `.prettierrc` file, you can do: { "overrides": [ { - "files": ".prettierrc", - "options": { "parser": "json" } + "files": [".prettierrc"], + "options": { + "parser": "json" + } } ] } @@ -194,7 +197,7 @@ You can also switch to the `flow` parser instead of the default `babel` for .js { "overrides": [ { - "files": "*.js", + "files": ["*.js"], "options": { "parser": "flow" }