Skip to content

Commit

Permalink
chore: update babel and eslint to support es2017
Browse files Browse the repository at this point in the history
* switch to use `babel-preset-env`, since `babel-preset-es2015` has been deprecated and the former supports es2017 and more configurations
* exclude `transform-regenerator` in babel config since `transform-regenerator` requires a runtime polyfill and isn't actually needed if we don't use `Generator.prototype.return()`
* update eslint target ecma version to 2017
  • Loading branch information
PaperStrike committed Nov 7, 2021
1 parent bc91e07 commit 6b4b5a0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"presets": ["es2015"]
"presets": [
["env", {
"targets": {
"node": "4"
},
"exclude": ["transform-regenerator"]
}]
]
}
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ecmaFeatures": {
"impliedStrict": true
},
"ecmaVersion": 2015
"ecmaVersion": 2017
},
"plugins": ["json"],
"root": true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"aud": "^1.1.5",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-preset-es2015": "^6.24.1",
"babel-preset-env": "^1.7.0",
"codecov": "^2.3.1",
"commitizen": "^2.10.1",
"cz-conventional-changelog": "^2.1.0",
Expand Down

0 comments on commit 6b4b5a0

Please sign in to comment.