Skip to content

chore: fix no-unnecessary-boolean-literal-compare lint issues#5709

Merged
chenjiahan merged 1 commit intomainfrom
no-unnecessary-boolean-literal-compare_0730
Jul 30, 2025
Merged

chore: fix no-unnecessary-boolean-literal-compare lint issues#5709
chenjiahan merged 1 commit intomainfrom
no-unnecessary-boolean-literal-compare_0730

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Fix all lint issues found by the @typescript-eslint/no-unnecessary-boolean-literal-compare rules in Rslint.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings July 30, 2025 02:25
@netlify
Copy link
Copy Markdown

netlify bot commented Jul 30, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 41c7481
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/688982954b628e000837228f
😎 Deploy Preview https://deploy-preview-5709--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 58 (🔴 down 34 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

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

This PR fixes TypeScript ESLint lint issues by removing the @typescript-eslint/no-unnecessary-boolean-literal-compare rule from the disabled rules list and updating code to eliminate unnecessary boolean literal comparisons throughout the codebase.

  • Enables the @typescript-eslint/no-unnecessary-boolean-literal-compare lint rule
  • Simplifies boolean comparisons by removing explicit === true and === false checks
  • Updates multiple files to use more concise boolean expressions

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
rslint.json Removes the disabled lint rule to enable checking for unnecessary boolean literal comparisons
packages/core/src/server/helper.ts Simplifies boolean comparison from === false to negation
packages/core/src/server/gzipMiddleware.ts Removes explicit === false comparisons in filter and write operations
packages/core/src/plugins/output.ts Simplifies === true comparison to direct boolean check
packages/core/src/plugins/minimize.ts Removes unnecessary === true comparison in minify logic
packages/core/src/plugins/css.ts Simplifies postcss plugin check by removing === true
packages/core/src/plugins/asset.ts Changes === false to negation for emit check
packages/core/src/pluginManager.ts Simplifies result comparison from === false to negation

@chenjiahan chenjiahan merged commit 6dd4a02 into main Jul 30, 2025
12 checks passed
@chenjiahan chenjiahan deleted the no-unnecessary-boolean-literal-compare_0730 branch July 30, 2025 02:32
@chenjiahan chenjiahan mentioned this pull request Jul 31, 2025
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.

2 participants