build: update VSCode settings to limit auto-formatting on save to JS/TS files (#28784)

Previously, auto-formatting on save was enabled for all file types,
which meant also using default VSCode formatting settings for files
where this was not desirable - for example HTML files (such as
angular.io and docs examples templates) and JSON files (such as Firebase
configurations).
This was problematic for the following reasons:
- Unlike with JS/TS files, the formatting of other file types is not
  checked/enforced on CI.
- Formatting is subject to default VSCode settings and everyone's local
  VSCode settings overrides.
- Especially for docs examples files, changing the layout might require
  updating the wording in corresponding guides (e.g. when referring to
  line-numbers).

If we decide that we do want to lint those other file types as well
(which sounds like a good idea), we should do it in a way that ensures
consistent formatting and check the formatting on CI.

PR Close #28784
This commit is contained in:
George Kalpakas 2019-02-17 15:10:32 +02:00 committed by Igor Minar
parent cb20b3b40a
commit 3a6e443e19
1 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,10 @@
{
"editor.formatOnSave": true,
"[javascript]": {
"editor.formatOnSave": true,
},
"[typescript]": {
"editor.formatOnSave": true,
},
// Please install http://clang.llvm.org/docs/ClangFormat.html in VSCode to take advantage of clang-format
"clang-format.executable": "${workspaceRoot}/node_modules/.bin/clang-format",
"files.watcherExclude": {
@ -16,4 +21,4 @@
"**/dist": true,
},
"git.ignoreLimitWarning": true,
}
}