npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eslint-plugin-import-next

v2.2.1

Published

Drop-in replacement for eslint-plugin-import. 100x faster no-cycle detection, AI-optimized fixes, zero config migration.

Readme

Description

This plugin represents the next evolution of import validation, offering advanced features like granular import sorting and strictly enforced architectural boundaries. It is designed to modernize your development workflow by providing tools that prevent circular dependencies and enforce clean module structures. By integrating these rules, you can maintain a scalable and organized codebase that is easy to navigate and refactor.

Philosophy

Interlace fosters strength through integration. Instead of stacking isolated rules, we interlace security directly into your workflow to create a resilient fabric of code. We believe tools should guide rather than gatekeep, providing educational feedback that strengthens the developer with every interaction.

Getting Started

npm install eslint-plugin-import-next --save-dev

AI-Optimized Messages

This plugin is optimized for ESLint's Model Context Protocol (MCP), enabling AI assistants like Cursor, GitHub Copilot, and Claude to:

  • Understand the exact vulnerability type via CWE references
  • Apply the correct fix using structured guidance
  • Provide educational context to developers

Unlike legacy plugins, we analyze the type of issue and suggest the correct fix:

# Type-only Cycle
🧩 CWE-407 | Circular Dependency (Types Only)
   Path: auth.ts → user.ts → auth.ts
   Fix: Extract shared types to 'types.ts' or use 'import type'

# Hard Dependency Cycle
🏗️ CWE-407 | Circular Dependency (Runtime)
   Path: ServiceA → ServiceB → ServiceA
   Fix: Use Dependency Injection or split into Core/Extended modules

# Deep Cycle (previously undetectable)
⚠️ CWE-407 | Deep Circular Dependency (depth: 7)
   Path: A → B → C → D → E → F → G → A
   Impact: May cause Vite/Next.js build failures
   Fix: Introduce an abstraction layer between A and G
// .cursor/mcp.json
{
  "mcpServers": {
    "eslint": {
      "command": "npx",
      "args": ["@eslint/mcp@latest"]
    }
  }
}

By providing this structured context (CWE, OWASP, Fix), we enable AI tools to reason about the security flaw rather than hallucinating. This allows Copilot/Cursor to suggest the exact correct fix immediately.


Rules

Legend

| Icon | Description | | :--: | :----------------------------------------------------------------- | | 💼 | Recommended: Included in the recommended preset. | | ⚠️ | Warns: Set to warn in recommended preset. | | 🔧 | Auto-fixable: Automatically fixable by the --fix CLI option. | | 💡 | Suggestions: Providing code suggestions in IDE. | | 🚫 | Deprecated: This rule is deprecated. |

