-
-
Notifications
You must be signed in to change notification settings - Fork 746
chore: enable noUnusedParameters option in tsconfig #12464
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
Conversation
✅ Deploy Preview for rspack canceled.
|
There was a problem hiding this 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
noUnusedParametersin the base TypeScript configuration - Prefixed all unused parameters with underscore (
_) throughout the codebase - Removed unused
developmentandfutureDefaultsparameters fromapplyOutputDefaultsfunction - 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.
There was a problem hiding this 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".
Rsdoctor Bundle Diff AnalysisFound 5 project(s) in monorepo. 📁 react-10kPath:
📦 Download Diff Report: react-10k Bundle Diff 📁 react-1kPath:
📦 Download Diff Report: react-1k Bundle Diff 📁 react-5kPath:
📦 Download Diff Report: react-5k Bundle Diff 📁 romePath:
📦 Download Diff Report: rome Bundle Diff 📁 ui-componentsPath:
📦 Download Diff Report: ui-components Bundle Diff Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
🙈 Size remains the same at 48.19MB |
CodSpeed Performance ReportMerging #12464 will not alter performanceComparing Summary
|
Summary
Enabled
noUnusedParametersintsconfig.base.jsonto enforce stricter checks for unused parameters across the project.Related links
Checklist