You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tl;dr I want to tell eslint-plugin-import that I have a package named assets and it shouldn't worry about resolving this package in my project dependencies.
I am using Rails 5.1 with Webpacker. The default app config allows Webpack to import assets from the Rails asset pipeline transparently as follows:
importmyLogofrom'assets/images/my_logo.svg';
...where my_logo.svg lives in /app/assets/images/my_logo.svg.
I searched and found #433, which is similar to my issue. I added the following to my .eslintrc.json:
However, I'm running into another problem. In importType.js, when isBuiltIn() evaluates my imports based on the import/core-modules setting, it's called with the following arguments and returns false:
tl;dr I want to tell eslint-plugin-import that I have a package named
assets
and it shouldn't worry about resolving this package in my project dependencies.I am using Rails 5.1 with Webpacker. The default app config allows Webpack to import assets from the Rails asset pipeline transparently as follows:
...where
my_logo.svg
lives in/app/assets/images/my_logo.svg
.I searched and found #433, which is similar to my issue. I added the following to my
.eslintrc.json
:However, I'm running into another problem. In
importType.js
, whenisBuiltIn()
evaluates my imports based on theimport/core-modules
setting, it's called with the following arguments and returns false:The error message reads as follows:
I believe I have marked
assets
as a package that is present. No errors are thrown if I write something such asimport foo from 'assets'
.But the import is being evaluated as
assets/images/my_logo.svg
and the plugin believes the package is not present.How can I tell the plugin that
assets
and everything under it are present?The text was updated successfully, but these errors were encountered: