Skip to content

chore: enable noUncheckedSideEffectImports in tsconfig.json #5384

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

Merged
merged 1 commit into from
Jun 8, 2025

Conversation

chenjiahan
Copy link
Member

Summary

To avoid side effect imports, enable the noUncheckedSideEffectImports setting in tsconfig.json for Rsbuild packages.

Related Links

Checklist

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

@Copilot Copilot AI review requested due to automatic review settings June 8, 2025 09:14
Copy link

netlify bot commented Jun 8, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit f7d1667
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68455476cc0fbf00084305b8
😎 Deploy Preview https://deploy-preview-5384--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 14 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (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
Contributor

@Copilot 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

Enables stricter import checks by turning on the noUncheckedSideEffectImports compiler option.

  • Adds the new flag to the base tsconfig.json to prevent unnoticed side-effect imports.
  • Leaves checklist for tests/docs but no updates added there.
Comments suppressed due to low confidence (2)

scripts/config/tsconfig.json:20

  • [nitpick] Consider adding a note to the project’s README or contributing guide explaining the implications of noUncheckedSideEffectImports and how to opt back in when needed.
"noUncheckedSideEffectImports": true

scripts/config/tsconfig.json:20

  • [nitpick] Verify that all downstream tsconfig files in sub-packages extend this base config so they also enforce the new side-effect import checks consistently.
"noUncheckedSideEffectImports": true

@chenjiahan chenjiahan merged commit a6e3fee into main Jun 8, 2025
12 checks passed
@chenjiahan chenjiahan deleted the enable_noUncheckedSideEffectImports_0608 branch June 8, 2025 09:25
@chenjiahan chenjiahan mentioned this pull request Jun 26, 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.

1 participant