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:
parent
86981b395d
commit
d00a2e8920
11
.vscode/settings.json
vendored
11
.vscode/settings.json
vendored
@ -1,4 +1,12 @@
|
||||
{
|
||||
"[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": {
|
||||
"**/.git/objects/**": true,
|
||||
"**/.git/subtree-cache/**": true,
|
||||
@ -12,4 +20,5 @@
|
||||
"**/bazel-out": true,
|
||||
"**/dist": true,
|
||||
},
|
||||
}
|
||||
"git.ignoreLimitWarning": true,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user