Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Enabled noUnusedParameters in tsconfig.base.json to enforce stricter checks for unused parameters across the project.

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 16, 2025 05:35
@chenjiahan chenjiahan requested a review from hardfist as a code owner December 16, 2025 05:35
@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 8b48318
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/6940f0b9093a37000822ec6e

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Dec 16, 2025
@chenjiahan chenjiahan changed the title chore: enable noUnusedParameters option in TypeScript configuration chore: enable noUnusedParameters option in tsconfig Dec 16, 2025
Copy link
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

This PR enables the noUnusedParameters TypeScript compiler option in tsconfig.base.json to enforce stricter code quality checks across the project. All unused function parameters have been prefixed with underscore (_) to explicitly indicate they are intentionally unused, and some truly unused parameters have been removed from destructured function signatures.

Key Changes

  • Enabled noUnusedParameters in the base TypeScript configuration
  • Prefixed all unused parameters with underscore (_) throughout the codebase
  • Removed unused development and futureDefaults parameters from applyOutputDefaults function
  • Disabled the rule in test tools package where callback signature matching is important

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.base.json Enabled noUnusedParameters compiler option with trailing comma
packages/rspack/src/stats/DefaultStatsPresetPlugin.ts Prefixed unused warning parameter with underscore in filter callbacks
packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts Prefixed unused options parameter with underscore
packages/rspack/src/lib/EntryOptionPlugin.ts Prefixed unused compiler parameter with underscore
packages/rspack/src/container/ModuleFederationPlugin.ts Removed unused key parameter from arrow function
packages/rspack/src/config/defaults.ts Removed unused development and futureDefaults from function signature and prefixed unused regex match parameter
packages/rspack/src/config/adapter.ts Prefixed unused k (key) parameters with underscore in filter callbacks
packages/rspack/src/Resolver.ts Prefixed unused context parameters with underscore
packages/rspack/src/FileSystem.ts Prefixed unused bytesRead parameter with underscore
packages/rspack/src/Compilation.ts Prefixed unused assets parameter with underscore
packages/rspack/etc/core.api.md Updated API documentation to reflect code changes
packages/rspack-test-tools/tsconfig.json Disabled noUnusedParameters for test utilities

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

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions
Copy link
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 project(s) in monorepo.

📁 react-10k

Path: ../build-tools-performance/cases/react-10k/dist/rsdoctor-data.json

📌 Baseline Commit: 919d595bb1 | PR: #12419

Metric Current Baseline Change
📊 Total Size 5.7 MB 5.7 MB 0 B (0.0%)
📄 JavaScript 5.7 MB 5.7 MB 0 B (0.0%)
🎨 CSS 21.0 B 21.0 B 0 B (0.0%)
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: react-10k Bundle Diff

📁 react-1k

Path: ../build-tools-performance/cases/react-1k/dist/rsdoctor-data.json

📌 Baseline Commit: 919d595bb1 | PR: #12419

Metric Current Baseline Change
📊 Total Size 823.6 KB 823.6 KB 0 B (0.0%)
📄 JavaScript 823.6 KB 823.6 KB 0 B (0.0%)
🎨 CSS 0 B 0 B N/A
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: react-1k Bundle Diff

📁 react-5k

Path: ../build-tools-performance/cases/react-5k/dist/rsdoctor-data.json

📌 Baseline Commit: 919d595bb1 | PR: #12419

Metric Current Baseline Change
📊 Total Size 2.7 MB 2.7 MB 0 B (0.0%)
📄 JavaScript 2.7 MB 2.7 MB 0 B (0.0%)
🎨 CSS 21.0 B 21.0 B 0 B (0.0%)
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: react-5k Bundle Diff

📁 rome

Path: ../build-tools-performance/cases/rome/dist/rsdoctor-data.json

📌 Baseline Commit: 919d595bb1 | PR: #12419

Metric Current Baseline Change
📊 Total Size 984.3 KB 984.3 KB 0 B (0.0%)
📄 JavaScript 984.3 KB 984.3 KB 0 B (0.0%)
🎨 CSS 0 B 0 B N/A
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: rome Bundle Diff

📁 ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

📌 Baseline Commit: 919d595bb1 | PR: #12419

Metric Current Baseline Change
📊 Total Size 2.1 MB 2.1 MB 0 B (0.0%)
📄 JavaScript 2.0 MB 2.0 MB 0 B (0.0%)
🎨 CSS 83.0 KB 83.0 KB 0 B (0.0%)
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: ui-components Bundle Diff

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing 8b48318 to feat: enable lazy compilation for imports by defaults (#12419) by pshu

🙈 Size remains the same at 48.19MB

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 16, 2025

CodSpeed Performance Report

Merging #12464 will not alter performance

Comparing ts_no_unused_1216 (8b48318) with main (919d595)

Summary

✅ 17 untouched

@chenjiahan chenjiahan enabled auto-merge (squash) December 16, 2025 05:59
@chenjiahan chenjiahan merged commit e565745 into main Dec 16, 2025
52 checks passed
@chenjiahan chenjiahan deleted the ts_no_unused_1216 branch December 16, 2025 06:01
@CPunisher CPunisher mentioned this pull request Dec 17, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants