riasvdv / laravel-mix-eslint

mix.eslint()
20 stars 5 forks source link

Module build failed: Error: No ESLint configuration found. #3

Closed cyberbit closed 5 years ago

cyberbit commented 5 years ago

Disclaimer, I'm fairly new to webpack. Here's my webpack.mix.js file:

const mix = require('laravel-mix');

require('laravel-mix-eslint');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.js('resources/js/app.js', 'public/js').eslint()
   .sass('resources/sass/app.scss', 'public/css');

If using this plugin requires an .eslintrc.js file or similar, that should probably be in the readme IMO. ;)

riasvdv commented 5 years ago

This is just a wrapper around eslint to make it easier to use with Mix, of course you still have to comply to Eslint's requirements https://eslint.org/docs/user-guide/getting-started#configuration

cyberbit commented 5 years ago

That's what I figured. Thanks for the help, it's working great now 👍