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
This commit is contained in:
parent
e449e94564
commit
0e608d562a
3 changed files with 5 additions and 9 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
"es6": true
|
"es6": true
|
||||||
},
|
},
|
||||||
"extends": ["eslint:recommended", "standard", "standard-react"],
|
"extends": ["eslint:recommended", "standard", "standard-react"],
|
||||||
"parser": "babel-eslint",
|
"parser": "@babel/eslint-parser",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": "7",
|
"ecmaVersion": "7",
|
||||||
"ecmaFeatures": {
|
"ecmaFeatures": {
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,9 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.5.4",
|
"@babel/core": "^7.5.4",
|
||||||
|
"@babel/eslint-parser": "^7.13.14",
|
||||||
"@babel/preset-env": "^7.5.4",
|
"@babel/preset-env": "^7.5.4",
|
||||||
"@babel/preset-react": "^7.0.0",
|
"@babel/preset-react": "^7.0.0",
|
||||||
"babel-eslint": "^10.0.3",
|
|
||||||
"babel-loader": "^8.0.6",
|
"babel-loader": "^8.0.6",
|
||||||
"chrome-remote-interface": "^0.28.0",
|
"chrome-remote-interface": "^0.28.0",
|
||||||
"compression-webpack-plugin": "^6.0.0",
|
"compression-webpack-plugin": "^6.0.0",
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
"eslint": "^7.10.0",
|
"eslint": "^7.10.0",
|
||||||
"eslint-config-standard": "^14.1.1",
|
"eslint-config-standard": "^14.1.1",
|
||||||
"eslint-config-standard-react": "^9.2.0",
|
"eslint-config-standard-react": "^9.2.0",
|
||||||
"eslint-loader": "^4.0.2",
|
|
||||||
"eslint-plugin-flowtype": "^5.2.0",
|
"eslint-plugin-flowtype": "^5.2.0",
|
||||||
"eslint-plugin-import": "^2.22.1",
|
"eslint-plugin-import": "^2.22.1",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
|
|
@ -32,6 +31,7 @@
|
||||||
"eslint-plugin-react": "^7.21.2",
|
"eslint-plugin-react": "^7.21.2",
|
||||||
"eslint-plugin-react-hooks": "^4.1.2",
|
"eslint-plugin-react-hooks": "^4.1.2",
|
||||||
"eslint-plugin-standard": "^4.0.1",
|
"eslint-plugin-standard": "^4.0.1",
|
||||||
|
"eslint-webpack-plugin": "^2.5.3",
|
||||||
"htmlparser": "^1.7.7",
|
"htmlparser": "^1.7.7",
|
||||||
"jed": "^1.1.1",
|
"jed": "^1.1.1",
|
||||||
"mini-css-extract-plugin": "^0.11.0",
|
"mini-css-extract-plugin": "^0.11.0",
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ const extract = require("mini-css-extract-plugin");
|
||||||
const TerserJSPlugin = require('terser-webpack-plugin');
|
const TerserJSPlugin = require('terser-webpack-plugin');
|
||||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||||
const CompressionPlugin = require("compression-webpack-plugin");
|
const CompressionPlugin = require("compression-webpack-plugin");
|
||||||
|
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||||
const CockpitPoPlugin = require("./src/lib/cockpit-po-plugin");
|
const CockpitPoPlugin = require("./src/lib/cockpit-po-plugin");
|
||||||
|
|
||||||
const webpack = require("webpack");
|
const webpack = require("webpack");
|
||||||
|
|
@ -24,6 +25,7 @@ const copy_files = [
|
||||||
const plugins = [
|
const plugins = [
|
||||||
new copy({ patterns: copy_files }),
|
new copy({ patterns: copy_files }),
|
||||||
new extract({filename: "[name].css"}),
|
new extract({filename: "[name].css"}),
|
||||||
|
new ESLintPlugin({ extensions: ["js", "jsx"] }),
|
||||||
new CockpitPoPlugin(),
|
new CockpitPoPlugin(),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -73,12 +75,6 @@ module.exports = {
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
|
||||||
enforce: 'pre',
|
|
||||||
exclude: /node_modules/,
|
|
||||||
loader: 'eslint-loader',
|
|
||||||
test: /\.(js|jsx)$/
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
use: "babel-loader",
|
use: "babel-loader",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue