✨ An opinionated prettier plugin to format tsconfig.json
.
NOTE: work in progress, please check the formatted tsconfig.json
before committing changes
This plugin sorts keys in tsconfig.json
according to the order of options appearing in the tsconfig reference.
Currently does NOT supports comments.
-
Install
prettier
andprettier-plugin-tsconfig
.$ yarn add --dev prettier prettier-plugin-tsconfig
-
Add
prettier
as a runnable script.Example:
{ "scripts": { "format": "prettier --write \"**/*.{js,json,ts}\"" } }
-
Run
prettier
.$ yarn run format