Commit 24044af
fix: add eslint-import-resolver-node to dependencies (#41)
## Summary
- Adds `eslint-import-resolver-node` as a direct dependency
- Fixes `EslintPluginImportResolveError: node with invalid interface
loaded as resolver` thrown by `import-x/no-cycle` (and other
path-resolving rules) in downstream projects
## Root cause
`eslint-plugin-import-x` v4.16.2 has a buggy fallback in
`requireResolver`: when the `eslint-import-resolver-node` package isn't
installed, it falls back to `path.resolve(baseDir, name)` — so for `name
=== "node"` it can end up resolving to completely unrelated files (e.g.
`node_modules/unicorn-magic/node.js`), loading them as a "resolver", and
failing the legacy-interface check.
Depending on `eslint-import-resolver-node` ensures the first
`tryRequire` in the plugin succeeds with a valid legacy resolver
interface.
## Test plan
- [ ] Verify `npm run lint` passes in apify/actor-templates `js-cypress`
template after publishing this fix
- [ ] Verify other templates still lint cleanly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7e29985 commit 24044af
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
0 commit comments