ESLint plugin

The essential plugin for use with the Atlassian Design System.

no-emotion-primitives

This rule ensures that imports from @atlaskit/primitives are replaced with their Compiled counterparts from @atlaskit/primitives/compiled. This helps ensure better performance and consistency across the codebase.

Examples

This rule marks code as violations when it uses the Emotion Primitives import path.

Incorrect

import { Box } from '@atlaskit/primitives';
import { Stack } from '@atlaskit/primitives';

Correct

import { Box } from '@atlaskit/primitives/compiled';
import { Stack } from '@atlaskit/primitives/compiled';

The rule will detect any imports from @atlaskit/primitives and suggest replacing them with the compiled version.

Options

autofix: When enabled, the rule will automatically fix imports to use the Compiled entrypoint instead of just warning. Defaults to false.

Configuration

Basic usage (warnings only):

{
  '@atlaskit/design-system/use-compiled-primitives': 'warn'
}

With auto-fixing enabled:

{
  '@atlaskit/design-system/use-compiled-primitives': ['warn', { autofix: true }]
}
Was this page helpful?
We use this feedback to improve our documentation.
  • Design system
    • Get started
    • Foundations
    • Components
    • Rovo UI
    • Tools
    • Release phases
    • Contact us
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License