Registry / testing / eslint-plugin-fast-import

eslint-plugin-fast-import

JSON →
library2.2.1jsnpmunverified

An ESLint plugin for validating imports and exports, leveraging a novel algorithm with the OXC Rust-based parser for high performance. Current stable version is 2.2.1, with a rapid release cadence. It offers an editor mode that keeps in-memory data structures updated with filesystem changes, preventing stale errors. Unlike eslint-plugin-import and eslint-plugin-import-x, it does not support user-supplied resolvers and only analyzes first-party code within rootDir. It includes rules like no-cycle, no-entry-point-imports, no-external-barrel-reexports, and no-named-as-default. Requires ESLint >= 9.0.0 and ESM-only codebases.

npm install eslint-plugin-fast-import
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-FAST
E
eslint-plugin-fast-import
testingjavascriptv2.2.1
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.

default
import fastImport from 'eslint-plugin-fast-import'
const fastImport = require('eslint-plugin-fast-import')
CommonJS require is not supported; the plugin is ESM-only.
rules
import { rules } from 'eslint-plugin-fast-import'
import { noCycle } from 'eslint-plugin-fast-import'
Individual rules are not exported; access via rules object.
configs
import { configs } from 'eslint-plugin-fast-import'
import recommended from 'eslint-plugin-fast-import'
Use configs.recommended or configs.all for predefined configurations.
getESMInfo
import { getESMInfo } from 'eslint-plugin-fast-import'
Utility for rule authors to access ESM analysis context.

Configuring eslint-plugin-fast-import with recommended rules and settings including rootDir and alias.

// Install: npm install --save-dev eslint-plugin-fast-import // eslint.config.js (flat config) import fastImport from 'eslint-plugin-fast-import'; export default [ { plugins: { 'fast-import': fastImport }, rules: { 'fast-import/no-cycle': 'error', 'fast-import/no-entry-point-imports': 'error', 'fast-import/no-external-barrel-reexports': 'error', 'fast-import/no-named-as-default': 'error', }, settings: { 'fast-import': { rootDir: __dirname, // required alias: { '@': './src' }, mode: process.env.CI ? 'build' : 'editor', }, }, }, ];
Debug
Known issues
breakingVersion 2.0.0 dropped support for ESLint <= 8 and CommonJS. Flat config and ESM are required.
fix
Upgrade to ESLint 9+ and use flat config with ESM imports.
affects: >=2.0.0
gotcharootDir setting is required; all first-party code must reside under rootDir. Files outside are not analyzed.
fix
Set rootDir to the root of your project (e.g., path.resolve(__dirname, 'src')).
affects: >=1.0.0
gotchaCommonJS (require, module.exports) is not supported. Only ESM import/export syntax is analyzed.
fix
Convert your codebase to ESM syntax.
affects: >=1.0.0
gotchaBarrel re-exports of third-party modules are ignored; rules like no-external-barrel-reexports only apply to first-party code.
fix
For third-party re-exports, manually check or use a different plugin.
affects: >=1.0.0
deprecatedThe 'all' configuration is deprecated in v2; use 'recommended' and opt-in to additional rules individually.
fix
Switch to configs.recommended and add extra rules as needed.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-fast-import'
Package not installed or missing from dependencies.
fix
Run 'npm install --save-dev eslint-plugin-fast-import' and ensure it's in package.json.
ESLint couldn't determine the plugin 'fast-import' uniquely.
Multiple versions or conflicting names in plugins object.
fix
Use a unique key, e.g., plugins: { 'fast-import': fastImport }.
Configuration for rule "fast-import/no-cycle" is invalid: Value "warn" is not allowed.
Rule severity must be 'off', 'warn', or 'error', or an array.
fix
Set rule to 'error', 'warn', 'off', or ['warn', { ... }].
TypeError: Cannot read properties of undefined (reading 'rootDir')
fast-import settings not defined or rootDir missing.
fix
Add settings: { 'fast-import': { rootDir: __dirname } } to ESLint config.
Upgrade
Version history
2.2.1latest on npm
Audit
Dependencies
eslintrequiredPeer dependency; plugin runs as an ESLint plugin
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-fast-import — npm install eslint-plugin-fast-import · libregistry