From ea052d2732c6920d0daa43274d5117d689345938 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 11 Jun 2024 07:21:28 -0700 Subject: [PATCH] Format code-workspace file Summary: While reviewing https://github.com/facebook/react/pull/29830, I noticed this file was committed with tab indentation in React Native. Note: The `json-stringify` parser can be used with Prettier 3+ only, so we use `json` instead. Changelog: [Internal] Differential Revision: D58413581 --- .prettierrc | 6 ++++++ react-native.code-workspace | 36 ++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.prettierrc b/.prettierrc index 7ea6b136ed774f..9a77c6d517178b 100644 --- a/.prettierrc +++ b/.prettierrc @@ -7,6 +7,12 @@ "trailingComma": "all", "endOfLine": "lf", "overrides": [ + { + "files": ["*.code-workspace"], + "options": { + "parser": "json" + } + }, { "files": [ "*.js", diff --git a/react-native.code-workspace b/react-native.code-workspace index 7a10adaad04212..77a7bea1621aee 100644 --- a/react-native.code-workspace +++ b/react-native.code-workspace @@ -1,20 +1,20 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint", - "editorconfig.editorconfig", - "esbenp.prettier-vscode", - "flowtype.flow-for-vscode" - ], - }, - "settings": { - "editor.formatOnSave": true, - "flow.pathToFlow": "${workspaceFolder}/node_modules/.bin/flow", - "javascript.validate.enable": false - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "editorconfig.editorconfig", + "esbenp.prettier-vscode", + "flowtype.flow-for-vscode" + ] + }, + "settings": { + "editor.formatOnSave": true, + "flow.pathToFlow": "${workspaceFolder}/node_modules/.bin/flow", + "javascript.validate.enable": false + } }