Compiled

@compiled/eslint-plugin

This plugin contains rules that should be used when working with @compiled/react.

Usage

For projects in the Atlassian ecosystem or to adhere to Atlassian standards, please install the UI Styling Standard ESLint plugin instead of @compiled/eslint-plugin (as it includes this plugin).

The UI Styling Standard plugin is a superset of Compiled's ESLint rules that are customised to also apply to other CSS-in-JS libraries (Emotion, styled-components, and so on), to make migration to Compiled easier. It also contains several additional rules that make your styling more statically analysable, reusable and composable, and more performant.

For other projects, we recommend turning on all of the recommended rules for Compiled by adding plugin:@compiled/recommended in the extends section of your ESLint configuration:

// eslint.config.js

export default [
    {
+        "extends": ["plugin:@compiled/recommended"],
        rules: {
            semi: "error",
            "prefer-const": "error"
        }
    }
];

Rules

See here for a non-exhaustive list of rules in @compiled/eslint-plugin.

Suggest changes to this page ➚

Previous
css