Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable 'prefer-promise-reject-errors' ESLint rule #1882

Merged
merged 1 commit into from May 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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