Skip to content

Commit

Permalink
Enable 'prefer-promise-reject-errors' ESLint rule (#1882)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed May 21, 2019
1 parent b1a39de commit 176aa7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .eslintrc.yml
Expand Up @@ -163,7 +163,7 @@ rules:
no-warning-comments: off # TODO
no-with: error
prefer-named-capture-group: off # ES2018
prefer-promise-reject-errors: off # TODO
prefer-promise-reject-errors: error
radix: error
require-await: off # TODO
require-unicode-regexp: off
Expand Down
2 changes: 2 additions & 0 deletions src/execution/__tests__/executor-test.js
Expand Up @@ -414,9 +414,11 @@ describe('Execute: Handles basic execution tasks', () => {
);
},
asyncRawReject() {
// eslint-disable-next-line prefer-promise-reject-errors
return Promise.reject('Error getting asyncRawReject');
},
asyncEmptyReject() {
// eslint-disable-next-line prefer-promise-reject-errors
return Promise.reject();
},
asyncError() {
Expand Down

0 comments on commit 176aa7f

Please sign in to comment.