ESLint plugin
The essential plugin for use with the Atlassian Design System.use-cx-function-in-xcss
Enforces using the cx function when combining styles in an xcss prop to maintain correct typing. Docs link, (opens new window).
Examples
This rule checks for xcss props with multiple values and enforces using cx function in these.
Incorrect
<Box xcss={[styles.root, styles.bordered]} />Correct
<Box xcss={cx(styles.root, styles.bordered)} />