Using `import/resolver` in a global config file
See original GitHub issueI use a global ESLint config file. It contains most import
rules, plus:
module.exports = {
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
}
I lint with it using the command eslint . --resolve-plugins-relative-to /Users/gary/.dotfiles/
and a .eslintrc.js
file of the following, in my projects:
module.exports = {
extends: '/Users/gary/.eslintrc.js',
};
Every import
rule reports the error: Resolve error: unable to load resolver "node"
.
This error only started appearing after upgrading from v2.18.2 to v2.20.0.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Using import/resolver in a global config file #1603 - GitHub
I use a global ESLint config file. It contains most import rules, plus: module.exports = { settings: { 'import/resolver': { node: ...
Read more >webpack - How to manually add a path to be resolved in eslintrc
You can add resolving directories by using config. ... I installed eslint-import-resolver-webpack and updated .eslintrc thusly { "settings": ...
Read more >eslint-import-resolver-jest | Yarn - Package Manager
Jest will attempt to resolve the import using a set of file extensions defined in moduleFileExtensions. Allow <rootDir> to be defined within the...
Read more >global-config-file - npm
This package exports one function that accepts a filename and an options object. The file provided must be the one with no extension....
Read more >How to set important Git config global properties
gitconfig file will be used instead of the global git config file of the user running the script. This can lead to unexpected...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes that fixed it.
v2.5.2 of eslint-module-utils is released; hopefully that resolves the issue.