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

feat: add styled-jsx syntax parsing to stylelint #466

Merged
4 commits merged into from
May 22, 2024
Merged

feat: add styled-jsx syntax parsing to stylelint #466

4 commits merged into from
May 22, 2024

Conversation

ghost
Copy link

@ghost ghost commented May 10, 2024

See: https://dhis2.atlassian.net/browse/DHIS2-16776

Follow up for #464. Allows stylelint to parse styled-jsx to css that can be linted by stylelint.

Working syntaxes:

import css from 'styled-jsx/css'

export const button = css`
  button {
    padding-left: 1em;
  }
`
import css from 'styled-jsx/css'

export const body = css.global`button { padding-left: 1em; }`
import css from 'styled-jsx/css'

export const button = css.resolve`button { padding-left: 1em; }`
import css from 'styled-jsx/css'

export default css`button { padding-left: 1em; }`
export default () => (
  <div>
    <p>only this paragraph will get the style :)</p>

    <style jsx>{`
      p {
        margin-left: 1em;
      }
    `}</style>
  </div>
)

Follow up:

@ghost ghost changed the base branch from master to add-stylelint May 10, 2024 12:38
@ghost ghost force-pushed the add-syntax branch from b4af194 to d2db46b Compare May 10, 2024 12:39
Base automatically changed from add-stylelint to master May 15, 2024 11:12
@ghost ghost force-pushed the add-syntax branch from 27a0752 to 832af33 Compare May 15, 2024 11:39
@ghost ghost self-requested a review May 15, 2024 11:48
@ghost ghost changed the title feat: add styled-jsx syntax to stylelint feat: add styled-jsx syntax parsing to stylelint May 15, 2024
@ghost ghost marked this pull request as ready for review May 15, 2024 13:31
@ghost ghost merged commit 7da0346 into master May 22, 2024
13 checks passed
@ghost ghost deleted the add-syntax branch May 22, 2024 10:10
dhis2-bot added a commit that referenced this pull request May 22, 2024
# [10.7.0](v10.6.0...v10.7.0) (2024-05-22)

### Features

* add styled-jsx syntax parsing to stylelint ([#466](#466)) ([7da0346](7da0346))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 10.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants