Skip to content

Commit

Permalink
apply new rule @checkdigit/no-promise-instance-method
Browse files Browse the repository at this point in the history
  • Loading branch information
le-cong committed Jul 15, 2024
1 parent c97f166 commit 2026acb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@checkdigit/eslint-config",
"version": "9.6.0",
"version": "9.7.0",
"private": false,
"description": "Check Digit standard eslint configuration",
"keywords": [
Expand Down Expand Up @@ -46,7 +46,7 @@
"jest": "^29.7.0"
},
"peerDependencies": {
"@checkdigit/eslint-plugin": "6.4.0",
"@checkdigit/eslint-plugin": "6.5.0",
"@typescript-eslint/eslint-plugin": "7.16.0",
"@typescript-eslint/parser": "7.16.0",
"eslint": "8.57.0",
Expand Down
11 changes: 11 additions & 0 deletions src/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,14 @@ try {
// eslint-disable-next-line no-console, @checkdigit/invalid-json-stringify
console.log(JSON.stringify(caughtError));
}

export async function testNoPromiseInstanceMethodRule(): Promise<void> {
// eslint-disable-next-line @checkdigit/no-promise-instance-method
return fetch('https://example.com')
.then((response) => {
assert.ok(response);
})
.catch(() => {
//
});
}

0 comments on commit 2026acb

Please sign in to comment.