11.0.0 • Published 3 years ago

eslint-plugin-emotion v11.0.0

Weekly downloads
50,246
License
MIT
Repository
-
Last release
3 years ago

eslint-plugin-emotion

Apply eslint rules to emotion.sh css-in-js

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-emotion:

$ npm install eslint-plugin-emotion --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-emotion globally.

Usage

Add emotion to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["emotion"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "emotion/syntax-preference": [2, "string"]
  }
}

Supported Rules