Open poppabear8883 opened 2 years ago
Seems like this plugin isn't compatible with laravel-mix v6, I'll gladly accept a PR if you get it working, otherwise I'll try to do this when I find some time. It's not a high priority for me as I don't use this anymore
That is too bad. Was just doing research on possible setups with eslint webpack plugin and eslint and started thread at https://laracasts.com/discuss/channels/elixir/webpack-eslint-setups-with-laravel-mix-6 . Do think we need something like
.webpackConfig({
plugins: [
new ESLintPlugin(options)
}),
],
to load plugins in new Laravel Mix 6, but not quite done with the research.
Came to report this also
You need to install eslint-webpack-plugin
manually. see https://github.com/riasvdv/laravel-mix-eslint/blob/master/index.js#L9
According to laravel-mix documentation what is returned from dependencies()
will be installed by mix if you run npm run dev or npx mix
but i don't know why it doesn't auto install.
so after you run
npm install laravel-mix-eslint --save-dev
you need to installeslint-webpack-plugin
runnpm install eslint-webpack-plugin --save-dev
and then follow withnpx mix
@Aslam97 good catch
Hi it seems that the eslint
dependency is not auto installed too. Manually ran
yarn add eslint --dev
along with
yarn add eslint-webpack-plugin --dev
.
So for anyone encountering this issue in the future, do:
yarn add eslint eslint-webpack-plugin --dev
or the npm equivalent
Yeah with eslint-webpack-plugin
added this package does work. Just need to see how I can include prettier in the mix now but ESLint works well. Thanks @Zhythero and @Aslam97
Simply followed the instructions via README and when I run
npm run watch
I receive the error.Laravel 8.41