Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 1003 Bytes

javascript.md

File metadata and controls

37 lines (30 loc) · 1003 Bytes

JavaScript/TypeScript

For JavaScript, TypeScript and HTML and other similar languages, we use Prettier.

Installation

[TODO]

Format on save in VScode

Install the Prettier extension.

You will then need to update your VSCode settings.json file, to include the following:

"[typescriptreact]": {
    "editor.tabSize": 2,
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
    "editor.tabSize": 2,
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
    "editor.tabSize": 2,
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
},