Skip to content

Fix length-zero-no-unit autofix for .0 values#6098

Merged
ybiquitous merged 1 commit intostylelint:mainfrom
playhardgopro:main
May 19, 2022
Merged

Fix length-zero-no-unit autofix for .0 values#6098
ybiquitous merged 1 commit intostylelint:mainfrom
playhardgopro:main

Conversation

@playhardgopro
Copy link
Copy Markdown
Contributor

@playhardgopro playhardgopro commented May 18, 2022

Which issue, if any, is this issue related to?

Closes #6074

Is there anything in the PR that needs further explanation?

I tested these changes in the reproduction repository and

  • works well with .0rem (.0rem -> 0)
  • doesn't work with .0 (still .0 -> '')

So should we fix it for the second case? It doesn't seem to be the problem with this rule. @ybiquitous correct me if I'm wrong.

Copy link
Copy Markdown
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@playhardgopro Thank you for your first contribution! The fix looks good to me. 👍🏼

The case of .0 is not related to length-zero-no-unit, so there are no problems.

@ybiquitous ybiquitous changed the title Fix length-zero-no-unit bug with '.0rem' -> '' Fix length-zero-no-unit autofix with .0rem May 19, 2022
@ybiquitous ybiquitous changed the title Fix length-zero-no-unit autofix with .0rem Fix length-zero-no-unit autofix with .0{unit} May 19, 2022
@ybiquitous ybiquitous changed the title Fix length-zero-no-unit autofix with .0{unit} Fix length-zero-no-unit autofix for .0 values May 19, 2022
@ybiquitous ybiquitous merged commit e401d87 into stylelint:main May 19, 2022
@ybiquitous
Copy link
Copy Markdown
Member

Changelog entry added:

Fixed: length-zero-no-unit autofix for .0 values (#6098).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

length-zero-no-unit autofix not working

2 participants