eslint-plugin-import-lite
v0.6.0
Published
A lightweight ESLint plugin for import/export linting
Downloads
2,930,989
Maintainers
Readme
eslint-plugin-import-lite
Feature
- Zero dependencies.
- Port some useful rules that don't require a resolver from
eslint-plugin-import-x. - No need for a resolver and settings like those in
eslint-plugin-import-x. - Drop babel and flow support.
[!NOTE]
This plugin intentionally does NOT include binary resolvers — but contributions are welcome if you'd like to implement resolver support!
See all rules in src/rules
Available Rules
- consistent-type-specifier-style
- exports-last
- first
- newline-after-import
- no-default-export
- no-duplicates
- no-mutable-exports
- no-named-default
- prefer-default-export
Motivation
I extend my own ESLint config from @antfu/eslint-config.
Recently this config dropped eslint-plugin-import-x because it introduces built-in binary resolvers and makes it heavy.
In a discussion about the built-in resolver, the maintainer plans to keep it as a dependency, which makes it impossible to keep the package lightweight.
But there are some useful rules and some people (including me) want to bring the plugin back.
See Also
- eslint-plugin-fast-import - An ESLint plugin using a novel algorithm combined with the OXC Rust parser.
Credits
- eslint-plugin-import-x - source codes MIT
- eslint-stylistic - project structure and scripts MIT
