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
|
|
@ -5,7 +5,7 @@
|
|||
"es6": true
|
||||
},
|
||||
"extends": ["eslint:recommended", "standard", "standard-react"],
|
||||
"parser": "babel-eslint",
|
||||
"parser": "@babel/eslint-parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "7",
|
||||
"ecmaFeatures": {
|
||||
|
|
|
|||
|
|
@ -14,25 +14,25 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.5.4",
|
||||
"@babel/eslint-parser": "^7.16.0",
|
||||
"@babel/preset-env": "^7.5.4",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"babel-loader": "^8.0.0",
|
||||
"chrome-remote-interface": "^0.28.0",
|
||||
"compression-webpack-plugin": "^1.1.11",
|
||||
"copy-webpack-plugin": "^4.5.2",
|
||||
"css-loader": "^3.0.0",
|
||||
"eslint": "^6.3.0",
|
||||
"eslint": "^7.10.0",
|
||||
"eslint-config-standard": "^14.1.0",
|
||||
"eslint-config-standard-react": "^9.2.0",
|
||||
"eslint-loader": "^3.0.0",
|
||||
"eslint-plugin-flowtype": "^4.3.0",
|
||||
"eslint-plugin-import": "^2.18.2",
|
||||
"eslint-plugin-node": "^10.0.0",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.14.3",
|
||||
"eslint-plugin-react-hooks": "^2.1.2",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"eslint-plugin-standard": "^4.0.1",
|
||||
"eslint-webpack-plugin": "^2.5.3",
|
||||
"htmlparser": "^1.7.7",
|
||||
"jed": "^1.1.1",
|
||||
"mini-css-extract-plugin": "^0.9.0",
|
||||
|
|
|
|||
|
|
@ -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