False error using eslint-plugin-import for webpack aliases

I use webpack aliases in my project. Everything works fine in my original project, but when I clone the project, I get an error from import/no-unresolved for my webpack aliases:

The $ js / Controller enclosure does not match the import / no-unresolved source file system

what makes it more interesting is that my project works great. import/no-unresolved seems to send show false error.

For more details, I am adding a few links: .eslintrc.js , webpack.config.babel.js , Link to my repo

please let me know if you need anything else.

+5
source share
1 answer

I have found a solution. I installed eslint-import-resolver-webpack so that Webpack aliases work with the eslint resolver. Here is the command to install the plugin:

 npm install eslint-import-resolver-webpack --save-dev 

Here is the repo link

+1
source

Source: https://habr.com/ru/post/1268747/


All Articles