Open AoDev opened 6 years ago
This looks definitely like a bug. It should definitely reuse the config from Babel.
Ok, I didn't know if it was supposed to take the config from there or not. I will verify again, just so you don't lose your time.
So, I removed the whole settings part of my .eslintrc
This:
"settings": {
"import/resolver": {
"babel-module": {
"alias": {
...
And confirm I get this lint error:
/Volumes/DataUser/git-repos/cryptovista/electron-app/src/application/stores/RouterStore.js
2:26 error Unable to resolve path to module 'app-utils' import/no-unresolved
/Volumes/DataUser/git-repos/cryptovista/electron-app/src/application/stores/UIStore.js
4:24 error Unable to resolve path to module 'shared-components/viewModels' import/no-unresolved
My eslint dependencies:
"eslint": "5.2.0",
"eslint-config-standard": "11.0.0",
"eslint-import-resolver-babel-module": "5.0.0-beta.1",
"eslint-loader": "2.1.0",
"eslint-plugin-import": "2.13.0",
"eslint-plugin-lodash": "2.7.0",
"eslint-plugin-node": "7.0.1",
"eslint-plugin-promise": "3.8.0",
"eslint-plugin-react": "7.10.0",
"eslint-plugin-standard": "3.1.0",
This problem seems to be solved in the latest beta.
I've had this error in v.4.0.0 Upgrading to 5.0.0-beta.1 as @kjagiello pointed solved the issue!
First of all, I am unaware of all the "magic" around babel and the plugins. If what I say next is not relevant just let me know and we can close this.
I managed to make everything work by basically copying my aliases in
.babelrc
to.eslintrc
. This seems very redundant. Couldn't we haveeslint-import-resolver-babel-module
look for the aliases from babel config?.babelrc
.eslintrc