fix(storage): resolve strict linter and TypeScript errors - #9198
fix(storage): resolve strict linter and TypeScript errors#9198thiyaguk09 wants to merge 4 commits into
Conversation
…orts for improved type safety and code cleanliness
…, and refactor test to use async/await
There was a problem hiding this comment.
Code Review
This pull request refactors imports, formatting, and promise handling across several files, and updates tsconfig.json to include more test paths. However, several changes to promise chains (specifically refactoring .then(..., callback) to .then(...).catch(callback) or adding .catch() handlers) introduce critical bugs where callbacks can be invoked twice if the success callback throws an error. These issues affect getProjectId in service.ts, prepareRequest in util.ts, and createURI / createURIAsync in resumable-upload.ts.
…ting promise issues
| { | ||
| method: 'POST', | ||
| url: 'https://example.com', | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any |
There was a problem hiding this comment.
We are adding a few "// eslint-disable-next-line @typescript-eslint/no-explicit-any" comments especially in the test files to bypass the new linting rules. While this does work as a quick fix, it might be better to take this as an opportunity to remove the any casts wherever possible
There was a problem hiding this comment.
removed the any casts and the eslint-disable
There was a problem hiding this comment.
Thanks for the fixes, I took a look at the PR and still see a few eslint-diable comments lingering. Could we also address those ?
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