Skip to content

chore: enable no-unsafe-enum-comparison lint rule#5833

Merged
chenjiahan merged 1 commit intomainfrom
enable_no-unsafe-enum-comparison_0813
Aug 13, 2025
Merged

chore: enable no-unsafe-enum-comparison lint rule#5833
chenjiahan merged 1 commit intomainfrom
enable_no-unsafe-enum-comparison_0813

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

  • Enabled the @typescript-eslint/no-unsafe-enum-comparison rule from rslint.json
  • Upgraded @rslint/core from version 0.1.7 to 0.1.9

Checklist

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

Copilot AI review requested due to automatic review settings August 13, 2025 09:27
@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 13, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit b4b90fa
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/689c5a9f20ea790008281f66
😎 Deploy Preview https://deploy-preview-5833--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: 87 (🟢 up 12 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 enables stricter TypeScript linting by activating the @typescript-eslint/no-unsafe-enum-comparison rule and fixes related type safety issues. The changes ensure enum values are used with proper type annotations rather than plain strings.

  • Enabled the no-unsafe-enum-comparison ESLint rule for better type safety
  • Updated function parameters to use TracePreset enum type instead of string
  • Added explicit type casting where needed to maintain compatibility

Reviewed Changes

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

File Description
rslint.json Removes the disabled state of the no-unsafe-enum-comparison rule
packages/core/src/plugins/rspackProfile.ts Updates function signatures to use TracePreset enum type and adds type casting
package.json Upgrades @rslint/core dependency from 0.1.7 to 0.1.9
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/core/src/plugins/rspackProfile.ts
@chenjiahan chenjiahan merged commit 4cc35f9 into main Aug 13, 2025
12 checks passed
@chenjiahan chenjiahan deleted the enable_no-unsafe-enum-comparison_0813 branch August 13, 2025 09:37
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