-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore(lint): Rule adjustments and fix warnings #19612
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
Changes from 1 commit
f5135e7
a722d54
b1d889a
cef9a25
03031d0
41b258d
ab2b8d2
355ad20
7cf7e2c
d840f01
74d86ff
b8f68dd
903df65
fe828c5
1e954ab
e953478
d3c7bad
96a4f31
52179c4
3fcaf65
dbf0ee5
e3b9475
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -105,6 +105,7 @@ export function wrapTransportSend(transport: MCPTransport, options: ResolvedMcpO | |||||||||
| } | ||||||||||
|
|
||||||||||
| if (isJsonRpcResponse(message)) { | ||||||||||
| // oxlint-disable-next-line typescript/prefer-optional-chain | ||||||||||
| if (message.id !== null && message.id !== undefined) { | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. super-l: we could simplify this further, right? Would this allow us to get rid of the optional chain disable rule?
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call, actually it doesn't complain here anymore after 1.50 so I will just revert it. I would be worried if it can be undefined during runtime tho since the spec says it can be omitted, so I will keep both. |
||||||||||
| if (message.error) { | ||||||||||
| captureJsonRpcErrorResponse(message.error); | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -95,6 +95,7 @@ export function prepareEvent( | |||||||||
| ]; | ||||||||||
|
|
||||||||||
| // Skip event processors for internal exceptions to prevent recursion | ||||||||||
| // oxlint-disable-next-line typescript/prefer-optional-chain | ||||||||||
| const isInternalException = hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true; | ||||||||||
|
Comment on lines
+98
to
99
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. super-l: since we're type-casting anyway already, we could simpify this to
Suggested change
which might cut down bundle size ever so slightly? Again, feel free to disregard
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This rule is a bit buggy it threw me off, yep I can do this! |
||||||||||
| const result = isInternalException | ||||||||||
| ? resolvedSyncPromise(prepared) | ||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.