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

Update to eslint v9 #26

Merged
merged 3 commits into from
Mar 6, 2025
Merged

Update to eslint v9 #26

merged 3 commits into from
Mar 6, 2025

Conversation

armfazh
Copy link
Contributor

@armfazh armfazh commented Sep 27, 2024

Changes:

  • Uses new Eslint v9.
  • Uses now types for sjcl from @types/sjcl repo.
  • Minor annotations to some functions

@armfazh armfazh requested a review from thibmeu September 27, 2024 22:26
@@ -56,7 +58,7 @@ async function mockImportKey(
crypto.subtle.importKey = parentImportKey;
try {
if (format === 'jwk') {
return crypto.subtle.importKey(
return await crypto.subtle.importKey(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the reason to await instead of returning a promise that would be awaited?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the linter rule docs:

When the return statement is in try...catch, awaiting the promise also allows the promise's rejection to be caught instead of leaving the error to the caller.

@thibmeu thibmeu merged commit f99cb9e into cloudflare:main Mar 6, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants