eslint-plugin-import-sorter

0.4.0 • Public • Published

eslint-plugin-import-sorter

Auto fix the imports beginning in files.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-import-sorter:

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

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

Usage

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

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

Rules

  • Sort imports into a fixed order. (order)
  • Sort specifiers within a single import. (specifier)

Package Sidebar

Install

npm i eslint-plugin-import-sorter

Weekly Downloads

2

Version

0.4.0

License

ISC

Unpacked Size

22.6 kB

Total Files

8

Last publish

Collaborators

  • fengkun