eslint-plugin-styled-components-order

1.0.3 • Public • Published

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-dev

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

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

Note: 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.

/eslint-plugin-styled-components-order/

    Package Sidebar

    Install

    npm i eslint-plugin-styled-components-order

    Weekly Downloads

    222

    Version

    1.0.3

    License

    Apache License Version 2.0.

    Unpacked Size

    29.7 kB

    Total Files

    9

    Last publish

    Collaborators

    • swiftwella