From 3a85208bbd5444814794b66d54b40c49f2aa8f08 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 11 Oct 2020 23:43:12 +0300 Subject: eslint-loader->eslint-webpack-plugin --- webpack.config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js index a705f669..331ed338 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const TerserPlugin = require('terser-webpack-plugin'); const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); +const ESLintPlugin = require('eslint-webpack-plugin'); module.exports = (env, argv) => { const dev = argv.mode !== 'production'; @@ -35,7 +36,6 @@ module.exports = (env, argv) => { }, module: { rules: [ - { test: /\.jsx?$/, loader: 'eslint-loader', enforce: 'pre', exclude: /node_modules/, options: { failOnWarning: false, failOnError: true, fix: true } }, { test: /\.js$/, loader: 'babel-loader' }, { test: /\.css$/, @@ -64,7 +64,8 @@ module.exports = (env, argv) => { ] }, plugins: [ - new MiniCssExtractPlugin({ filename: 'style.css', allChunks: true }) + new MiniCssExtractPlugin({ filename: 'style.css', allChunks: true }), + new ESLintPlugin({ files: 'src/main/assets', lintDirtyModulesOnly: true, failOnWarning: false, failOnError: true, fix: false }) ], }; if (!dev) { -- cgit v1.2.3