Skip to content

Commit 7559469

Browse files
committed
Update dependencies
1 parent 0833986 commit 7559469

File tree

4 files changed

+45
-38
lines changed

4 files changed

+45
-38
lines changed

.babelrc

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"presets": ["env", "react"],
3-
"plugins": [
4-
"transform-object-rest-spread"
2+
"presets": [
3+
"@babel/preset-env",
4+
"@babel/preset-react",
5+
"@babel/preset-typescript"
56
]
6-
}
7+
}

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "eslint:recommended",
3-
"parser": "babel-eslint",
3+
"parser": "@babel/eslint-parser",
44
"env": {
55
"browser": true,
66
"node": true,

package.json

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-lazy-load-image-component",
33
"version": "1.5.1",
4-
"description": " React Component to lazy load images using a HOC to track window scroll position. ",
4+
"description": " React Component to lazy load images using a HOC to track window scroll position.",
55
"main": "build/index.js",
66
"peerDependencies": {
77
"react": "^15.x.x || ^16.x.x || ^17.x.x",
@@ -12,30 +12,29 @@
1212
"lodash.throttle": "^4.1.1"
1313
},
1414
"devDependencies": {
15-
"babel-cli": "^6.24.1",
16-
"babel-core": "^6.26.0",
17-
"babel-eslint": "^8.2.2",
18-
"babel-jest": "^22.4.1",
19-
"babel-loader": "^7.1.4",
20-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
21-
"babel-preset-env": "^1.6.1",
22-
"babel-preset-react": "^6.24.1",
23-
"css-loader": "^0.28.10",
24-
"enzyme": "^3.4.4",
25-
"enzyme-adapter-react-16": "^1.2.0",
26-
"eslint": "^4.18.2",
27-
"eslint-loader": "^2.0.0",
28-
"eslint-plugin-babel": "^4.1.2",
29-
"eslint-plugin-react": "^7.11.1",
30-
"husky": "^3.1.0",
31-
"jest": "^23.5.0",
15+
"@babel/core": "^7.15.0",
16+
"@babel/eslint-parser": "^7.15.0",
17+
"@babel/preset-env": "^7.15.0",
18+
"@babel/preset-react": "^7.14.5",
19+
"@babel/preset-typescript": "^7.15.0",
20+
"babel-jest": "^27.0.6",
21+
"babel-loader": "^8.2.2",
22+
"css-loader": "^6.2.0",
23+
"enzyme": "^3.11.0",
24+
"enzyme-adapter-react-16": "^1.15.6",
25+
"eslint": "^7.32.0",
26+
"eslint-plugin-babel": "^5.3.1",
27+
"eslint-plugin-react": "^7.24.0",
28+
"eslint-webpack-plugin": "^3.0.1",
29+
"husky": "^7.0.1",
30+
"jest": "^27.0.6",
3231
"path": "^0.12.7",
33-
"prettier": "^1.19.1",
32+
"prettier": "^2.3.2",
3433
"react": "^16.2.0",
3534
"react-dom": "^16.2.0",
36-
"style-loader": "^0.20.3",
37-
"webpack": "^4.17.1",
38-
"webpack-cli": "^3.1.2"
35+
"style-loader": "^3.2.1",
36+
"webpack": "^5.50.0",
37+
"webpack-cli": "^4.7.2"
3938
},
4039
"scripts": {
4140
"test": "jest",
@@ -46,7 +45,8 @@
4645
},
4746
"jest": {
4847
"verbose": true,
49-
"testURL": "http://localhost/"
48+
"testURL": "http://localhost/",
49+
"testEnvironment": "jsdom"
5050
},
5151
"repository": {
5252
"type": "git",

webpack.config.js

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const webpack = require('webpack');
21
const path = require('path');
2+
const ESLintPlugin = require('eslint-webpack-plugin');
33

44
module.exports = {
55
mode: 'production',
@@ -11,27 +11,27 @@ module.exports = {
1111
},
1212
module: {
1313
rules: [
14-
{
15-
enforce: 'pre',
16-
test: /\.jsx?$/,
17-
loaders: ['eslint-loader'],
18-
include: path.resolve(__dirname, 'src'),
19-
exclude: /(node_modules|bower_components|build)/,
20-
},
2114
{
2215
test: /\.jsx?$/,
2316
include: path.resolve(__dirname, 'src'),
2417
exclude: /(node_modules|bower_components|build)/,
2518
use: {
2619
loader: 'babel-loader',
2720
options: {
28-
presets: ['env'],
21+
presets: ['@babel/preset-env'],
2922
},
3023
},
3124
},
3225
{
3326
test: /\.css$/,
34-
loaders: ['style-loader', 'css-loader'],
27+
use: [
28+
{
29+
loader: 'style-loader',
30+
},
31+
{
32+
loader: 'css-loader',
33+
},
34+
],
3535
exclude: /node_modules/,
3636
},
3737
],
@@ -40,4 +40,10 @@ module.exports = {
4040
react: 'commonjs react',
4141
'react-dom': 'commonjs react-dom',
4242
},
43+
plugins: [
44+
new ESLintPlugin({
45+
context: path.resolve(__dirname, 'src'),
46+
extensions: ['js', 'jsx', 'ts', 'tsx'],
47+
}),
48+
],
4349
};

0 commit comments

Comments
 (0)