Skip to content

Commit c2aef60

Browse files
authored
chore(deps): update babel (#261)
1 parent ff8b21f commit c2aef60

File tree

5 files changed

+1422
-1165
lines changed

5 files changed

+1422
-1165
lines changed

.babelrc

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
{
22
"sourceMaps": true,
33
"presets": [
4-
["env", {
5-
"targets": {
6-
"browsers": ["ie >= 11"]
4+
[
5+
"@babel/env",
6+
{
7+
"targets": {
8+
"browsers": ["ie >= 11"]
9+
}
710
}
8-
}],
9-
"stage-0"
11+
]
1012
],
1113
"plugins": [
12-
["transform-decorators-legacy"],
13-
["transform-react-jsx", { "pragma": "h" }],
14-
["transform-object-rest-spread", { "useBuiltIns": true }]
14+
["@babel/plugin-proposal-decorators", { "legacy": true }],
15+
["@babel/plugin-proposal-class-properties", { "loose": true }],
16+
["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }],
17+
["@babel/plugin-transform-react-jsx", { "pragma": "h" }],
18+
["@babel/plugin-transform-modules-commonjs"]
1519
]
1620
}

.eslintrc.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"parser": "babel-eslint",
3-
"extends": "eslint:recommended",
43
"plugins": ["react", "prettier"],
54
"env": {
65
"browser": true,

package.json

+15-12
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@
88
},
99
"dependencies": {},
1010
"devDependencies": {
11+
"@babel/cli": "^7.10.1",
12+
"@babel/register": "^7.10.1",
13+
"@babel/core": "^7.10.2",
14+
"@babel/plugin-proposal-class-properties": "^7.10.1",
15+
"@babel/plugin-proposal-decorators": "^7.10.1",
16+
"@babel/plugin-proposal-object-rest-spread": "^7.10.1",
17+
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
18+
"@babel/plugin-transform-react-jsx": "^7.10.1",
19+
"@babel/polyfill": "^7.10.1",
20+
"@babel/preset-env": "^7.10.2",
1121
"auto-changelog": "^2.0.0",
12-
"babel-cli": "^6.5.2",
13-
"babel-core": "^6.24.0",
1422
"babel-eslint": "^10.1.0",
15-
"babel-loader": "^7.0.0",
16-
"babel-plugin-transform-decorators-legacy": "^1.3.4",
17-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
18-
"babel-plugin-transform-react-jsx": "^6.8.0",
19-
"babel-preset-env": "^1.6.1",
20-
"babel-preset-stage-0": "^6.5.0",
21-
"babel-register": "^6.24.0",
22-
"babel-runtime": "^6.11.6",
23+
"babel-jest": "^26.0.1",
24+
"babel-loader": "^8.1.0",
2325
"caniuse-lite": "^1.0.30000792",
2426
"cross-env": "^7.0.0",
2527
"css-loader": "^3.0.0",
@@ -32,7 +34,6 @@
3234
"gh-release": "^3.4.0",
3335
"gotrue-js": "^0.9.21",
3436
"html-webpack-plugin": "^4.3.0",
35-
"json-loader": "^0.5.4",
3637
"mkdirp": "^0.5.1",
3738
"mobx": "^3.2.2",
3839
"mobx-preact": "^1.1.0",
@@ -70,13 +71,15 @@
7071
"dev": "cross-env NODE_ENV=development webpack-dev-server --inline --progress --config webpack.config.babel.js",
7172
"format": "prettier --write 'src/**/*.js' '*.js'",
7273
"format-preview": "prettier --list-different 'src/**/*.js' '*.js'",
74+
"format-check": "prettier --check 'src/**/*.js' '*.js'",
7375
"prebuild": "rimraf build && mkdirp build",
7476
"prepublish": "run-s build",
7577
"prestart": "run-s build",
7678
"publish": "git push && git push --tags && gh-release",
7779
"react-demo": "cd example && yarn && yarn start",
7880
"release": "node ./script/release.js",
79-
"test": "eslint src",
81+
"lint": "eslint src",
82+
"test": "run-s lint format-check",
8083
"version": "run-s release changelog"
8184
}
8285
}

webpack.config.babel.js

-4
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ module.exports = {
5757
}
5858
]
5959
},
60-
{
61-
test: /\.json$/,
62-
use: "json-loader"
63-
},
6460
{
6561
test: /\.(xml|html|txt|md)$/,
6662
use: " r"

0 commit comments

Comments
 (0)