Last updated
Last updated
is an automatic code formatter which supports various languages, including TypeScript. It also has extensions for various text editors like , , and even . If you have installed these extensions, it will use Prettier's service to automatically format your code after saving.
If you would rather not use Prettier instead, you can easily disable it too. In VSCode, open .vscode/settings.json
, then change the "editor.formatOnSave"
option to false
:
The .prettierrc
file configures how Prettier formats your code. By default we use the following options.
We can use ESLint config and plugin for Prettier to override some ESLint rules to not conflict with Prettier.
Then in your .eslintrc
file, add the following: