Registry / testing / eslint-plugin-import-lite

eslint-plugin-import-lite

JSON →
library0.6.0jsnpmunverified

A lightweight ESLint plugin for import/export linting that ports useful rules from eslint-plugin-import-x without requiring a resolver or heavy dependencies. Current stable version 0.6.0 supports ESLint 9 and 10, requires Node >=18.18, and ships zero runtime dependencies. Key differentiators: no binary resolver, no Babel/Flow support, purely ESLint flat config, TypeScript types included. Released under MIT, with monthly updates since initial release in 2025. Ideal for users of @antfu/eslint-config who want import rules without resolver overhead.

npm install eslint-plugin-import-lite
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-IMPO
E
eslint-plugin-import-lite
testingjavascriptv0.6.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
import plugin from 'eslint-plugin-import-lite'
const plugin = require('eslint-plugin-import-lite')
ESM-only package, exports default object. For flat config, use spread: ...plugin.configs.recommended
rules
import { rules } from 'eslint-plugin-import-lite'
const { rules } = require('eslint-plugin-import-lite')
Named export of rules map, also ESM-only.
configs
import { configs } from 'eslint-plugin-import-lite'
Contains recommended and all configs as flat config arrays.

Example ESLint flat configuration enabling the recommended rules from eslint-plugin-import-lite.

// eslint.config.js import plugin from 'eslint-plugin-import-lite'; export default [ ...plugin.configs.recommended, // Override rules if needed { rules: { 'import-lite/first': 'error', 'import-lite/no-default-export': 'warn', }, }, ];
Debug
Known issues
breakingv0.3.0 renames options for 'consistent-type-specifier-style'
fix
Update rule options to match new naming: preferAutomatic -> preferPreferAutomatic (check docs).
affects: >=0.3.0 <0.3.0
gotchaPlugin is ESM-only; requires Node >=18.18 and ESLint flat config (no .eslintrc).
fix
Use import syntax and flat config. Switch to module type or use .mjs extension.
affects: >=0.0.0
gotchaNo resolver support – rules that need module resolution (e.g., 'no-unresolved') are not included.
fix
Use eslint-plugin-import-x or configure a resolver separately if needed.
affects: >=0.0.0
deprecatedDropped Babel and Flow support since v0.1.0
fix
Migrate TypeScript/JavaScript code away from Babel/Flow-specific syntax.
affects: >=0.1.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module ...
Package is ESM-only; CommonJS require() fails.
fix
Use import syntax, ensure parent package is ESM, or use dynamic import().
Failed to load plugin 'import-lite': Cannot find module 'eslint-plugin-import-lite'
Plugin not installed or not in node_modules.
fix
Run: npm install eslint-plugin-import-lite --save-dev
Invalid config: "import-lite/first" has been removed.
Trying to use a rule that was not ported or removed in later version.
fix
Check src/rules directory for available rules; only 9 rules are implemented.
Upgrade
Version history
0.6.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency – plugin requires ESLint 9 or 10
Agent activity
13 hits · last 30 days
node
12
Amazon
1
Resources
eslint-plugin-import-lite — npm install eslint-plugin-import-lite · libregistry