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
Add autofixer to block-indentation
rule
#2281
Add autofixer to block-indentation
rule
#2281
Conversation
block-indentation
rule
Hope to see this and #2271 land! |
6fd7354
to
b1ecfff
Compare
Yeah this one seems good I think. |
tests pass @bmish 🙌 |
Looks like you need to run |
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 is looking pretty good, thanks for working on it. I think we need a bit more high-level commenting to help people follow what's going on since the logic is a bit complex.
@@ -21,7 +21,7 @@ | |||
|
|||
<div> | |||
<p>{{t "greeting"}}</p> | |||
</div> | |||
</div> |
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 looks wrong?
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.
That's the purpose. It says Bad example but It's actually a good one 😅
Template(node) { | ||
if (this.mode === 'fix') { | ||
if ( | ||
node.body[0] && |
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.
Better way to write this is: node.body.length > 0
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.
Like I said thé indentation of block start IS validated only for thé first node while It should validated all. This code disappear if WE want to really fix this issue
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 is looking pretty good, thanks for working on it. I think we need a bit more high-level commenting, maybe some clearer naming to help people follow what's going on since the logic is a bit complex.
There is an issue on thé Indent. I did a fix at first but rollbacked It cause I didn't know if I should do It in this PR. <div>
</div>
<span>
</span> The fix of thé rule and thé autofix are quitté easy, let me know if you want It in this PR |
@VincentMolinie it should be fine for us to fix the bug as a follow-up PR. Thanks for working on this! |
Okey so you want me to rollback: 0e20e0c ? |
@VincentMolinie would it be easy for you to extract that bug fix to a follow-up PR? If so, let's do that quickly. If too inconvenient, we can keep them together. |
07244d3
to
179bc67
Compare
Done ✅ @bmish |
@VincentMolinie thanks, did you see the above comment about the bug extraction? Just wondering what you think. |
Yes I removed the commit 😉 and I will create a PR once this one is merged ^^ |
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.
Thank you!
@VincentMolinie excellent, can you create that other PR now? |
It's right here: #2318 |
No description provided.