{"id":19751,"library":"eslint-plugin-fast-import","title":"eslint-plugin-fast-import","description":"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.","status":"active","version":"2.2.1","language":"javascript","source_language":"en","source_url":"https://github.com/nebrius/eslint-plugin-fast-import","tags":["javascript","eslint","eslintplugin","eslint-plugin","typescript"],"install":[{"cmd":"npm install eslint-plugin-fast-import","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-fast-import","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-fast-import","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; plugin runs as an ESLint plugin","package":"eslint","optional":false}],"imports":[{"note":"CommonJS require is not supported; the plugin is ESM-only.","wrong":"const fastImport = require('eslint-plugin-fast-import')","symbol":"default","correct":"import fastImport from 'eslint-plugin-fast-import'"},{"note":"Individual rules are not exported; access via rules object.","wrong":"import { noCycle } from 'eslint-plugin-fast-import'","symbol":"rules","correct":"import { rules } from 'eslint-plugin-fast-import'"},{"note":"Use configs.recommended or configs.all for predefined configurations.","wrong":"import recommended from 'eslint-plugin-fast-import'","symbol":"configs","correct":"import { configs } from 'eslint-plugin-fast-import'"},{"note":"Utility for rule authors to access ESM analysis context.","wrong":null,"symbol":"getESMInfo","correct":"import { getESMInfo } from 'eslint-plugin-fast-import'"}],"quickstart":{"code":"// Install: npm install --save-dev eslint-plugin-fast-import\n\n// eslint.config.js (flat config)\nimport fastImport from 'eslint-plugin-fast-import';\n\nexport default [\n  {\n    plugins: { 'fast-import': fastImport },\n    rules: {\n      'fast-import/no-cycle': 'error',\n      'fast-import/no-entry-point-imports': 'error',\n      'fast-import/no-external-barrel-reexports': 'error',\n      'fast-import/no-named-as-default': 'error',\n    },\n    settings: {\n      'fast-import': {\n        rootDir: __dirname, // required\n        alias: { '@': './src' },\n        mode: process.env.CI ? 'build' : 'editor',\n      },\n    },\n  },\n];","lang":"typescript","description":"Configuring eslint-plugin-fast-import with recommended rules and settings including rootDir and alias."},"warnings":[{"fix":"Upgrade to ESLint 9+ and use flat config with ESM imports.","message":"Version 2.0.0 dropped support for ESLint <= 8 and CommonJS. Flat config and ESM are required.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Set rootDir to the root of your project (e.g., path.resolve(__dirname, 'src')).","message":"rootDir setting is required; all first-party code must reside under rootDir. Files outside are not analyzed.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Convert your codebase to ESM syntax.","message":"CommonJS (require, module.exports) is not supported. Only ESM import/export syntax is analyzed.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"For third-party re-exports, manually check or use a different plugin.","message":"Barrel re-exports of third-party modules are ignored; rules like no-external-barrel-reexports only apply to first-party code.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Switch to configs.recommended and add extra rules as needed.","message":"The 'all' configuration is deprecated in v2; use 'recommended' and opt-in to additional rules individually.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'2.2.1':32 '9.0.0':110 'algorithm':17 'analyz':78 'barrel':100 'base':23 'cadenc':37 'chang':53 'code':82 'codebas':115 'current':28 'cycl':91 'data':48 'default':107 'editor':41 'entri':94 'error':56 'eslint':2,7,59,64,109,117,120 'eslint-plugin':119 'eslint-plugin-fast-import':1 'eslint-plugin-import':58 'eslint-plugin-import-x':63 'eslintplugin':118 'esm':113 'esm-on':112 'export':13 'extern':99 'fast':4 'filesystem':52 'first':80 'first-parti':79 'high':26 'import':5,11,61,66,96 'in-memori':45 'includ':86 'javascript':116 'keep':44 'leverag':14 'like':88 'memori':47 'mode':42 'name':105 'no-cycl':89 'no-entry-point-import':92 'no-external-barrel-reexport':97 'no-named-as-default':103 'novel':16 'offer':39 'oxc':20 'parser':24 'parti':81 'perform':27 'plugin':3,8,60,65,121 'point':95 'prevent':54 'rapid':35 'reexport':101 'releas':36 'requir':108 'resolv':75 'rootdir':84 'rule':87 'rust':22 'rust-bas':21 'stabl':29 'stale':55 'structur':49 'suppli':74 'support':71 'typescript':122 'unlik':57 'updat':50 'user':73 'user-suppli':72 'valid':10 'version':30 'within':83 'x':67","created_at":"2026-04-25T11:19:27.248900+00:00","updated_at":"2026-04-25T11:19:27.248900+00:00","problems":[{"fix":"Run 'npm install --save-dev eslint-plugin-fast-import' and ensure it's in package.json.","cause":"Package not installed or missing from dependencies.","error":"Error: Cannot find module 'eslint-plugin-fast-import'"},{"fix":"Use a unique key, e.g., plugins: { 'fast-import': fastImport }.","cause":"Multiple versions or conflicting names in plugins object.","error":"ESLint couldn't determine the plugin 'fast-import' uniquely."},{"fix":"Set rule to 'error', 'warn', 'off', or ['warn', { ... }].","cause":"Rule severity must be 'off', 'warn', or 'error', or an array.","error":"Configuration for rule \"fast-import/no-cycle\" is invalid: Value \"warn\" is not allowed."},{"fix":"Add settings: { 'fast-import': { rootDir: __dirname } } to ESLint config.","cause":"fast-import settings not defined or rootDir missing.","error":"TypeError: Cannot read properties of undefined (reading 'rootDir')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://nebrius.github.io/import-integrity-lint/guide/migration.html","github":"https://github.com/nebrius/import-integrity-lint","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-plugin-fast-import","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}