atlassian-labs / compiled

A familiar and performant compile time CSS-in-JS library for React.
https://compiledcssinjs.com
Apache License 2.0
1.99k stars 67 forks source link

Update `@compiled/jsx-pragma` to properly support `importSources` #1706

Closed kylorhall-atlassian closed 1 month ago

kylorhall-atlassian commented 1 month ago

What is this change?

This allows for more scenarios where options.importSources is used in the @compiled/jsx-pragma rule so we don'd need to import @atlaskit/css (our typed wrapper) and @compiled/react.

How are we making this change?

This just refactors some parts of the AST to search for all compiled-like libraries, assuming importSources is that. I think this is what the original option intended to do, but it falls short in some circumstances.


PR checklist

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 5534012e9bc7b1fec9837dd537a5262542768d53

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------------- | ----- | | @compiled/eslint-plugin | Minor |

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

netlify[bot] commented 1 month ago

Deploy Preview for compiled-css-in-js canceled.

Name Link
Latest commit 5534012e9bc7b1fec9837dd537a5262542768d53
Latest deploy log https://app.netlify.com/sites/compiled-css-in-js/deploys/66e0f11387df970008ecacf2