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
Fix trailing zeroes being removed by autofix in length-zero-no-unit #5256
Conversation
@@ -318,7 +326,7 @@ testRule({ | |||
}, | |||
{ | |||
code: 'a { top: 0.000px; }', | |||
fixed: 'a { top: 0; }', | |||
fixed: 'a { top: 0.000; }', |
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.
Should have been outside the scope of this rule in favour of number-no-trailing-zeros.
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.
Agreed. 👍🏼
So, this change may be a bug fix, not a refactoring?
(maybe, this PR title is confusing... 🤔 )
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. This PR can make the code very clearer and readable! 👏🏼
I've left the comments, but this change is totally so good! 😄
@@ -318,7 +326,7 @@ testRule({ | |||
}, | |||
{ | |||
code: 'a { top: 0.000px; }', | |||
fixed: 'a { top: 0; }', | |||
fixed: 'a { top: 0.000; }', |
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.
Agreed. 👍🏼
So, this change may be a bug fix, not a refactoring?
(maybe, this PR title is confusing... 🤔 )
@ybiquitous Thanks for the review! Good catches and suggestions.
Yes, it started out as a refactor but fixed a bug. I'll change the title, and as such, the changelog entry. |
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. LGTM! 👏🏼
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.
👍
|
Closes #5255
It makes use of patterns found in our more recent rules.