Skip to content

Commit

Permalink
Convert promise-based function to async/await
Browse files Browse the repository at this point in the history
refs #437
  • Loading branch information
cheungpat committed Jul 5, 2018
1 parent 2972049 commit b543f95
Show file tree
Hide file tree
Showing 38 changed files with 1,698 additions and 1,925 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Expand Up @@ -9,6 +9,10 @@
["transform-builtin-extend", {
"globals": ["Error", "Array"],
"approximate": true
}],
["transform-runtime", {
"polyfill": false,
"regenerator": true
}]
]
}
7 changes: 6 additions & 1 deletion .eslintrc
@@ -1,4 +1,8 @@
{
"plugins": ["promise"],
"extends": [
"plugin:promise/recommended"
],
"rules": {
"strict": [
2,
Expand Down Expand Up @@ -178,7 +182,8 @@
],
"semi": 2,
"keyword-spacing": 2,
"complexity": [2, 10]
"complexity": [2, 10],
"promise/prefer-await-to-then": "error"
},
"env": {
"node": true,
Expand Down
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -25,6 +25,7 @@
"babel-eslint": "^7.1.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-builtin-extend": "^1.1.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.14.0",
"babel-preset-react": "^6.11.1",
"babel-preset-stage-2": "^6.13.0",
Expand All @@ -47,6 +48,7 @@
"esdoc-type-inference-plugin": "^1.0.0",
"esdoc-undocumented-identifier-plugin": "^1.0.0",
"esdoc-unexported-identifier-plugin": "^1.0.0",
"eslint-plugin-promise": "^3.8.0",
"glob": "^7.1.1",
"gulp": "^3.6.0",
"gulp-babel": "^6.1.2",
Expand Down

0 comments on commit b543f95

Please sign in to comment.