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 range context support for media-feature-name-* rules #4581

Merged

Conversation

jdiogopeixoto
Copy link
Member

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

Closes #1744

Is there anything in the PR that needs further explanation?

No, it's self explanatory.

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

@jdiogopeixoto Thank you so much for this substantial piece of work!

The tests and documentation look good to me.

You weren't to know this, but I believe @evilebottnawi was keen to refactor these rules to use postcss-values-parser rather than postcss-media-query-parser as the latter is no longer maintained. I believe such a refactor would remove the need to introduce styleSearch into the rules.

However, refactoring is a more extensive piece of work and is something we can do at a later date. I believe this pull request addresses the needs of the user, and so gets my approval.

I can create a follow-up issue for the refactor after we merge this pull request.

@jeddy3 jeddy3 mentioned this pull request Feb 8, 2020
21 tasks
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.

Nice work!

}

function getRangeContextName(parsedNode) {
if (parsedNode.length === 3) {
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a comment into the code explaining what is this 3? It's not clear where this number came from.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I added more context to that.

@jeddy3
Copy link
Member

jeddy3 commented Feb 8, 2020

I fixed the conflict from merging #4561.

@jeddy3
Copy link
Member

jeddy3 commented Feb 8, 2020

After we merge this, I will work on #4539 as I believe this is the last unmerged pull request with documentation changes.

@jeddy3 jeddy3 merged commit a15295a into stylelint:master Feb 8, 2020
@jeddy3
Copy link
Member

jeddy3 commented Feb 8, 2020

  • Fixed: media-feature-name-* false negatives for range context (#4581).

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 range context support to media-feature-name-* rules
3 participants