-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[linting] Enable eslint/no-unsafe-argument #18965
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b3ebeae
to
ae8613f
Compare
ae8613f
to
e4f7ebe
Compare
svenefftinge
commented
Oct 20, 2023
akosyakov
reviewed
Oct 20, 2023
84b57a2
to
cb1ff7e
Compare
cb1ff7e
to
6dcf7ea
Compare
/unhold |
akosyakov
approved these changes
Oct 23, 2023
AlexTugarev
reviewed
Nov 6, 2023
@@ -3072,8 +3052,11 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { | |||
const result = await this.authProviderService.createOrgAuthProvider(newProvider); | |||
return AuthProviderEntry.redact(result); | |||
} catch (error) { | |||
const message = error && error.message ? error.message : "Failed to create the provider."; | |||
throw new ApplicationError(ErrorCodes.CONFLICT, message); | |||
if (ApplicationError.hasErrorCode(error)) { |
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.
👁️ now
That means essentially, errors like Host could not be reached.
☝🏻 are responded with INTERNAL_SERVER_ERROR
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Enable "@typescript-eslint/no-unsafe-argument": "error" (docs) as a linting rule.
It flags any assignments from any to a more specific type and forces us to explicitly handle use of
any
.Since we have a few places where this flags, I went through those cases and either fixed or explicitly ignored (only in unit tests and very old code where fixing is riskier).
Summary generated by Copilot
🤖 Generated by Copilot at b3ebeae
This pull request improves the reliability, readability, and type safety of the code in the
gitpod-db
andgitpod-protocol
components, by adding and fixing ESLint rules, error handling, type annotations, and test cases. It also refactors and simplifies some of the database and proxy-factory modules.Related Issue(s)
Fixes #
How to test
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold