-
-
Notifications
You must be signed in to change notification settings - Fork 728
chore: enable some Rslint rules #11869
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
Enable selected Rslint/ESLint rules and align code to satisfy them by simplifying boolean comparisons, consolidating type arguments, and adjusting class literal property usage.
- Simplify boolean literal comparisons and related code paths.
- Remove unnecessary generic type arguments in several types to satisfy lint rules.
- Adjust hook and symbol property typings to align with class-literal-property-style.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rslint.json | Removes several @typescript-eslint rules; this appears to disable them rather than enable. |
| packages/rspack/src/util/fs.ts | Drops explicit generic parameters on Write/Read types. |
| packages/rspack/src/util/SizeFormatHelpers.ts | Simplifies Number.isNaN boolean literal comparison. |
| packages/rspack/src/stats/StatsPrinter.ts | Simplifies Hook generics and related map types. |
| packages/rspack/src/loader-runner/worker.ts | Simplifies boolean check in cacheable handler. |
| packages/rspack/src/loader-runner/service.ts | Adds lint-disable for no-misused-promises and destructures message. |
| packages/rspack/src/loader-runner/index.ts | Simplifies cacheable checks; potential behavior change introduced. |
| packages/rspack/src/config/devServer.ts | Removes generic parameters from DevMiddlewareContext in a type signature. |
| packages/rspack/src/Compilation.ts | Cleans up SyncHook generic signatures and adopts class-literal property style for toStringTag. |
| package.json | Updates max warnings threshold for rslint. |
Comments suppressed due to low confidence (1)
rslint.json:1
- [nitpick] These rules were removed from the config in this change, which appears to disable them, whereas the PR title/summary states they should be enabled. If the intent is to enable these rules, keep them set to at least "warn" (or ensure they are enabled via a shared config).
[
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
📦 Binary Size-limit
🎉 Size decreased by 273.00KB from 47.89MB to 47.63MB (⬇️0.56%) |
CodSpeed Performance ReportMerging #11869 will not alter performanceComparing Summary
|
Summary
Enable some Rslint rules and fix lint issues:
Related links
Checklist