aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-10-11 23:43:12 +0300
committerGravatar Vitaly Takmazov2020-10-11 23:43:12 +0300
commit3a85208bbd5444814794b66d54b40c49f2aa8f08 (patch)
tree89322c00ed6db277998066ca93394320059978cc /webpack.config.js
parent4dd89bc86c5223ee40ccc8ddb4d21aa6d5e5b64e (diff)
eslint-loader->eslint-webpack-plugin
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js5
1 files changed, 3 insertions, 2 deletions
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) {