Skip to content

refactor: remove unnecessary async and update type definitions#5777

Merged
chenjiahan merged 1 commit intomainfrom
async_fn_0806
Aug 6, 2025
Merged

refactor: remove unnecessary async and update type definitions#5777
chenjiahan merged 1 commit intomainfrom
async_fn_0806

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

  • Remove unnecessary async and update type definitions
  • Enable the @typescript-eslint/require-await rule of Rslint.

Checklist

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

Copilot AI review requested due to automatic review settings August 6, 2025 14:19
@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 6, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 5d817dd
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68936469a8e14d0007caf725
😎 Deploy Preview https://deploy-preview-5777--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: 81 (🟢 up 7 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 removes unnecessary async keywords from functions that don't perform asynchronous operations and updates related type definitions to be synchronous. The change enables the @typescript-eslint/require-await ESLint rule to catch future violations where async is used without await.

  • Removes async from functions that don't use await operations
  • Updates type definitions to allow both synchronous and asynchronous functions where appropriate
  • Enables the @typescript-eslint/require-await rule in the ESLint configuration

Reviewed Changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
website/docs/zh/guide/start/index.mdx Updates Rslint description from "代码分析工具" to "代码检查工具"
README.zh-CN.md Updates Rslint description from "代码分析工具" to "代码检查工具"
rslint.json Enables the @typescript-eslint/require-await rule
packages/plugin-*/src/index.ts Removes unnecessary async from bundler chain modification functions
packages/core/src/types/rsbuild.ts Updates type definitions to allow synchronous providers
packages/core/src/**/*.ts Removes async from functions that don't use await
packages/compat/webpack/src/webpackConfig.ts Removes await from synchronous function call

Comment thread packages/core/src/helpers/index.ts
Comment thread packages/core/src/server/runner/index.ts
@chenjiahan chenjiahan merged commit 9ea7b44 into main Aug 6, 2025
12 checks passed
@chenjiahan chenjiahan deleted the async_fn_0806 branch August 6, 2025 23:43
@chenjiahan chenjiahan mentioned this pull request Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants