Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always force curly braces for block statements #25

Open
okovpashko opened this issue Oct 17, 2022 · 0 comments
Open

Always force curly braces for block statements #25

okovpashko opened this issue Oct 17, 2022 · 0 comments
Labels
3.0.0 Issues related to v3 release

Comments

@okovpashko
Copy link
Member

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.

@okovpashko okovpashko added the 3.0.0 Issues related to v3 release label Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0.0 Issues related to v3 release
Projects
None yet
Development

No branches or pull requests

1 participant