Skip to content

Commit 53dda9e

Browse files
huntiefacebook-github-bot
authored andcommitted
Format code-workspace file, clarify use of .vscode/ dir (facebook#44874)
Summary: Pull Request resolved: facebook#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
1 parent 8597727 commit 53dda9e

File tree

3 files changed

+29
-20
lines changed

3 files changed

+29
-20
lines changed

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,11 @@ vendor/
146146
/packages/react-native/sdks/hermesc
147147
/packages/react-native/sdks/hermes-engine/hermes-engine-from-local-source-dir.tar.gz
148148

149-
# Visual studio
150-
.vscode
149+
# Visual Studio Code (config dir - if present, this merges user defined
150+
# workspace settings on top of react-native.code-workspace)
151+
/.vscode
152+
153+
# Visual Studio
151154
.vs
152155

153156
# Android memory profiler files

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
"trailingComma": "all",
88
"endOfLine": "lf",
99
"overrides": [
10+
{
11+
"files": ["*.code-workspace"],
12+
"options": {
13+
"parser": "json"
14+
}
15+
},
1016
{
1117
"files": [
1218
"*.js",

react-native.code-workspace

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
2-
"folders": [
3-
{
4-
"path": "."
5-
}
6-
],
7-
"extensions": {
8-
"recommendations": [
9-
"dbaeumer.vscode-eslint",
10-
"editorconfig.editorconfig",
11-
"esbenp.prettier-vscode",
12-
"flowtype.flow-for-vscode"
13-
],
14-
},
15-
"settings": {
16-
"editor.formatOnSave": true,
17-
"flow.pathToFlow": "${workspaceFolder}/node_modules/.bin/flow",
18-
"javascript.validate.enable": false
19-
}
2+
"folders": [
3+
{
4+
"path": "."
5+
}
6+
],
7+
"extensions": {
8+
"recommendations": [
9+
"dbaeumer.vscode-eslint",
10+
"editorconfig.editorconfig",
11+
"esbenp.prettier-vscode",
12+
"flowtype.flow-for-vscode"
13+
]
14+
},
15+
"settings": {
16+
"editor.formatOnSave": true,
17+
"flow.pathToFlow": "${workspaceFolder}/node_modules/.bin/flow",
18+
"javascript.validate.enable": false
19+
}
2020
}

0 commit comments

Comments
 (0)