Can't understand what's the problem and how this is possible...
I just simply install airbnb config and its devDeps. Then just running eslint on 1-line .js file.
/home/charlike/code/rolldown/src/foo.js
1:1 error Resolve error: unable to load resolver "node" import/no-unresolved
1:1 error Resolve error: unable to load resolver "node" import/no-extraneous-dependencies
1:1 error 'babylon' should be listed in the project's dependencies. Run 'npm i -S babylon' to add it import/no-extraneous-dependencies
1:1 error Resolve error: unable to load resolver "node" import/no-duplicates
1:1 error Resolve error: unable to load resolver "node" import/extensions
1:1 error Resolve error: unable to load resolver "node" import/no-named-as-default
1:1 error Resolve error: unable to load resolver "node" import/no-named-as-default-member
1:8 error 'babylon' is defined but never used no-unused-vars
1:21 error Unable to resolve path to module 'babylon' import/no-unresolved
1:21 error Missing file extension for "babylon" import/extensions
I'm seeing that there is eslint-import-resolver-node as dependency at eslint-plugin-import, so it not make sense.
Damn, i knew that. It's because Pnpm is "strict"
Strict. A package can access only dependencies that are specified in its package.json.
Probably installing eslint-import-resolver-node as dependency here will fix the issue, not sure.
continuation: https://github.com/pnpm/pnpm/issues/1042
FYI, there's a related issue at eslint-plugin-import (https://github.com/benmosher/eslint-plugin-import/issues/828) and it has nothing to do with pnpm's strictness. The issue is caused because eslint-plugin-import preserves symlinks when it searches for "plugins". Node does not preserve symlinks when it resolves modules. Neither should eslint-plugin-import
Most helpful comment
Damn, i knew that. It's because Pnpm is "strict"
Probably installing
eslint-import-resolver-nodeas dependency here will fix the issue, not sure.