-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add alias or ignore list for no-unresolved rule #89
Comments
Can you give me a concrete example? Also: where is the config for the aliasing? I've been thinking about looking for Browserify/Webpack config and reading it for things like this... |
I think it might make sense to just lump |
Here is the documentation of how to configure alias with webpack: https://webpack.github.io/docs/configuration.html#resolve-alias basically it would just look like:
Yes applying the |
How about this... what if I wrote a custom resolver for Webpack that reads your alias config and uses it as part of the resolution process? I think this would be useful for me as well. Plus I'm not sure how to add ignores to |
Running into the same issue. Have a handful of webpack aliases. Was confused when the |
I'm close to having a resolver that speaks Webpack config. Hoping to publish this week. 😅 |
Ignore pattern for no-unresolved would be pretty good to have though. I would love to be able to ignore imports like |
@renke: do you want to ignore it because Because the Webpack resolver will be (is!) smart enough to ignore loaders and just look for the file. I suspect your answer is 'yes', though? |
Just published 0.11 with the optional Webpack resolver plugin. To have the linter read your aliases, just add Let me know what still needs to be ignored/repaired beyond that. It is working for my Webpack setup for aliases, externals, and Bower components**!
Looking forward to feedback! 😅 |
Heads up, I'ma close this for now. Let me know if this doesn't solve the issue (anyone) and we can discuss options. |
In React Native you're able to import image assets like so:
With |
We are using alias for our imports. Which means that for some import, there is no concrete files that can match the name.
It would be great if in the
settings
>import/resolve
section we could add a list of alias or a list of pattern to ignore.The text was updated successfully, but these errors were encountered: