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)} />
Was this page helpful?
We use this feedback to improve our documentation.
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License