eslint-plugin-import vs eslint-plugin-import-x: which should you use?
Updated December 2, 2026
On this page
Which should you use, eslint-plugin-import or import-x?
Pick by your ESLint version first, then by your packages. The two plugins share most rule names and options, because import-x started as a fork, so the choice is about support and resolution, not about learning a new tool.
- Pick eslint-plugin-import-x if you're on ESLint 10 or moving there. Its latest release, 4.18.1, lists ESLint 8.57, 9 and 10 as peers on npm. eslint-plugin-import's latest release doesn't install on ESLint 10 without forcing it, and then its order rule crashes (shown below).
- Pick eslint-plugin-import-x if you import packages through an exports map in package.json, such as pkg/sub. In my test, eslint-plugin-import reported a valid subpath import as unresolved; import-x didn't.
- Pick eslint-plugin-import-x if you care about install weight. Over a bare ESLint 10 install it added 13 packages in my run; eslint-plugin-import added 123.
- Stay on eslint-plugin-import if you're pinned to ESLint 8 or 9, or to a Node.js version older than 18.18, and the setup works. It still gets commits, and its peer range reaches back to ESLint 2.
- Stay on eslint-plugin-import if you depend on its enforce-node-protocol-usage rule. import-x 4.18.1 doesn't ship a rule by that name.
My recommendation: switch to import-x now, even on ESLint 9. ESLint 9 no longer gets fixes, the move to ESLint 10 is coming either way, and the switch is mostly a rename that one command does. The trade-off is that you swap the original, far more widely installed plugin for a younger fork with a smaller team, and a few rule names differ in the long tail.
How do eslint-plugin-import and import-x compare?
They check the same things, and they split on support, resolution and weight. Every cell comes from each package's npm entry, its GitHub repository or my runs on this page, on Dec 2, 2026. The import-x README gives its own list of differences.
| Criterion | eslint-plugin-import | eslint-plugin-import-x |
|---|---|---|
| Price and license | Free, MIT | Free, MIT |
| Latest release | 2.32.0, June 20, 2025 | 4.18.1, Nov 9, 2026 |
| ESLint peer range | 2 to 9 | 8.57 to 10 |
| Installs on ESLint 10 | No, ERESOLVE | Yes |
| Node.js engines | 4 or later | 18.18, 20.9, or 21.1 and later |
| Direct dependencies | 19 | 11 |
| Packages added to ESLint 10 (my run) | 123 | 13 |
| Rules in the installed version | 46 | 51 |
| Subpath import through exports (my run) | Reported as unresolved | Resolved |
| Rule prefix | import/ | import-x/ |
| Downloads, Nov 25 to Dec 1, 2026 | 73,824,230 | 9,640,057 |
I read the download gap as inertia more than preference: a lint plugin pulled in by an old shared config tends to stay until it breaks.
What is each one best for?
eslint-plugin-import
- Best for: projects that stay on ESLint 9 or older and already have a working import setup.
- Price: free and open source, MIT (npm, Dec 2, 2026). No paid tier.
- Pros: the original, with years of issues and answers behind it; works on very old ESLint and Node.js versions; its rule names are the ones older configs and answers use; it has enforce-node-protocol-usage, which import-x 4.18.1 lacks.
- Cons: no release since June 20, 2025; ESLint 10 support is merged on its main branch since May 27, 2026 but not released, and an issue asking for a release has been open since July 29, 2026; it reported a valid exports subpath as unresolved in my test; it pulled in 123 packages.
- Runs on: your machine and CI, as an ESLint plugin, in flat config or eslintrc.
eslint-plugin-import-x
- Best for: any project on ESLint 10, or using package exports, TypeScript path aliases or a monorepo.
- Price: free and open source, MIT (npm, Dec 2, 2026). No paid tier.
- Pros: supports ESLint 10; releases often (4.18.0 and 4.18.1 shipped in November 2026, by npm); resolves package exports through its own resolver; reads tsconfig files with get-tsconfig instead of loading TypeScript, by its README; adds rules such as avoid-barrel-files, avoid-re-export-all and no-rename-default.
- Cons: a fork with a smaller team and far fewer installs; every rule name, setting and disable comment has a new prefix; needs Node.js 18.18 or later; the resolver ships native binaries, so a locked-down CI image must allow them.
- Runs on: your machine and CI, as an ESLint plugin, in flat config or eslintrc.
Does eslint-plugin-import work with ESLint 10?
No released version does. eslint-plugin-import 2.32.0 declares ESLint 9 as its highest peer, so npm refuses the install. Here's what npm 11.19.0 printed on Dec 2, 2026, with the log lines left out:
$ npm i -D eslint@10 eslint-plugin-import
npm error code ERESOLVE
npm error ERESOLVE unable to resolve
dependency tree
npm error Found: eslint@10.16.0
npm error Could not resolve dependency:
npm error peer eslint@"^2 || ^3 || ^4 || ^5 ||
^6 || ^7.2.0 || ^8 || ^9" from
eslint-plugin-import@2.32.0Forcing it with --legacy-peer-deps installs it, and some rules even run: no-unresolved and no-duplicates reported the right problems in my test. But import/order crashed ESLint 10.16.0 the moment it found an import to move:
$ npx eslint src
Oops! Something went wrong! :(
ESLint: 10.16.0
TypeError:
sourceCode.getTokenOrCommentBefore
is not a function
Occurred while linting src/main.js:1
Rule: "import/order"That's ESLint 10 at work, not a bug in your config. ESLint 10.0.0 removed deprecated SourceCode methods, and the released plugin still calls one. ESLint 10 also dropped eslintrc config files and requires Node.js ^20.19.0, ^22.13.0 or 24 and later, by the same release notes.
The fix exists upstream: commit 955c522e04, "add eslint v10 support", landed on May 27, 2026. Until a release ships it, your options are to stay on ESLint 9, which reached end of life on Aug 6, 2026 by ESLint's version support page, or to switch to import-x.
What happens when you run both on the same files?
They report the same problems, under different prefixes. I gave both plugins this file, with an import out of order, a missing file and a module imported twice:
import { add } from './util.js';
import fs from 'node:fs';
import { missing } from './nope.js';
import { add as again } from './util.js';
console.log(add(1, 2), again, missing, fs);import-x 4.18.1 on ESLint 10.16.0 found all four problems. I shortened the paths and wrapped the lines:
$ npx eslint src
src/main.js
1:21 warning 'src/util.js' imported
multiple times import-x/no-duplicates
2:1 error `node:fs` import should
occur before import of `./util.js`
import-x/order
3:25 error Unable to resolve path to
module './nope.js'
import-x/no-unresolved
4:30 warning 'src/util.js' imported
multiple times import-x/no-duplicates
✖ 4 problems (2 errors, 2 warnings)eslint-plugin-import 2.32.0 on ESLint 9.39.5 printed the same four lines with the import/ prefix. eslint --fix with import-x moved the node:fs import to the top and merged the two util.js imports into one line. eslint-plugin-import on ESLint 9 made the same fix, with a stray space before the comma.
Package exports
The one difference in results came from package exports. A package that exposes a subpath only through its exports map is valid Node.js, and Node ran the file. eslint-plugin-import, on ESLint 9.39.5, still reported it:
$ cat node_modules/pkg/package.json
{"name":"pkg","version":"1.0.0",
"type":"module",
"exports":{"./sub":"./lib/sub.js"}}
$ node src/exp.js
1
$ npx eslint src/exp.js # eslint-plugin-import
src/exp.js
1:19 error Unable to resolve path to
module 'pkg/sub' import/no-unresolved
$ npx eslint src/exp.js # import-x
$import-x printed nothing, because its resolver reads the exports field. With eslint-plugin-import you'd add a resolver package such as eslint-import-resolver-typescript, which supports both plugins, or turn the rule off for those imports.
How do you switch from eslint-plugin-import to import-x?
Swap the package, rename the prefix everywhere, then run the linter once to catch what the rename missed.
- Install the fork and remove the original:
npm i -D eslint-plugin-import-x, thennpm uninstall eslint-plugin-import. - Change the config import. In flat config,
importPlugin.flatConfigs.recommendedbecomesimportX.flatConfigs.recommended, imported as shown below. The TypeScript preset isimportX.flatConfigs.typescript. - Rename every rule, setting and disable comment from import/ to import-x/ (the command is below). Settings move too: import/resolver becomes import-x/resolver.
- Run
npx eslint .and read the output. A leftover disable comment shows up as a "Definition for rule ... was not found" error. - Check rules that exist only in eslint-plugin-import, such as enforce-node-protocol-usage, and drop them or replace them.
eslint.config.js with import-x
import { importX } from 'eslint-plugin-import-x';
export default [
importX.flatConfigs.recommended,
{
languageOptions: { sourceType: 'module' },
rules: { 'import-x/order': 'error' },
},
];Rename the prefix in tracked files
git grep -l 'import/' | xargs perl -pi -e \
's#(?<![\w/.-])import/(?=[a-z])#import-x/#g'The pattern skips paths such as ./import/a.js, because it won't match import/ after a slash, dot or letter. I ran it in a test repository and it changed the rule in the config and the disable comment, and left the path alone. Review git diff before you commit. Skip step 3 and ESLint tells you, because the old comment now names a rule nothing defines:
$ npx eslint src/legacy.js
src/legacy.js
1:1 error Definition for rule
'import/no-unresolved' was not found
import/no-unresolved
2:22 error Unable to resolve path to
module './gone.js'
import-x/no-unresolvedWhat else can replace eslint-plugin-import?
import-x is the drop-in choice; the others replace part of it. e18e's replacements page lists import-x and Oxlint.
- Oxlint: a separate linter with an import plugin, turned on with
oxlint --import-plugin(Oxlint plugin docs). Oxlint 1.96.0 lists 33 import rules inoxlint --rules, and no-unresolved and order aren't among them, so it can't stand in for the two rules most configs use. - eslint-plugin-simple-import-sort: sorting only, with autofix. Version 14.0.0 declares ESLint 5 or later as its peer (npm, Dec 2, 2026), so it installs on ESLint 10. It replaces import/order, nothing else.
- TypeScript itself: with tsc in CI, a missing module or a missing named export already fails the build, so no-unresolved and named matter less in a fully typed project.
Where Since.dev fits
Since.dev isn't a linter and doesn't replace either plugin. It tells you when a dependency you already use stops working with another one, like a plugin whose peer range ends before your ESLint version. Package pages such as eslint-plugin-import-x and eslint list what changed between versions, and you can scan a public repository for free to see which of its dependencies have breaking releases or reached end of life. Your coding agent can ask the same through the MCP server.
To read a change yourself first, see how to find breaking changes between two versions and how to check dependencies for breaking changes. For changes it can fix, it opens a pull request that was built and checked first; it doesn't open routine version bumps. It reports or opens pull requests for people to review, and nothing merges or deploys.
Questions
Does eslint-plugin-import support ESLint 10?
Not in a release. The latest version, 2.32.0 from June 20, 2025, declares ESLint 2 to 9 as peers, so npm refuses to install it next to ESLint 10. Support was merged on its main branch on May 27, 2026 and hasn't shipped as of Dec 2, 2026. eslint-plugin-import-x 4.18.1 supports ESLint 10 today.
Why do I get sourceCode.getTokenOrCommentBefore is not a function?
You're running eslint-plugin-import 2.32.0 on ESLint 10, installed with --legacy-peer-deps or --force. ESLint 10.0.0 removed deprecated SourceCode methods, and the plugin's import/order rule still calls one, so ESLint crashes when the rule finds an import to move. Switch to eslint-plugin-import-x, or stay on ESLint 9 until a fixed release ships.
Is eslint-plugin-import deprecated?
No. npm doesn't mark it deprecated, and its repository had commits as recently as August 2026. Its last release, though, is from June 20, 2025, and it doesn't support ESLint 10, the only ESLint line still maintained as of Dec 2, 2026.
Is eslint-plugin-import-x a drop-in replacement?
Nearly. The rules and options are the same for most configs, but every name moves from the import/ prefix to import-x/, in rules, settings and eslint-disable comments. A few rules differ: import-x 4.18.1 adds avoid-barrel-files and others, and lacks enforce-node-protocol-usage.
Can I use eslint-plugin-import and import-x together?
Yes, they register under different names, so ESLint loads both, and e18e's replacement page shows a config with both side by side. It only makes sense during a switch: running both means every problem is reported twice and you install both dependency trees.
Does import-x work with eslint-import-resolver-typescript?
Yes. eslint-import-resolver-typescript 4.4.5 lists both eslint-plugin-import and eslint-plugin-import-x as peers on npm. With import-x you can pass its createTypeScriptImportResolver() in the import-x/resolver-next setting.
Related guides
Free tools
- Runtime end-of-life checker for Docker, CI and LambdaPaste a Dockerfile, workflow, go.mod, package.json or .csproj and see when each Node.js, Python, .NET or runner version reaches end of life. Free.
Comparisons
- eslint-plugin-react vs @eslint-react/eslint-plugin: which should you use?eslint-plugin-react vs @eslint-react/eslint-plugin, run on ESLint 9 and 10: which installs, which crashes, rules, TypeScript 7 and how to migrate.
- jscodeshift vs ast-grep: which should you use?jscodeshift vs ast-grep on the same fix: TypeScript, formatting, speed, CI checks and price, with both run on a real Node.js deprecation and timed.
How-to
- How to find the breaking changes between two versions of a packageHow to find breaking changes between two versions of a package: list the releases in between, read each changelog, diff the code. Commands for npm, PyPI, Go.
- How to check your dependencies for breaking changes before you upgradeHow to check dependencies for breaking changes before upgrading: the commands, a real failing upgrade, CI that fails on deprecations, and where notices appear.
Explainers
- Caret vs tilde in package.json: what ^ and ~ let inCaret (^) allows minor and patch updates, tilde (~) only patches. The 0.x exception, what your lockfile does, and how ^ and ~ differ in Cargo and Composer.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.