Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upimport/no-webpack-loader-syntax rule too strict #937
Comments
Merged
This comment has been minimized.
This comment has been minimized.
|
You can add loader options inside your webpack config file. Can you not? |
This comment has been minimized.
This comment has been minimized.
stale
bot
commented
May 10, 2018
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
stale
bot
added
the
stale
label
May 10, 2018
stale
bot
closed this
May 17, 2018
lock
bot
locked as resolved and limited conversation to collaborators
Aug 15, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
domtra commentedJun 27, 2017
Hi there, in #806 some useful new rule regarding imports were added for the standard v10.
Unfortunately, one rule was added that causes a lot of problems in many of our projects. That is rule import/no-webpack-loader-syntax. It prevents you from specifying loader options in an
importorrequirestatement.While I agree that for general situation, the webpack config file should be the place to add loader configs, in some situation this is simply not possible, or rather a lot of unnecessary work. Also, using a loader config within
importorrequireis an 'official' way, not deprecated or anything else.The official docs for this rule state that it is a non-standard way to use import. However, importing a non js or json file without a bundler (webpack in this case) does not make any sense anyways.
At the moment using inline comments to disable the rule is the only way for us to continue using standard. This is not very feasible, either, but I really want to avoid having to ditch standard and moving to eslint instead.
What do you think? Do these points make sense to you? Is it possible to remove that rule again?