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

Fix *-case|*-unknown false positives for CSS-in-JS template literals #6666

Merged
merged 9 commits into from
Feb 17, 2023

Conversation

hudochenkov
Copy link
Member

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

Fixes #6659.

Is there anything in the PR that needs further explanation?

All rules has same issues: trying to lint non-standard value. Based on test one rule (unit-no-unknown) has a “regression”. Since the fix ignores declaration with non-standard values. It means that previous linted declaration with dollar-variables are now ignored as well. Given focus of Stylelint on standard CSS only, and policy to ignore non-standard syntax, I consider this “regression” acceptable as it doesn't break builds or report new violation.

@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2023

🦋 Changeset detected

Latest commit: a40de25

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

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

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

@jeddy3 jeddy3 changed the title Fix false positives in CSS-in-JS Fix *-case|*-unknown false positives for CSS-in-JS template literals Feb 17, 2023
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.

Thank you! Just some minor nits, otherwise LGTM.

(We're adopting a shorthand for early returns as we often use them in rules.)

Given focus of Stylelint on standard CSS only, and policy to ignore non-standard syntax, I consider this “regression” acceptable as it doesn't break builds or report new violation.

SGTM.

lib/rules/annotation-no-unknown/index.js Outdated Show resolved Hide resolved
.changeset/five-waves-relax.md Outdated Show resolved Hide resolved
lib/rules/function-name-case/index.js Outdated Show resolved Hide resolved
lib/rules/function-no-unknown/index.js Outdated Show resolved Hide resolved
lib/rules/unit-no-unknown/index.js Outdated Show resolved Hide resolved
lib/rules/value-keyword-case/index.js Outdated Show resolved Hide resolved
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
@hudochenkov
Copy link
Member Author

OMG! Check out this PR number: 6666! :)

@jeddy3
Copy link
Member

jeddy3 commented Feb 17, 2023

OMG! Check out this PR number: 6666! :)

Ha, I noticed it too. Nice! It will be another 1111 issues/prs before we see a sequence like that again.

Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
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.

LGTM, thank you.

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

@jeddy3 jeddy3 merged commit 47ee304 into main Feb 17, 2023
@jeddy3 jeddy3 deleted the fix-css-in-js-false-positives branch February 17, 2023 15:59
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 *-case|*-unknown false positives for CSS-in-JS template literals
3 participants