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
merged 4 commits into from
May 22, 2024
Merged

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

merged 4 commits into from
May 22, 2024

Conversation

ismay
Copy link
Member

@ismay ismay 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:

@ismay ismay changed the base branch from master to add-stylelint May 10, 2024 12:38
Base automatically changed from add-stylelint to master May 15, 2024 11:12
@ismay ismay requested a review from a team May 15, 2024 11:48
@ismay ismay changed the title feat: add styled-jsx syntax to stylelint feat: add styled-jsx syntax parsing to stylelint May 15, 2024
@ismay ismay marked this pull request as ready for review May 15, 2024 13:31
@ismay ismay merged commit 7da0346 into master May 22, 2024
13 checks passed
@ismay ismay 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 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants