eslint-plugin-sort-import

1.0.7 • Public • Published

eslint-plugin-sort-import

Travis build status NPM version

sort-import eslint

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-sort-import:

$ npm install eslint-plugin-sort-import --save-dev

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

Usage

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

{
  "plugins": ["sort-import"]
}

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

{
  "rules": {
    "sort-import/order-import": [
      "error",
      {
        "ignoreCase": true,
        "ignoreMemberSort": false,
        "memberSyntaxSortOrder": ["react", "single", "multiple", "all", "none"]
      }
    ]
  }
}

Supported Rules

  • Fill in provided rules here

Package Sidebar

Install

npm i eslint-plugin-sort-import

Weekly Downloads

3

Version

1.0.7

License

ISC

Unpacked Size

14.9 kB

Total Files

7

Last publish

Collaborators

  • dev_mistertemp