Configure VS Code settings for a team
Share VS Code settings and recommended extensions with a team by committing a .vscode folder with settings.json and extensions.json.
A committed .vscode folder gives everyone the same formatter, the same lint behavior and a prompt to install the right extensions.
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"typescript.tsdk": "node_modules/typescript/lib",
"files.exclude": { "**/.git": true }
}{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"editorconfig.editorconfig"
]
}typescript.tsdk points the editor at the project's TypeScript, not the one bundled with VS Code, so editor errors match tsc. extensions.json makes VS Code offer to install what is missing when someone opens the folder. See VS Code's recommended extensions docs.
Commit only settings that apply to the project. Keep themes, fonts and key bindings in personal settings. Add .vscode/* to .gitignore with exceptions for these two files, so personal launch files stay out.