atlassian-labs / compiled

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

Remove the invariant to fail on an empty cssMap object for easier iterative development. #1652

Closed kylorhall-atlassian closed 4 months ago

kylorhall-atlassian commented 5 months ago

I personally noticed this wasn't breaking in local development, but was blocking in CI, and given we don't have any type checking around it, I wonder if the error is of any value?

Just figured I'd drop a PR to validate if there's a reason.

changeset-bot[bot] commented 5 months ago

🦋 Changeset detected

Latest commit: 18368677b6dc332d270e0298bf021588c91d2e95

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

This PR includes changesets to release 1 package | Name | Type | | ---------------------- | ----- | | @compiled/babel-plugin | 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

itsdouges commented 5 months ago

I'm a fan. If we want to prevent dangling empty objects a lint rule would be more appropriate.