I am using webpack's aliases in my project. Everything works fine in my original project, but when I clone the project, I get error from import/no-unresolved
for my webpack aliases:
Casing of $js/Controller does not match the underlying filesystem import/no-unresolved
what makes it more interesting is that my project works fine. import/no-unresolved
seems to send show false error.
For more details, I am adding few links: .eslintrc.js, webpack.config.babel.js, Link to my Repo
please let me know if you need anything else.
Aliasing is webpack's handy way to shave time and keystrokes off importing frequently used modules. You will need the path module, included with node. js, as it is how you will tell webpack where to look for those specific files. Using the resolve. alias property, you can define aliases for frequently imported modules.
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All the goodness that the ES2015+ static module syntax intends to provide, marked up in your editor.
I found the solution. I installed eslint-import-resolver-webpack
in order to make Webpack aliases work with eslint resolver. Here is the command to install the plugin:
npm install eslint-import-resolver-webpack --save-dev
Here is the link to the repo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With