VSCode settings

Summary:
1) Add VSCode settings to the source control, so users won't need to configure them
2) Copy VSCode settings to both "sonar" and "sonar/desktop" folders so both folders can be opened for development

Reviewed By: passy

Differential Revision: D20594643

fbshipit-source-id: 4331659008e4dbf9dfcc44a3723ab0612a3bd333
This commit is contained in:
Anton Nikolaev
2020-03-23 04:23:37 -07:00
committed by Facebook GitHub Bot
parent 3cbeaf2642
commit 74d8da7c4b
3 changed files with 90 additions and 21 deletions

46
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,46 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Running Renderer",
"type": "chrome",
"request": "attach",
"port": 9222,
"webRoot": "/",
"url": "http://localhost:3000/index.dev.html"
},
{
"name": "Attach to Running Main",
"type": "node",
"request": "attach",
"port": 9229,
"sourceMaps": true
},
{
"type": "node",
"request": "launch",
"name": "Launch Current Jest Suite",
"program": "${workspaceFolder}/desktop/node_modules/.bin/jest",
"args": ["--runInBand", "${relativeFile}"]
},
{
"type": "node",
"cwd": "${fileDirname}",
"request": "launch",
"name": "Launch Current Script",
"args": ["${file}"],
"env": {
"TS_NODE_FILES": "true"
},
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart",
"runtimeArgs": ["--require", "ts-node/register"]
}
],
"compounds": [
{
"name": "Attach to All",
"configurations": ["Attach to Running Main", "Attach to Running Renderer"]
}
]
}

28
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,28 @@
{
"eslint.enable": true,
"eslint.format.enable": true,
"eslint.lintTask.enable": true,
"eslint.packageManager": "yarn",
"eslint.codeActionsOnSave.mode": "all",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"eslint.workingDirectories": [
{
"mode": "auto"
}
],
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
}
}

View File

@@ -22,30 +22,25 @@
"name": "Launch Current Jest Suite", "name": "Launch Current Jest Suite",
"program": "${workspaceFolder}/node_modules/.bin/jest", "program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--runInBand", "${relativeFile}"] "args": ["--runInBand", "${relativeFile}"]
},
{
"type": "node",
"request": "launch",
"name": "Launch Current Script",
"args": ["${file}"],
"env": {
"TS_NODE_FILES": "true"
}, },
"protocol": "inspector", {
"internalConsoleOptions": "openOnSessionStart", "type": "node",
"runtimeArgs": [ "cwd": "${fileDirname}",
"--require", "request": "launch",
"ts-node/register" "name": "Launch Current Script",
] "args": ["${file}"],
} "env": {
"TS_NODE_FILES": "true"
},
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart",
"runtimeArgs": ["--require", "ts-node/register"]
}
], ],
"compounds": [ "compounds": [
{ {
"name": "Attach to All", "name": "Attach to All",
"configurations": [ "configurations": ["Attach to Running Main", "Attach to Running Renderer"]
"Attach to Running Main",
"Attach to Running Renderer"
]
} }
] ]
} }