Force braces around control statements

EditorConfig key: js-force-control-statements-braces

Force braces around control statements

js-force-control-statements-braces

Whether to add or remove braces around the body of control statements.

Default value:

unset

Possible values:

  • unset
  • do_not_change
  • always_remove
  • always_add
  • only_for_multiline

Examples

unset
do_not_change
if (cond) x++;
always_remove
if (cond) x++;
always_add
if (cond) {
  x++;
}
only_for_multiline
if (cond) {
  x++;
  y++;
}