-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
chore: address eslint errors #2182
Conversation
9f08783
to
0840b60
Compare
src/lib/apis/audio/index.ts
Outdated
return null; | ||
}); | ||
|
||
if (error) { | ||
throw error; | ||
} | ||
|
||
return res; | ||
return res!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having to add !
s like this smells like a bug...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's one tiny edge case that isn't fully covered, which is if the catch
handles a falsey err
, we don't re-throw that I can address.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(That said, I'll have to reopen #2227 as a new PR anyway since you can't push to a closed PR, so that doesn't really affect this PR 😅. However, the type-related comments from that PR might apply to this one too.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See: #2233. It might be a good idea to start building types for the API on top of that, if it gets eventually merged?
8356bad
to
23b58a3
Compare
23b58a3
to
be89d12
Compare
Pull Request Checklist
dev
branch.Description
npm run lint:frontend
i18next
usage across the codebaseeslint-plugin-unused-imports
to remove unused imports