@putout/plugin-sort-imports-by-specifiers

1.1.0 • Public • Published

@putout/plugin-sort-imports-by-specifiers NPM version

The static import declaration is used to import read-only live bindings which are exported by another module. The imported bindings are called live bindings because they are updated by the module that exported the binding, but cannot be re-assigned by the importing module.

(c) MDN

🐊Putout plugin adds ability to find and sort import statements by specifiers. Checkout in 🐊Putout Editor.

Install

npm i @putout/plugin-sort-imports-by-specifiers

Rule

{
    "rules": {
        "sort-imports-by-specifiers": "on"
    }
}

❌ Example of incorrect code

import {
    a,
    b,
    c,
    d,
} from 'd';
import a1 from 'a1';

✅ Example of correct code

import a1 from 'a1';
import {
    a,
    b,
    c,
    d,
} from 'd';

License

MIT

Package Sidebar

Install

npm i @putout/plugin-sort-imports-by-specifiers

Weekly Downloads

5,279

Version

1.1.0

License

MIT

Unpacked Size

5.06 kB

Total Files

4

Last publish

Collaborators

  • coderaiser