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 isStandardSyntaxFunction
false positives for interpolation and backticks in CSS-in-JS
#6565
Conversation
…icks in CSS-in-JS. Fixes #6564
🦋 Changeset detectedLatest commit: 221dbaa The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for creating the pull request. If addressing my reviews, it may be good to update the PR title like this:
Fix `isStandardSyntaxFunction` false positives for interpolation and backticks in CSS-in-JS
function-no-unknown
false positives for interpolation and backticks in CSS-in-JS. Fixes #6564isStandardSyntaxFunction
false positives for interpolation and backticks in CSS-in-JS. Fixes #6564
@ybiquitous I agree with your suggestion. I've updated PR title, but I don't think we need to mention internal function in a changelog. Because users don't care about internal functions, but they care about rules. |
isStandardSyntaxFunction
false positives for interpolation and backticks in CSS-in-JS. Fixes #6564isStandardSyntaxFunction
false positives for interpolation and backticks in CSS-in-JS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. LGTM. Thank you 👍🏼
it('CSS-in-JS interpolation', () => { | ||
expect( | ||
isStandardSyntaxFunction( | ||
getFunction('${({ size }) => (size === "small") ? "0.8em" : "1em"}'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is great, exactly what i was getting at in the other issue - a generic test for all css-in-js function nodes.
nice work 🎉
Fixes #6564
Tests for the rule are skipped, because there is no CSS-in-JS syntax added to the repo yet.
Waiting for #6556.