Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Enable some Rslint rules and fix lint issues:

  • @typescript-eslint/no-unnecessary-type-arguments
  • @typescript-eslint/no-misused-promises
  • @typescript-eslint/no-unnecessary-boolean-literal-compare
  • @typescript-eslint/class-literal-property-style

Related links

Checklist

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

@Copilot Copilot AI review requested due to automatic review settings October 14, 2025 08:00
@chenjiahan chenjiahan requested a review from hardfist as a code owner October 14, 2025 08:00
@netlify
Copy link

netlify bot commented Oct 14, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 3fa1dda
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68ee08f0d15e4e0008f92cc8

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Oct 14, 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

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.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 14, 2025

📦 Binary Size-limit

Comparing 3fa1dda to chore(deps): update patch npm dependencies (#11806) by renovate[bot]

🎉 Size decreased by 273.00KB from 47.89MB to 47.63MB (⬇️0.56%)

hardfist
hardfist previously approved these changes Oct 14, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 14, 2025

CodSpeed Performance Report

Merging #11869 will not alter performance

Comparing enable_rules_1014 (3fa1dda) with main (1136e50)

Summary

✅ 17 untouched

@chenjiahan chenjiahan enabled auto-merge (squash) October 14, 2025 09:21
@chenjiahan chenjiahan requested a review from hardfist October 14, 2025 09:21
@chenjiahan chenjiahan merged commit 908f59d into main Oct 15, 2025
91 of 96 checks passed
@chenjiahan chenjiahan deleted the enable_rules_1014 branch October 15, 2025 06:37
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