prettier-plugin-curly
Prettier plugin to enforce consistent brace style for all control statements.
Usage
First install this package as a dev dependency in your package manager of choice:
npm i prettier-plugin-curly -D
You'll then be able to list it as a Prettier plugin in your Prettier config:
{
"plugins": ["prettier-plugin-packagejson"],
"useTabs": true
}
As a result, Prettier will add {}
curly brackets to control flow statements such as for
, if
, and while
:
- if (abc) def;
+ if (abc) {
+ def;
+ }
Development
See .github/CONTRIBUTING.md
, then .github/DEVELOPMENT.md
.
Thanks! 💖
Contributors
💙 This package is based on @JoshuaKGoldberg's template-typescript-node-package.