Skip to content
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

Ignore less variables (#4200) #4405

Merged
merged 3 commits into from
Nov 12, 2019

Conversation

fanich37
Copy link
Member

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

It should close #4200 .

Is there anything in the PR that needs further explanation?

No, it's self explanatory.

Copy link
Member

@hudochenkov hudochenkov left a comment

Choose a reason for hiding this comment

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

Looks good!

lib/rules/length-zero-no-unit/index.js Outdated Show resolved Hide resolved
// Ignore Less variables
if (atRule.variable && !hasBlock(atRule)) {
return;
}
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should move this to utils?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds reasonable.
Added util function and some tests.

@fanich37 fanich37 force-pushed the lznu-ignore-less-var branch from 9361495 to a86f17b Compare November 11, 2019 16:44
@fanich37 fanich37 force-pushed the lznu-ignore-less-var branch from a86f17b to 7766726 Compare November 11, 2019 16:45
@hudochenkov hudochenkov merged commit 6f81748 into stylelint:master Nov 12, 2019
@hudochenkov
Copy link
Member

  • Fixed: length-zero-no-unit false positives for Less variables (#4405).

@fanich37 fanich37 deleted the lznu-ignore-less-var branch November 12, 2019 12:38
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.

Fix false positives for Less variables in length-zero-no-unit
3 participants