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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add media-feature-name-unit-allowed-list #6550

Merged
merged 15 commits into from Jan 5, 2023

Conversation

mattxwang
Copy link
Member

@mattxwang mattxwang commented Dec 30, 2022

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

Closes #6509.

Is there anything in the PR that needs further explanation?

@romainmenke has asked a question about warning on values with no unit; my assumption is no, but I'd love to get that checked!

I've also left some notes where I could use some guidance. Since I'm still a relatively junior contributor (and I'm a bit rusty 馃槗 ), any advice is appreciated!

And, given all of their help, would be great to include the co-author commit for @romainmenke!

Adds base rule, refactors slightly from @romainmenke's suggestion;
adds docs, rudimentary tests.

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>
@changeset-bot
Copy link

changeset-bot bot commented Dec 30, 2022

馃 Changeset detected

Latest commit: 61e2dd6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
stylelint Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member Author

@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.

Getting ready to mark this as review; leaving some comments where I could use some guidance!

lib/rules/media-feature-name-unit-allowed-list/index.js Outdated Show resolved Hide resolved
lib/rules/media-feature-name-unit-allowed-list/index.js Outdated Show resolved Hide resolved
Comment on lines 84 to 85
index: atRuleIndex + childEntry.node.value[2],
endIndex: atRuleIndex + childEntry.node.value[3] + 1,
Copy link
Member Author

Choose a reason for hiding this comment

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

Two "hardcoded" values indicated by @romainmenke.

@mattxwang mattxwang marked this pull request as ready for review January 3, 2023 07:53
mattxwang and others added 2 commits January 3, 2023 00:00
Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>
Co-authored-by: Marc G. <Mouvedia@users.noreply.github.com>
Copy link
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.

Thank you for creating this pull request. I believe there are no significant problems. 馃憤馃徏

I've left some suggestions to improve the doc and code.

lib/rules/media-feature-name-unit-allowed-list/README.md Outdated Show resolved Hide resolved
lib/rules/media-feature-name-unit-allowed-list/README.md Outdated Show resolved Hide resolved
lib/rules/media-feature-name-unit-allowed-list/README.md Outdated Show resolved Hide resolved
lib/rules/media-feature-name-unit-allowed-list/index.js Outdated Show resolved Hide resolved
lib/rules/media-feature-name-unit-allowed-list/index.js Outdated Show resolved Hide resolved
lib/rules/media-feature-name-unit-allowed-list/index.js Outdated Show resolved Hide resolved
package-lock.json Outdated Show resolved Hide resolved
@mattxwang
Copy link
Member Author

Thank you for the in-depth review @ybiquitous, appreciate your attention to detail and good eye for readability. I believe I've addressed all the comments for this PR (tabling conversations about the parseMediaQuery util and a potential media-feature-no-invalid-range for later.

Also, this is an oversight on my part - should we be merging this into v15 or main? I absentmindedly picked v15 at the start since I assumed the major release was coming soon. I can do some interactive rebase hacking to get this into main instead!

Copy link
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.

@mattxwang Thank you so much for addressing the reviews. Yes, the v15 branch is suitable as a base. LGTM 馃憤馃徏

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.

None yet

4 participants