-
Notifications
You must be signed in to change notification settings - Fork 0
[JS] SingleLineBlockPatternRule #6
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| const a = 5; | ||
|
|
||
| if (a === 1) { | ||
| console.log('P'); | ||
| } else if (a === 2) console.log('D'); | ||
| else console.log('G'); | ||
|
|
||
| for (let index = 0; index < 15; index++) console.log(index); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This single-line block should be wrapped with curly braces. |
||
|
|
||
| if (a > 2) { | ||
| const b = 15; | ||
| const c = 16; | ||
| const d = 17; | ||
|
|
||
| if (a < 15) { | ||
| const e = 19; | ||
|
|
||
| if (a === 10) console.log('test2'); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This single-line block should be wrapped with curly braces. |
||
| } | ||
| } | ||
|
|
||
| do console.log('a'); | ||
| while (1); | ||
|
Comment on lines
+22
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This single-line block should be wrapped with curly braces. |
||
|
|
||
| while (a < 100) { | ||
| console.log('AAA'); | ||
| } | ||
|
|
||
| while (a < 100) console.log('AAA'); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This single-line block should be wrapped with curly braces. |
||
|
|
||
| for (const element of elements) { | ||
| console.log(element); | ||
| } | ||
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.
This single-line block should be wrapped with curly braces.