Skip to content

Always force curly braces for block statements #25

Open
@okovpashko

Description

@okovpashko

Currently, the config forces omitting curly braces for the one-line block statements:

if (shouldInvoke) { // error: Unnecessary { after 'if' condition.(curly)
  invoke();
}

To fix the error we must write the condition in the following way:

if (shouldInvoke)
  invoke();

I suggest forcing the curly braces even for one-line condition/loop bodies because they make the code easier to read and we get a more consistent code style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.0.0Issues related to v3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions