Skip to content

tinloof/eslint-plugin-better-styled-components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

33 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

eslint-plugin-better-styled-components ๐Ÿ’…

Auto fixable ESlint's rules for styled components.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-better-styled-components:

$ npm install eslint-plugin-better-styled-components --save-dev

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

Usage

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

{
    "plugins": [
        "better-styled-components"
    ]
}

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

{
    "plugins": [
        "better-styled-components"
    ],
    "rules": {
        "better-styled-components/sort-declarations-alphabetically": 2
    }
}

Supported Rules

  • ๐Ÿ”คsort-declarations-alphabetically: auto fixable rule that enforces alphabetically sorted declarations.

License

Unless otherwise specified this project is licensed under Apache License Version 2.0.