Skip to content

Commit 24044af

Browse files
B4nanclaude
andauthored
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

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"./style.js": "./style.js"
2424
},
2525
"dependencies": {
26+
"eslint-import-resolver-node": "^0.3.10",
2627
"eslint-plugin-import-x": "^4.16.2",
2728
"eslint-plugin-simple-import-sort": "^12.1.1",
2829
"globals": "^15.14.0"

0 commit comments

Comments
 (0)