-
Notifications
You must be signed in to change notification settings - Fork 73
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
Indent if while for body when splits #159
Indent if while for body when splits #159
Conversation
Codecov Report
@@ Coverage Diff @@
## master #159 +/- ##
==========================================
+ Coverage 98.2% 98.26% +0.05%
==========================================
Files 66 66
Lines 446 461 +15
Branches 56 60 +4
==========================================
+ Hits 438 453 +15
Misses 8 8
Continue to review full report at Codecov.
|
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.
apart for that small thing, this LGTM
src/nodes/IfStatement.js
Outdated
@@ -1,38 +1,58 @@ | |||
/* eslint-disable implicit-arrow-linebreak */ |
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.
we shouldn't have these lines anymore
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.
I was waiting for #157 to be merged. now I rebased to master.
72ad310
to
0579c82
Compare
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.
👍
while solving #138
I found that there's a mismatch between the AST for
if (x) return true;
andif (x) { return true; }
.Nonetheless, I found some benefits in the exercise of creating the feature so for the moment as a compromise, this PR indents the bodies of an
IfStatement
,ForStatement
, andWhileStatement
in case of them being too long.I also added the case of forcing the indentation of a nested
if
.