Skip to content

chore(lint): migrate rslint to flat config#1101

Merged
chenjiahan merged 2 commits intomainfrom
codex/chore/rslint-flat-config
Mar 25, 2026
Merged

chore(lint): migrate rslint to flat config#1101
chenjiahan merged 2 commits intomainfrom
codex/chore/rslint-flat-config

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Mar 25, 2026

Summary

Replace rslint.jsonc with rslint.config.mts and keep the existing relaxed TypeScript lint overrides in the new flat-config shape.

Copilot AI review requested due to automatic review settings March 25, 2026 08:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the repository from legacy rslint.jsonc to a new flat-config rslint.config.mts, while adjusting catch clauses to match updated unused-binding lint behavior and improving local discoverability via VS Code recommendations.

Changes:

  • Replaced rslint.jsonc with a new flat config (rslint.config.mts) using @rslint/core.
  • Updated several catch clauses to remove unused bindings (or keep identifiers only when rethrowing).
  • Added the Rslint VS Code extension to workspace recommendations.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
rslint.jsonc Removes legacy lint configuration file.
rslint.config.mts Adds new flat-config lint setup and TypeScript overrides.
packages/core/src/runtime/worker/loadModule.ts Removes unused catch binding.
packages/core/src/runtime/runner/runner.ts Removes unused catch binding.
packages/core/src/core/rsbuild.ts Removes unused catch binding.
packages/browser/src/watchCliShortcuts.ts Replaces empty catch {} with an explicit no-op block.
packages/browser/src/hostController.ts Renames caught error and rethrows the same identifier.
e2e/test-api/fixtures/moduleNotFound.test.ts Removes unused catch binding.
.vscode/extensions.json Recommends Rslint extension for local editor setup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

Rsdoctor Bundle Diff Analysis

Found 12 projects in monorepo, 3 projects with changes.

📊 Quick Summary
Project Total Size Change
adapter-rsbuild 2.1 KB 0
adapter-rslib 23.1 KB 0
adapter-rspack 5.9 KB 0
browser 2.0 MB -2.0 B (-0.0%)
browser-react 3.7 KB 0
browser-ui 804.3 KB 0
coverage-istanbul 9.1 KB 0
core/browser 971.6 KB -6.0 B (-0.0%)
core/loaders 869.0 B 0
core/main 1.5 MB -20.0 B (-0.0%)
vscode/extension 60.2 MB 0
vscode/worker 14.4 KB 0
📋 Detailed Reports (Click to expand)

📁 browser

Path: packages/browser/.rsdoctor/rsdoctor-data.json

📌 Baseline Commit: bc58899a2b | PR: #1100

Metric Current Baseline Change
📊 Total Size 2.0 MB 2.0 MB -2.0 B (-0.0%)
📄 JavaScript 2.0 MB 2.0 MB -2.0 B (-0.0%)
🎨 CSS 11.8 KB 11.8 KB 0
🌐 HTML 765.0 B 765.0 B 0
📁 Other Assets 96.0 B 96.0 B 0

📦 Download Diff Report: browser Bundle Diff

📁 core/browser

Path: packages/core/.rsdoctor/browser/rsdoctor-data.json

📌 Baseline Commit: bc58899a2b | PR: #1100

Metric Current Baseline Change
📊 Total Size 971.6 KB 971.6 KB -6.0 B (-0.0%)
📄 JavaScript 963.5 KB 963.5 KB -6.0 B (-0.0%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 8.1 KB 8.1 KB 0

📦 Download Diff Report: core/browser Bundle Diff

📁 core/main

Path: packages/core/.rsdoctor/main/rsdoctor-data.json

📌 Baseline Commit: bc58899a2b | PR: #1100

Metric Current Baseline Change
📊 Total Size 1.5 MB 1.5 MB -20.0 B (-0.0%)
📄 JavaScript 1.5 MB 1.5 MB -20.0 B (-0.0%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 75.4 KB 75.4 KB 0

📦 Download Diff Report: core/main Bundle Diff

Generated by Rsdoctor GitHub Action

@chenjiahan chenjiahan enabled auto-merge (squash) March 25, 2026 08:55
@chenjiahan chenjiahan requested review from 9aoy and fi3ework March 25, 2026 08:55
@chenjiahan chenjiahan merged commit df8ab2e into main Mar 25, 2026
18 checks passed
@chenjiahan chenjiahan deleted the codex/chore/rslint-flat-config branch March 25, 2026 10:22
@9aoy 9aoy mentioned this pull request Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants