An ESLint plugin that provides a subset of import/export rules from eslint-plugin-import and eslint-plugin-antfu. Current stable version is v0.3.0 (supports ESLint v9 and v10). Zero dependencies, no module resolution — only focuses on import/export syntax. Active development with frequent breaking changes in minor versions due to rule renames and removals. Compared to eslint-plugin-import, it is leaner but may not support all scenarios (e.g., no Flow support since v0.2.1). Ships TypeScript types.
npm install eslint-plugin-importerVerified import paths — ran on the pinned version, not inferred.
Configures ESLint flat config with eslint-plugin-importer using dynamic import (ESM) and enables two example rules.
Rename rule to `no-duplicates-specifier`.
Use `preferInline` instead.
Migrate to non-Flow rules or use eslint-plugin-import-x for Flow support.
For resolution, use `eslint-plugin-import-x`. This plugin is strictly syntax-only.
Use dynamic `import()` in flat config or convert project to ESM.
Use `import()` or set `type: "module"` in package.json and use ESM imports.
// eslint.config.js
import importer from 'eslint-plugin-importer'
export default [
{
plugins: { importer },
rules: { 'importer/no-default-export': 'error' },
},
];Prefix rule with 'importer/', e.g., 'importer/no-duplicates'.
Use import { configs } from 'eslint-plugin-importer'.