Skip to content

Commit

Permalink
Add cts.code-workspace for project-global settings. (#299)
Browse files Browse the repository at this point in the history
Reserves .vscode/ ("folder settings") for personal editor settings.
  • Loading branch information
kainino0x authored Sep 29, 2020
1 parent 2d1737f commit dab51c7
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 55 deletions.
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# VSCode - see .vscode/README.md
.vscode/

# Build files
/out/
/out-wpt/

*.code-workspace

.tscache/
*.tmp.txt

Expand Down Expand Up @@ -184,7 +185,4 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# VSCode
.vscode/

# End of https://www.gitignore.io/api/linux,macos,windows,node
5 changes: 5 additions & 0 deletions .vscode/README.md
Original file line number Diff line number Diff line change
@@ -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 changes: 0 additions & 23 deletions .vscode/settings.json

This file was deleted.

26 changes: 0 additions & 26 deletions .vscode/tasks.json

This file was deleted.

52 changes: 52 additions & 0 deletions cts.code-workspace
Original file line number Diff line number Diff line change
@@ -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"]
}
]
}
}

0 comments on commit dab51c7

Please sign in to comment.