Question: What is a simple VSCode formatter setup across projects that require different formatters?
Answer:
VSCode user settings are stored outside the project on local.
VSCode workspace settings are stored in .vscode\settings.json. So in a team environment do set workspace settings and commit to repo. That way the entire team has the same formatter setting.
- In File > Preferences > Settings, Enable Format On Save. Simple best/common practice.
- In File > Preferences > Settings, Workspace level, set Default Formatter. Different projects are likely to need different formatters. Old projects are probably using old formatters while new projects will want to use new formatters.