Skip to content

Commit 0bf1a77

Browse files
committed
Replace deprecated eslint-loader with eslint-webpack-plugin
1 parent 1dc69dc commit 0bf1a77

File tree

3 files changed

+104
-99
lines changed

3 files changed

+104
-99
lines changed

package-lock.json

+101-93
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@
6969
"enzyme-adapter-react-16": "^1.15.3",
7070
"eslint": "^7.6.0",
7171
"eslint-config-airbnb": "^18.2.0",
72-
"eslint-loader": "^4.0.2",
7372
"eslint-plugin-import": "^2.22.0",
7473
"eslint-plugin-jest": "^24.0.1",
7574
"eslint-plugin-jsx-a11y": "^6.3.1",
7675
"eslint-plugin-react": "^7.20.6",
7776
"eslint-plugin-react-hooks": "^4.0.8",
77+
"eslint-webpack-plugin": "^2.4.1",
7878
"husky": "^4.2.5",
7979
"jest": "^26.4.0",
8080
"jest-css-modules": "^2.1.0",

webpack.config.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require('path');
2+
const ESLintPlugin = require('eslint-webpack-plugin');
23

34
const devServerPort = 8000;
45

@@ -16,6 +17,7 @@ module.exports = {
1617
},
1718
extensions: ['.js', '.jsx']
1819
},
20+
plugins: [new ESLintPlugin({ emitWarning: true })],
1921
module: {
2022
rules: [{
2123
test: /\.(js|jsx)$/,
@@ -29,11 +31,6 @@ module.exports = {
2931
'react-hot-loader/babel'
3032
]
3133
}
32-
}, {
33-
loader: 'eslint-loader',
34-
options: {
35-
emitWarning: true
36-
}
3734
}],
3835
exclude: /node_modules/
3936
}, {

0 commit comments

Comments
 (0)