Add Prettier

This adds Prettier and makes it replace tsfmt. VSCode is set to use
Prettier for formatting TypeScript/TSX files and format on save since
Prettier is very fast and does not cause any noticeable delay.
This commit is contained in:
Koen Vlaswinkel
2022-10-25 17:10:19 +02:00
parent 6219b43051
commit f41ca1a330
10 changed files with 1639 additions and 1506 deletions

View File

@@ -5,7 +5,7 @@
"recommendations": [
"amodio.tsl-problem-matcher",
"dbaeumer.vscode-eslint",
"eternalphane.tsfmt-vscode"
"esbenp.prettier-vscode"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []

10
.vscode/settings.json vendored
View File

@@ -36,5 +36,13 @@
"typescript.preferences.quoteStyle": "single",
"javascript.preferences.quoteStyle": "single",
"editor.wordWrapColumn": 100,
"jest.rootPath": "./extensions/ql-vscode"
"jest.rootPath": "./extensions/ql-vscode",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
},
}