eslint-plugin-import-sorting
v1.2.0
Published
ESLint plugin to group and sort imports by module, à la Python isort
Downloads
168
Maintainers
Readme
eslint-plugin-import-sorting
Enforce a convention in the order of import
statements, inspired by isort’s grouping style:
- Node standard modules
- Framework modules
- Third-party modules
- First-party modules
- Explicitly local modules
This plugin includes an additional group for “style” imports where the import source ends in .css
or other style format. Imports are sorted alphabetically, except for local modules, which are sorted by the number of .
segements in the path first, then alphabetically.
Usage
rules: {
'import-sorting/order': 'error',
}
See the order rule docs for more configuration options.