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

Add color-function-notation #4760

Merged
merged 1 commit into from May 19, 2020
Merged

Add color-function-notation #4760

merged 1 commit into from May 19, 2020

Conversation

jeddy3
Copy link
Member

@jeddy3 jeddy3 commented May 9, 2020

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

Closes #4718

Is there anything in the PR that needs further explanation?

I thought I'd give this one a whirl as it's been a while since I wrote a rule.

The "modern" option is autofixable, and I've addressed the edge-cases I can think of.

There may be a neater way to write the fixing code that doesn't rely on a count.

Copy link
Member

@m-allanson m-allanson left a comment

Choose a reason for hiding this comment

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

Nice.

lib/rules/color-function-notation/README.md Outdated Show resolved Hide resolved
Copy link
Member

@mattxwang mattxwang left a comment

Choose a reason for hiding this comment

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

Not the most experienced dev on the topic, but I will say the test cases seem reasonably expansive: testing different combinations of units, using calc and CSS variables, and testing rgb, rgba, hsl, and hsla. Documentation also seems expressive enough.

Gets a LGTM from me! 👍

@jeddy3
Copy link
Member Author

jeddy3 commented May 18, 2020

@malsf21 Thank you for the review!

Not the most experienced dev on the topic

With the bugs that you've been squashing, you have more familiarity with stylelint than most! We're a small group of contributors, and so any help makes an impact and is appreciated (whether that's squashing bugs, reviewing pull requests or triaging issues!).


Let's merge this pull request after we release 13.4.1 (#4791) and when the other two related rules are approved.

@jeddy3 jeddy3 merged commit 849c137 into master May 19, 2020
@jeddy3 jeddy3 deleted the issue-4718 branch May 19, 2020 12:43
@jeddy3
Copy link
Member Author

jeddy3 commented May 19, 2020

Changelog:

  • Added: color-function-notation rule (#4760).

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.

Add color-function-notation
4 participants