Skip to content

Commit

Permalink
Update promise rules
Browse files Browse the repository at this point in the history
With async/await most direct uses of promises will be carefully crafted.
Thus rules like promise/param-names and promise/always-return and
promise/catch-or-return tend to get in the way. Furthermore, unhandled
rejections are now logged and when developing applications it's good
practice to crash when they occur, again reducing the need for
promise/catch-or-return.

Add new rules promise/no-return-in-finally and promise/no-return-wrap
which are good practice even for those edge cases where promises are
crafted directly.
  • Loading branch information
novemberborn committed Oct 31, 2017
1 parent e3f62ca commit 0214325
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.js
Expand Up @@ -49,8 +49,9 @@ module.exports = {
'no-warning-comments': 'warn',
'object-shorthand': 'error',
'prefer-const': 'error',
'promise/always-return': 'error',
'promise/catch-or-return': 'error',
'promise/no-return-in-finally': 'error',
'promise/no-return-wrap': 'error',
'promise/param-names': 'off',
'react/jsx-indent': ['error', 2],
'react/jsx-indent-props': ['error', 2],
'react/jsx-key': 'error',
Expand Down

0 comments on commit 0214325

Please sign in to comment.