1.0.3 • Published 2 years ago
eslint-plugin-styled-components-order v1.0.3
eslint-plugin-styled-components-order 💅
Auto fixable ESlint's rules for sorting styled components, either alphabetically or concentrically.
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-styled-components-order:
$ npm install eslint-plugin-styled-components-order --save-devNote: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-styled-components-order globally.
Usage
Add styled-components-order to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"styled-components-order"
]
}Then configure the rules you want to use under the rules section.
{
"plugins": [
"styled-components-order"
],
"rules": {
// Use only one of the following rules
"styled-components-order/sort-declarations-alphabetically": "error",
"styled-components-order/sort-declarations-concentrically": "error"
}
}Supported Rules
- 🔤
sort-declarations-alphabetically: auto fixable rule that enforces alphabetically sorted declarations. - 🔤
sort-declarations-concentrically: auto fixable rule that enforces concentrically sorted declarations.
License
Unless otherwise specified this project is licensed under Apache License Version 2.0.