Skip to content

Commit

Permalink
Format code-workspace file, clarify use of .vscode/ dir (#44874)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #44874

While reviewing facebook/react#29830, I noticed this file was committed with tab indentation in React Native. I have also used the `.gitignore` entry to clarify how `react-native.code-workspace` interacts with an optional user `.vscode/` config directory.

Note: The `json-stringify` parser can be used with Prettier 3+ only, so we use `json` instead.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D58413581

fbshipit-source-id: 58c14db6648fed10736062b1f055475154aa74a4
  • Loading branch information
huntie authored and facebook-github-bot committed Jun 11, 2024
1 parent 8597727 commit 53dda9e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 20 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,11 @@ vendor/
/packages/react-native/sdks/hermesc
/packages/react-native/sdks/hermes-engine/hermes-engine-from-local-source-dir.tar.gz

# Visual studio
.vscode
# Visual Studio Code (config dir - if present, this merges user defined
# workspace settings on top of react-native.code-workspace)
/.vscode

# Visual Studio
.vs

# Android memory profiler files
Expand Down
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"trailingComma": "all",
"endOfLine": "lf",
"overrides": [
{
"files": ["*.code-workspace"],
"options": {
"parser": "json"
}
},
{
"files": [
"*.js",
Expand Down
36 changes: 18 additions & 18 deletions react-native.code-workspace
Original file line number Diff line number Diff line change
@@ -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
}
}

0 comments on commit 53dda9e

Please sign in to comment.