-
-
Notifications
You must be signed in to change notification settings - Fork 121
Module build failed: Error: No ESLint configuration found #209
Comments
same error. seems need configuration |
I had this problem when building a Webpack-based Vue.js app in an environment where my diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js
index c265eb6..9b09c19 100644
--- a/build/webpack.base.conf.js
+++ b/build/webpack.base.conf.js
@@ -29,15 +29,6 @@ module.exports = {
},
module: {
rules: [
- {
- test: /\.(js|vue)$/,
- loader: 'eslint-loader',
- enforce: 'pre',
- include: [resolve('src'), resolve('test')],
- options: {
- formatter: require('eslint-friendly-formatter')
- }
- },
{
test: /\.vue$/,
loader: 'vue-loader',
diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js
index 5470402..c4d91de 100644
--- a/build/webpack.dev.conf.js
+++ b/build/webpack.dev.conf.js
@@ -13,7 +13,17 @@ Object.keys(baseWebpackConfig.entry).forEach(function (name) {
module.exports = merge(baseWebpackConfig, {
module: {
- rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
+ rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }).concat([
+ {
+ test: /\.(js|vue)$/,
+ loader: 'eslint-loader',
+ enforce: 'pre',
+ include: [resolve('src'), resolve('test')],
+ options: {
+ formatter: require('eslint-friendly-formatter')
+ }
+ }
+ ])
},
// cheap-module-eval-source-map is faster for development
devtool: '#cheap-module-eval-source-map', Your mileage may vary if you're using a different setup, but you get the idea: you can't run Webpack with |
Does anyone have any clue, how to use |
I use prettier on Mac: do control ^ + option + F |
@Saf1997, do you use Prettier inside code editor or integrate with webpack. |
It would be nice if |
Try creating a file named .eslintrc.json in the root of examples directory and input something in the file { |
In my case there were these hidden files .babelrc, editorconfig, .eslintignore, .eslintrc.js and .postcssrc.js(in case you have installed bootstrap). These files were not commited so when I took pull these files were missing. I resolved my problem by copying back these files. |
Getting this error: Module build failed: Error: No ESLint configuration found
Here's the code inside
webpack.config.js
.The text was updated successfully, but these errors were encountered: