Skip to content

Commit

Permalink
Upgrade Babel to 7
Browse files Browse the repository at this point in the history
  • Loading branch information
vkrol committed Nov 11, 2020
1 parent c5c427e commit 72facdd
Show file tree
Hide file tree
Showing 5 changed files with 1,455 additions and 1,088 deletions.
8 changes: 0 additions & 8 deletions .babelrc

This file was deleted.

8 changes: 7 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"legacyDecorators": true
}
},
"plugins": ["import"],
"rules": {
"react/forbid-prop-types": 0,
Expand Down
16 changes: 16 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
sourceType: "unambiguous",
presets: [
"@babel/preset-env"
],
plugins: [
[
"@babel/plugin-proposal-decorators",
{
legacy: true
}
],
["@babel/plugin-proposal-class-properties", { loose: true }],
"add-module-exports"
]
};
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"switch:mobx5": "replace \"from 'mobx4'\" \"from 'mobx5'\" src -r",
"switch:mobx4": "replace \"from 'mobx3'\" \"from 'mobx4'\" src -r",
"switch:mobx3": "replace \"from 'mobx'\" \"from 'mobx3'\" src -r",
"test:mobx5": "npm run switch:mobx5 && cross-env TEST=true mocha tests --compilers js:babel-register",
"test:mobx4": "npm run switch:mobx4 && cross-env TEST=true mocha tests --compilers js:babel-register",
"test:mobx3": "npm run switch:mobx3 && cross-env TEST=true mocha tests --compilers js:babel-register",
"test:mobx5": "npm run switch:mobx5 && cross-env TEST=true mocha tests --compilers js:@babel/register",
"test:mobx4": "npm run switch:mobx4 && cross-env TEST=true mocha tests --compilers js:@babel/register",
"test:mobx3": "npm run switch:mobx3 && cross-env TEST=true mocha tests --compilers js:@babel/register",
"test": "npm run test:mobx3 && npm run test:mobx4 && npm run test:mobx5 && npm run switch:mobx",
"cover": "nyc npm test",
"coverage:check": "nyc check-coverage --satements 95 --branches 80 --functions 95 --lines 95",
Expand Down Expand Up @@ -78,18 +78,17 @@
"mobx": "^2.5.0 || ^3.0.0 || ^4.0.0 || ^5.0.0"
},
"devDependencies": {
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.1",
"@babel/eslint-parser": "^7.12.1",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-decorators": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/register": "^7.12.1",
"ajv": "^5.2.2",
"babel-cli": "6.26.0",
"babel-core": "6.23.1",
"babel-eslint": "8.0.2",
"babel-loader": "7.1.4",
"babel-loader": "^8.0.0",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-transform-class-properties": "6.23.0",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"babel-preset-env": "1.7.0",
"babel-preset-stage-0": "6.22.0",
"babel-register": "6.26.0",
"chai": "3.5.0",
"codecov": "1.0.1",
"commitizen": "2.9.6",
Expand Down
Loading

0 comments on commit 72facdd

Please sign in to comment.