ES-Lint Rule "import/no-webpack-loader-syntax" please deactivate
See original GitHub issueI’m trying to use CRA as a starting Point for https://github.com/FormidableLabs/spectacle
Works fine expect the codepane - to show code you need the webpack “raw loader” witch is called like so source={require("raw!../assets/deck.example")}
Since I cant edit the webpack config in CRA - it would be great if this rule “import/no-webpack-loader-syntax” would be just a waring - no error!
Thanks for your help!
And keep an the realy good work - soooo great!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:12 (5 by maintainers)
Top Results From Across the Web
webpack 2 expected '!' error using with import - Stack Overflow
Using inline loaders is generally not recommended and the ESLint rule import/no-webpack-loader-syntax exists to warn you from doing this.
Read more >import/no-webpack-loader-syntax - PLMlab
This syntax is non-standard, so it couples the code to Webpack. The recommended way to specify Webpack loader configuration is in a Webpack ......
Read more >eslint/eslint - Gitter
Hi, I'm new to ESLint, and I want ESLint to add missing curly braces via API automatically (when calling the lintFiles() or lintText()...
Read more >eslint-loader - webpack
NoEmitOnErrorsPlugin is now automatically enabled in webpack 4, when mode is either unset, or set to production. So even ESLint warnings will fail...
Read more >eslint-plugin-import - npm
Start using eslint-plugin-import in your project by running `npm i ... Forbid webpack loader syntax in imports ( no-webpack-loader-syntax ) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For people who might stumble on this issue, here’s a workaround (make sure you understand the implication of doing this): Put this in the file you want to make an exception:
If you ran
create-react-app my-presentation --scripts-version spectacle-scripts
to generate a Spectacle project, here’s how you pass a code sample to theCodePane
component withoutraw-loader
:Add the following to
index.html
(the Prism library handles code syntax highlighting):Use an ES6 module with a
.js
extension for the code sample file (not.example
):Use the
CodePane
in JSX like this (note the curly braces):