mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Enable the unicorn/no-useless-promise-resolve-reject
ESLint plugin rule
Please see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md Note that this patch also re-sorts the existing `unicorn`-rules in proper alphabetical order.
This commit is contained in:
parent
e738e15aa3
commit
8fbd6755eb
2 changed files with 8 additions and 5 deletions
|
@ -344,7 +344,7 @@ describe("api", function () {
|
|||
function () {
|
||||
// Shouldn't get here.
|
||||
expect(false).toEqual(true);
|
||||
return Promise.reject(new Error("loadingTask should be rejected"));
|
||||
throw new Error("loadingTask should be rejected");
|
||||
},
|
||||
function (data) {
|
||||
expect(data instanceof PasswordException).toEqual(true);
|
||||
|
@ -366,7 +366,7 @@ describe("api", function () {
|
|||
function () {
|
||||
// Shouldn't get here.
|
||||
expect(false).toEqual(true);
|
||||
return Promise.reject(new Error("loadingTask should be rejected"));
|
||||
throw new Error("loadingTask should be rejected");
|
||||
},
|
||||
function (data) {
|
||||
expect(data instanceof PasswordException).toEqual(true);
|
||||
|
@ -427,7 +427,7 @@ describe("api", function () {
|
|||
function () {
|
||||
// Shouldn't get here.
|
||||
expect(false).toEqual(true);
|
||||
return Promise.reject(new Error("loadingTask should be rejected"));
|
||||
throw new Error("loadingTask should be rejected");
|
||||
},
|
||||
function (reason) {
|
||||
expect(reason instanceof PasswordException).toEqual(true);
|
||||
|
@ -447,7 +447,7 @@ describe("api", function () {
|
|||
function () {
|
||||
// Shouldn't get here.
|
||||
expect(false).toEqual(true);
|
||||
return Promise.reject(new Error("loadingTask should be rejected"));
|
||||
throw new Error("loadingTask should be rejected");
|
||||
},
|
||||
function (reason) {
|
||||
expect(reason instanceof PasswordException).toEqual(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue