Add cts.code-workspace for project-global settings. (#299)

Reserves .vscode/ ("folder settings") for personal editor settings.
This commit is contained in:
Kai Ninomiya 2020-09-28 18:09:29 -07:00 committed by GitHub
parent 2d1737f98f
commit dab51c7eb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 55 deletions

10
.gitignore vendored
View file

@ -1,8 +1,9 @@
# VSCode - see .vscode/README.md
.vscode/
# Build files
/out/
/out-wpt/
*.code-workspace
.tscache/
*.tmp.txt
@ -184,7 +185,4 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk
# VSCode
.vscode/
# End of https://www.gitignore.io/api/linux,macos,windows,node

5
.vscode/README.md vendored Normal file
View file

@ -0,0 +1,5 @@
You can use `settings.json`/`tasks.json` in this directory for personal settings.
To edit the default settings, modify `cts.code-workspace`, which is checked into the repository.
Note: VS Code's setting precedence is `.vscode/` > `cts.code-workspace` > global user settings.

23
.vscode/settings.json vendored
View file

@ -1,23 +0,0 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.detectIndentation": false,
"editor.formatOnSave": true,
"editor.rulers": [100],
"editor.tabSize": 2,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"files.exclude": {
"*.tmp.txt": true,
".gitignore": true,
".travis.yml": true,
".tscache": true,
"deploy_key.enc": true,
"node_modules": true,
"out": true,
"out-wpt": true,
"package-lock.json": true
},
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.quoteStyle": "single"
}

26
.vscode/tasks.json vendored
View file

@ -1,26 +0,0 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "grunt",
"task": "test",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "grunt",
"task": "pre",
"problemMatcher": []
},
{
"type": "grunt",
"task": "check",
"problemMatcher": [
"$tsc"
]
}
]
}

52
cts.code-workspace Normal file
View file

@ -0,0 +1,52 @@
// Note: VS Code's setting precedence is `.vscode/` > `cts.code-workspace` > global user settings.
{
"folders": [{ "path": "." }],
"settings": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.detectIndentation": false,
"editor.rulers": [100],
"editor.tabSize": 2,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"files.exclude": {
"*.tmp.txt": true,
".gitignore": true,
".travis.yml": true,
".tscache": true,
"deploy_key.enc": true,
"node_modules": true,
"out": true,
"out-wpt": true,
"package-lock.json": true
},
// Configure VSCode to use the right style when automatically adding imports on autocomplete.
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.importModuleSpecifierEnding": "js",
"typescript.preferences.quoteStyle": "single"
},
"tasks": {
"version": "2.0.0",
"tasks": [
{
"type": "grunt",
"task": "test",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "grunt",
"task": "pre",
"problemMatcher": []
},
{
"type": "grunt",
"task": "check",
"problemMatcher": ["$tsc"]
}
]
}
}