| Rule | Pattern/Concept | Description | 💼 | ⚠️ | 🔧 | 💡 | 🚫 | | :------------------------------------------------------------------------------------------------------------------------- | :--------------- | :-------------------------------------------------- | :-: | :-: | :-: | :-: | :-: | | no-unresolved | Static Analysis | Ensure imports resolve | 💼 | | | 💡 | | | named | Static Analysis | Ensure named imports exist | 💼 | | | | | | default | Static Analysis | Ensure default export exists | 💼 | | | | | | namespace | Static Analysis | Ensure namespace properties exist | 💼 | | | | | | no-absolute-path | Static Analysis | Forbid absolute paths | | | 🔧 | | | | no-dynamic-require | Static Analysis | Forbid dynamic require() | | | | | | | no-internal-modules | Static Analysis | Enforce entry points only | | | | 💡 | | | no-relative-packages | Static Analysis | Use package names | | | 🔧 | | | | no-relative-parent-imports | Static Analysis | Prevent ../ imports | | | | | | | no-self-import | Static Analysis | Prevent self-imports | 💼 | | | 💡 | | | no-cycle | Static Analysis | 100x faster cycle detection | 💼 | | | 💡 | | | no-useless-path-segments | Static Analysis | Simplify paths | | | 🔧 | | | | no-restricted-paths | Static Analysis | Custom path restrictions | | | | | | | export | Helpful Warnings | Forbid duplicate exports | 💼 | | | | | | no-deprecated | Helpful Warnings | Warn on @deprecated imports | | | | | | | no-empty-named-blocks | Helpful Warnings | Forbid empty {} imports | | | 🔧 | 💡 | | | no-extraneous-dependencies | Helpful Warnings | Prevent unlisted deps | 💼 | | | 💡 | | | no-mutable-exports | Helpful Warnings | Forbid let/var exports | | | | | | | no-named-as-default | Helpful Warnings | Warn on default shadowing | 💼 | | | | | | no-named-as-default-member | Helpful Warnings | Warn on property access | 💼 | | | | | | no-unused-modules | Helpful Warnings | Find dead code | | | | 💡 | | | no-amd | Module Systems | Forbid AMD require/define | | | | | | | no-commonjs | Module Systems | Forbid CommonJS | | | | | | | no-nodejs-modules | Module Systems | Forbid Node.js builtins | | | | | | | no-import-module-exports | Module Systems | No mixed ES/CJS | | | | | | | unambiguous | Module Systems | Warn on ambiguous modules | | | | | | | consistent-type-specifier-style | Style Guide | Type import style | | | 🔧 | | | | dynamic-import-chunkname | Style Guide | Require webpack chunk names | | | | 💡 | | | exports-last | Style Guide | Exports at end of file | | | | | | | extensions | Style Guide | Enforce file extension usage | | | | | | | first | Style Guide | Imports must be first | | | 🔧 | | | | group-exports | Style Guide | Group exports together | | | | | | | max-dependencies | Style Guide | Limit module dependencies | | | | | | | newline-after-import | Style Guide | Newline after imports | | | 🔧 | | | | no-anonymous-default-export | Style Guide | Require named default exports | | | | | | | no-default-export | Style Guide | Forbid default exports | | | | 💡 | | | no-duplicates | Style Guide | Merge duplicate imports | 💼 | | 🔧 | | | | no-named-default | Style Guide | Use default import syntax | | | | | | | no-named-export | Style Guide | Forbid named exports | | | | | | | no-namespace | Style Guide | Forbid * as imports | | | | | | | no-unassigned-import | Style Guide | Forbid side-effect imports | | | | | | | order | Style Guide | Sort and group imports | 💼 | | 🔧 | | | | prefer-default-export | Style Guide | Prefer default for single exports | | | | | | | no-cross-domain-imports | Architecture | Enforce clean architecture boundaries | | | | | | | enforce-dependency-direction | Architecture | Enforce layered architecture (UI → Services → Data) | | | | | | | prefer-node-protocol | Architecture | Prefer node:fs over fs | | | | | | | no-barrel-file | Architecture | Detect barrel files that harm build performance | | | | | | | no-barrel-import | Architecture | Flag imports from barrel files | | | | | | | prefer-tree-shakeable-imports | Architecture | Enforce tree-shakeable import patterns | | | | | | | prefer-direct-import | Architecture | Suggest direct imports with autofix | | | | | | | no-full-package-import | Architecture | Block full imports from large packages | | | | | | | enforce-team-boundaries | Architecture | Prevent unauthorized cross-team imports | | | | | | | no-legacy-imports | Architecture | Detect deprecated imports with autofix | | | | | |

🔄 Compatibility Matrix

| Rule | Original Plugin | Status | Notes | | :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------- | :----------------------- | | All Rules | eslint-plugin-import npm | ✅ Supported | Full drop-in replacement |


⚙️ Configuration Presets

| Preset | Description | | :------------------ | :----------------------------------------------- | | recommended | Warns on import order issues | | strict | All rules set to error for production-ready code | | typescript | Optimized for TypeScript projects | | module-resolution | Focus on import resolution | | import-style | Focus on import formatting | | esm | Enforce ES Modules only | | architecture | Clean architecture boundaries | | performance | Bundle optimization (barrel detection) | | enterprise | Team boundaries & legacy import tracking | | errors | Matches eslint-plugin-import errors preset | | warnings | Matches eslint-plugin-import warnings preset |

🔗 Related ESLint Plugins

Part of the Interlace ESLint Ecosystem — AI-native security plugins with LLM-optimized error messages:

| Plugin | Downloads | Description | | :--------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------ | | eslint-plugin-secure-coding | downloads | General security rules & OWASP guidelines. | | eslint-plugin-pg | downloads | PostgreSQL security & best practices. | | eslint-plugin-crypto | downloads | NodeJS Cryptography security rules. | | eslint-plugin-jwt | downloads | JWT security & best practices. | | eslint-plugin-browser-security | downloads | Browser-specific security & XSS prevention. | | eslint-plugin-vercel-ai-security | downloads | Vercel AI SDK security rules. | | eslint-plugin-express-security | downloads | Express.js security hardening rules. | | eslint-plugin-lambda-security | downloads | AWS Lambda security best practices. | | eslint-plugin-nestjs-security | downloads | NestJS security rules & patterns. | | eslint-plugin-import-next | downloads | Next-gen import sorting & architecture. |

📄 License

MIT © Ofri Peretz