-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: disable curly rule #20
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JavaScript allows the omission of curly braces when a block contains only one statement. However, it is considered by many to be best practice to never omit curly braces around blocks, even when they are optional, because it can lead to bugs and reduces code clarity.
Kind of agree with this, mostly for consistency. Inconsistency sometimes is less readable in my opinion.
@thomasowow @bb441db I added multi-or-nest Incorrect
correct
|
{ blankLine: 'always', prev: 'multiline-const', next: '*' }, | ||
{ blankLine: 'always', prev: '*', next: 'multiline-const' }, | ||
{ blankLine: 'always', prev: 'multiline-let', next: '*' }, | ||
{ blankLine: 'always', prev: '*', next: 'multiline-let' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just question it covers return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, though: Could you create a separate PR for this? 🙏🏻
Disable curly
if (statement) return