Skip to content

Commit 3031cb6

Browse files
committed
Don't force "format on save" setting on contributors
The `editor.formatOnSave` VS Code setting controls whether file are automatically formatted when saved. Checking a VS Code workspace settings configuration file into the repository with this setting enabled seems like it would increase the likelihood of contributions being properly formatted. Unfortunately, in this case it does just the opposite. The reason is that no formatter and configuration is provided, so VS Code formats the code according to whatever formatter and configuration the contributor happens to have set up for TypeScript. In my case, that is Prettier, the default configuration of which causes extensive formatting changes on save. This will result in the following scenarios: - Conscientious contributors waste time reverting unexpected diffs and figuring out how to prevent future ones - Other contributors submit low quality contributions - Maintainers waste time review contributions with large diffs unrelated to the proposal - Conscientious maintainers waste time cajoling contributors into removing unrelated changes from their contributions - Other maintainers allow large unrelated diffs to be introduced into the repository Ideally, the infrastructure of the project would be set up to enforce standard code style compliance from contributions. But until that happens, it is best to remove this harmful setting.
1 parent 5382501 commit 3031cb6

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Diff for: .vscode/settings.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"tslint.configFile": "./tslint.json",
3-
"editor.formatOnSave": true,
43
"files.exclude": {
54
"**/lib": false
65
},

0 commit comments

Comments
 (0)