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 false negatives for custom properties within var() in custom-property-pattern #5867

Merged
merged 5 commits into from Feb 7, 2022

Conversation

kawaguchi1102
Copy link
Contributor

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

Closes #3655

Is there anything in the PR that needs further explanation?

The following problem has not been solved.
You will need to create another isuue.

The following is a false positive (as it's invalid syntax) and should be ignored by this rule. We > can either squish that bug within this issue or create a separate issue for it.
--invalid-custom-property-variable: #fff;

#3655 (comment)

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.

@kawaguchi1102 Thank you so much for creating the pull request! And, sorry for the late response.

I've left some trivial suggestions, but this PR sounds almost good to me. 👍🏼

lib/rules/custom-property-pattern/index.js Outdated Show resolved Hide resolved
@ybiquitous
Copy link
Member

One more suggestion. Please rebase or merge the main branch to fix the failed CI jobs for Windows. (see #5874)

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.

Thanks for the pull request. Looking good.

Let's also reject tests for:

  • :root { --foo-color: #f00; } a { color: 'VAR(--boo-color)); }
  • :root { --foo-color: #f00; } a { color: 'var(--boo-color), var(--boo-sub-color)); }

The latter should produce two warnings, like so.

@kawaguchi1102
Copy link
Contributor Author

@ybiquitous @jeddy3 Thanks for the review.

I have fixed them, please review again.

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!

@jeddy3 jeddy3 mentioned this pull request Feb 6, 2022
6 tasks
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.

@kawaguchi1102 Thanks, LGTM 👍🏼

@jeddy3 jeddy3 changed the title Fix false negatives for custom properties within var() in custom-property-pattern (#3655) Fix false negatives for custom properties within var() in custom-property-pattern Feb 7, 2022
@jeddy3 jeddy3 merged commit 35c0e88 into stylelint:main Feb 7, 2022
@jeddy3
Copy link
Member

jeddy3 commented Feb 7, 2022

  • Fixed: custom-property-pattern false negatives for custom properties within var() (#5867).

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 false negatives for custom properties within var() in custom-property-pattern
3 participants