Ensure emotion is imported at the end of absolute imports
See import-order-emotion
documentation for details
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-import-emotion
:
$ npm install eslint-plugin-import-emotion --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-import-emotion
globally.
Add import-order-emotion
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"import-order-emotion"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"import-order-emotion/import-order-emotion": "error"
}
}