Use current babel/eslint integration
Fixes these `npm install` warnings:
> deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
> deprecated eslint-loader@4.0.2: This loader has been deprecated. Please use eslint-webpack-plugin
Cherry-picked from starter-kit commit 0e608d562a
This commit is contained in:
parent
fec5fd1ae7
commit
c855f12deb
3 changed files with 10 additions and 12 deletions
|
|
@ -4,6 +4,7 @@ const extract = require("mini-css-extract-plugin");
|
|||
const fs = require("fs");
|
||||
const webpack = require("webpack");
|
||||
const CompressionPlugin = require("compression-webpack-plugin");
|
||||
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||
|
||||
var externals = {
|
||||
cockpit: "cockpit",
|
||||
|
|
@ -76,7 +77,10 @@ info.files.forEach(function (value) {
|
|||
});
|
||||
info.files = files;
|
||||
|
||||
var plugins = [new copy(info.files), new extract({ filename: "[name].css" })];
|
||||
var plugins = [
|
||||
new copy(info.files), new extract({ filename: "[name].css" }),
|
||||
new ESLintPlugin({ extensions: ["js", "jsx"], exclude: ["spec", "node_modules", "src/lib"] }),
|
||||
];
|
||||
|
||||
/* Only minimize when in production mode */
|
||||
if (production) {
|
||||
|
|
@ -125,12 +129,6 @@ module.exports = {
|
|||
devtool: "source-map",
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
enforce: "pre",
|
||||
exclude: /node_modules/,
|
||||
loader: "eslint-loader",
|
||||
test: /\.(js|jsx)$/,
|
||||
},
|
||||
{
|
||||
exclude: /node_modules/,
|
||||
use: babel_loader,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue