chore: fix unused vars not being flagged by our lint tooling#14329
Merged
felixarntz merged 12 commits intomainfrom Apr 13, 2026
Merged
chore: fix unused vars not being flagged by our lint tooling#14329felixarntz merged 12 commits intomainfrom
felixarntz merged 12 commits intomainfrom
Conversation
lgrammel
reviewed
Apr 10, 2026
| const weatherTool = tool({ | ||
| description: 'Get the weather in a location', | ||
| inputSchema: z.object({ city: z.string() }), | ||
| execute: async ({ city }) => ({ |
Collaborator
There was a problem hiding this comment.
some of these in examples exist on purpose (for illustration), instead of removing an alternative would be to use them below
lgrammel
reviewed
Apr 10, 2026
| model, | ||
| tools: { | ||
| str_replace_editor: bedrockAnthropic.tools.textEditor_20241022({ | ||
| async execute({ command, path, old_str, new_str, insert_text }) { |
Collaborator
There was a problem hiding this comment.
even if they are not used would recommend keeping them in the ai function examples (for illustration etc)
Collaborator
Author
There was a problem hiding this comment.
disabled the checks in tests, oxlint finds a ton of false positives there. with production code, the findings are much more reliable.
lgrammel
reviewed
Apr 10, 2026
lgrammel
reviewed
Apr 10, 2026
lgrammel
reviewed
Apr 10, 2026
lgrammel
reviewed
Apr 10, 2026
lgrammel
reviewed
Apr 10, 2026
lgrammel
reviewed
Apr 10, 2026
lgrammel
reviewed
Apr 10, 2026
lgrammel
reviewed
Apr 10, 2026
lgrammel
reviewed
Apr 10, 2026
lgrammel
reviewed
Apr 10, 2026
lgrammel
reviewed
Apr 10, 2026
| static createContextualError({ | ||
| apiKeyProvided, | ||
| oidcTokenProvided, | ||
| message = 'Authentication failed', |
Collaborator
There was a problem hiding this comment.
keep? why was this removed?
Collaborator
Author
There was a problem hiding this comment.
this is actually unused, it did nothing if passed
…se positives there
lgrammel
reviewed
Apr 13, 2026
Comment on lines
36
to
39
| export function getGlobalTelemetryIntegration< | ||
| TOOLS extends ToolSet = ToolSet, | ||
| OUTPUT extends Output = Output, | ||
| _TOOLS extends ToolSet = ToolSet, | ||
| _OUTPUT extends Output = Output, | ||
| >(): (args?: { |
Collaborator
There was a problem hiding this comment.
generics should be removed
lgrammel
approved these changes
Apr 13, 2026
Contributor
|
🚀 Published in:
|
lgrammel
added a commit
that referenced
this pull request
Apr 13, 2026
## Background Generics are not necessary in `getGlobalTelemetryIntegration`. The two calls for creating a unified telemetry can be reduced to one. ## Summary * Remove generics from `getGlobalTelemetryIntegration` * Rename `getGlobalTelemetryIntegration` to `createUnifiedTelemetry` * Single function instead of two functions for creating unified telemetry * Remove `bindTelemetryIntegration` export ## Related Issues Follow up from #14329
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
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.
Summary
we have a ton of unused variables in our codebase. For some reason, the lint rules to flag these were disabled.
This PR fixes only the violations flagged by
oxlint- it's already a bunch. We can open another PR for the TypeScript flagged problems.oxlintfinds many false positives in tests, and since this is less important for tests anyway, we can just disable the rule for test files.To reduce the scope, we still ignore those errors in
examples/for now - also because some of the unused variables inexamplesare intentionally there.Checklist
pnpm changesetin the project root)