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 custom-property-empty-line-before false positives for CSS-in-JS #6767

Merged
merged 3 commits into from Apr 10, 2023

Conversation

ybiquitous
Copy link
Member

@ybiquitous ybiquitous commented Apr 9, 2023

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

Closes #6766

Is there anything in the PR that needs further explanation?

This change fixes the isFirstNested() utility that the custom-property-empty-line-before rule internally uses.

The rule's test does not change in order to avoid adding an extra dependency for CSS-in-JS.

See also the PostCSS API for the Document node: https://postcss.org/api/#document

This change fixes the `isFirstNested()` utility that the `custom-property-empty-line-before` rule internally uses.

The rule's test does not change in order to avoid adding an extra dependency for CSS-in-JS.

See also the PostCSS API for the `Document` node: <https://postcss.org/api/#document>
@changeset-bot
Copy link

changeset-bot bot commented Apr 9, 2023

🦋 Changeset detected

Latest commit: b1e2007

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

Copy link
Member Author

@ybiquitous ybiquitous Apr 9, 2023

Choose a reason for hiding this comment

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

[note] Instead of installing a custom syntax package, I wrote a naive custom syntax only for testing.
See also https://postcss.org/docs/how-to-write-custom-syntax

@ybiquitous ybiquitous marked this pull request as ready for review April 9, 2023 17:04
@ybiquitous
Copy link
Member Author

Note: Probably, this PR should be applied to not only postcss-styled-syntax but also other CSS-in-JS syntaxes supporting template literals.

@hudochenkov I would appreciate it if you could let me any concerns about PostCSS's CSS-in-JS syntaxes.

Copy link
Member

@hudochenkov hudochenkov left a comment

Choose a reason for hiding this comment

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

Looks good!

@ybiquitous
Copy link
Member Author

Thanks for the review!

@ybiquitous ybiquitous merged commit 1368b1c into main Apr 10, 2023
14 checks passed
@ybiquitous ybiquitous deleted the issue-6766 branch April 10, 2023 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants