chore(lint): enable oxlint auto-removal of unused imports#8450
Merged
Conversation
Bump oxlint to v1.58.0 which includes safe-fix support for import removal (oxc-project/oxc#20839). Configure the no-unused-vars rule with `"fix": { "imports": "safe-fix", "variables": "off" }` so that unused imports are automatically removed by `oxlint --fix` without requiring `--fix-dangerously`.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
4 Skipped Deployments
|
oxlint-tsgolint 0.18+ removed support for moduleResolution: "node" (node10), which our base tsconfig uses. Reverting to 0.17.x avoids 34 "Invalid tsconfig" errors without requiring a moduleResolution change across the monorepo.
Migrate all tsconfig files using moduleResolution "node" (node10) to "bundler", the modern setting for bundler-based projects. This allows bumping oxlint-tsgolint to ^0.18.0 (which dropped node10 support) and resolves the peer dependency mismatch with oxlint 1.58.0. Files changed: - internal/config/tsconfig.base.json (base config for all packages) - apps/vscode/editor/tsconfig.json - apps/vscode/extension/tsconfig.json - internal/apps-script/tsconfig.json - templates/agent/tsconfig.json - templates/nextjs/tsconfig.json - templates/chat/tsconfig.json
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
agent-template | eace1de | Apr 04 2026, 10:58 AM |
The moduleResolution: "bundler" change triggered a linter that added target: "ES2017", but the codebase uses the regex dotAll flag (`s`) which requires ES2018+.
Refactor code snippets in apps/docs/content/releases/next.mdx for readability and correctness: collapse small JSX props onto a single line, expand one-line method implementations into multi-line blocks, and add a leading semicolon before the final <Tldraw /> example to avoid automatic semicolon insertion issues after the class declaration.
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.
In order to automatically remove unused imports via oxlint (replacing the previous
prettier-plugin-organize-importsbehavior), this PR bumps oxlint to v1.58.0 and enables the newsafe-fixoption for import removal. It also migrates all tsconfig files frommoduleResolution: "node"(node10) to"bundler", the modern setting for bundler-based projects like tldraw.What changed
oxlint --fixremoves unused imports without--fix-dangerouslyno-unused-varsconfig — added"fix": { "imports": "safe-fix", "variables": "off" }so only imports are auto-removedmoduleResolution: "bundler"— migrated the base tsconfig and 6 other tsconfig files from"node"to"bundler". This was required becauseoxlint-tsgolint0.18+ (peer dep of oxlint 1.58.0) dropped support formoduleResolution: "node10"Relates to oxc-project/oxc#18301
Change type
improvementTest plan
.tsxfilenpx oxlint --fix <file>yarn typecheck— passes cleanlyyarn lint— passes with 0 errorsCode changes