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 no-unknown-custom-media #7594

Merged
merged 9 commits into from
Apr 10, 2024

Conversation

fpetrakov
Copy link
Contributor

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

Closes #6362

Is there anything in the PR that needs further explanation?

No, it's self-explanatory.

Copy link

changeset-bot bot commented Apr 6, 2024

🦋 Changeset detected

Latest commit: 12d20ff

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

@fpetrakov fpetrakov force-pushed the rule/no-unknown-custom-media branch 3 times, most recently from daba0da to 2737a1d Compare April 7, 2024 16:37
@fpetrakov fpetrakov marked this pull request as ready for review April 7, 2024 16:38
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.

@fpetrakov Thank you for creating this pull request! The direction is correct, but I've suggested some bugfixes and refactorings. Can you take a look at them?

docs/user-guide/rules.md Outdated Show resolved Hide resolved
lib/rules/index.mjs Outdated Show resolved Hide resolved
lib/rules/no-unknown-custom-media/README.md Outdated Show resolved Hide resolved
lib/rules/no-unknown-custom-media/__tests__/index.mjs Outdated Show resolved Hide resolved
lib/rules/no-unknown-custom-media/__tests__/index.mjs Outdated Show resolved Hide resolved
lib/rules/no-unknown-custom-media/index.mjs Outdated Show resolved Hide resolved
lib/rules/no-unknown-custom-media/index.mjs Outdated Show resolved Hide resolved
lib/rules/no-unknown-custom-media/index.mjs Outdated Show resolved Hide resolved
lib/rules/no-unknown-custom-media/index.mjs Outdated Show resolved Hide resolved
types/stylelint/index.d.ts Outdated Show resolved Hide resolved
fpetrakov and others added 4 commits April 8, 2024 12:17
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
@fpetrakov
Copy link
Contributor Author

@ybiquitous thanks a lot for the review, learned a bunch of things

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. LGTM 👍🏼

@Mouvedia
Copy link
Member

Mouvedia commented Apr 8, 2024

There's something interesting about this rule addition.
AFAIK no browsers currently support @custom-media.
e.g. https://issues.chromium.org/issues/40781325
Which means the rule is being added on the premise that you are using a lowering tool.
Maybe we could link to those in the rule's README?
e.g.

@fpetrakov fpetrakov force-pushed the rule/no-unknown-custom-media branch from b15d52b to 2f9a6f7 Compare April 9, 2024 11:05
Copy link
Member

@Mouvedia Mouvedia left a comment

Choose a reason for hiding this comment

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

LGTM

@ybiquitous
Copy link
Member

For #7594 (comment), I don't think adding some links to transpiling tools (e.g. postcss plugins or parcel) is necessary, even if there is insufficient support in the current browsers. We already have another rule for @custom-media, so we must keep such links up-to-date across documents.

See https://github.com/stylelint/stylelint/blob/08910de8bb3775b06efed7f7990e81d47548bace/lib/rules/custom-media-pattern/README.md

@ybiquitous ybiquitous merged commit dcb42d9 into stylelint:main Apr 10, 2024
16 checks passed
emmacharp pushed a commit to emmacharp/stylelint that referenced this pull request May 7, 2024
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Co-authored-by: Marc G <Mouvedia@users.noreply.github.com>
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 no-unknown-custom-media
3 participants