Skip to content

Conversation

@tt-a1i
Copy link
Contributor

@tt-a1i tt-a1i commented Jan 7, 2026

Summary

Enables @typescript-eslint/require-await rule and fixes the 6 violations found.

Changes:

  • rslint.json: Changed @typescript-eslint/require-await from off to error
  • FileSystem.ts: Fixed missing return for Promise, removed unnecessary async
  • SubresourceIntegrityPlugin.ts: Changed async callbacks to use Promise.resolve() since no await is needed
  • browser/service.ts: Removed async from function that only throws (added explicit Promise<never> return type)
  • loader-runner/worker.ts: Removed async from .then/.catch callbacks

Related to #11761

AI Assistance Disclosure

I used Codex to review the changes, sanity-check the implementation against existing patterns, and help spot potential edge cases.

@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 8ba1297
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/695e5a9b9cab010008dc11f8

@github-actions github-actions bot added the release: bug fix release: bug related release(mr only) label Jan 7, 2026
@tt-a1i tt-a1i force-pushed the fix/enable-require-await-rule branch from d9706e8 to 2d89b23 Compare January 7, 2026 13:00
- Enable @typescript-eslint/require-await rule (off -> error)
- FileSystem.ts: Add missing return for Promise, remove async
- SubresourceIntegrityPlugin.ts: Use Promise.resolve() instead of async
- browser/service.ts: Remove async from function that only throws
- loader-runner/worker.ts: Remove async from .then/.catch callbacks
@tt-a1i tt-a1i force-pushed the fix/enable-require-await-rule branch from 2d89b23 to 8ba1297 Compare January 7, 2026 13:07
@tt-a1i tt-a1i marked this pull request as ready for review January 7, 2026 13:11
@tt-a1i tt-a1i requested a review from hardfist as a code owner January 7, 2026 13:11
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 7, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing tt-a1i:fix/enable-require-await-rule (8ba1297) with main (25a4021)1

Summary

✅ 16 untouched benchmarks
⏩ 1 skipped benchmark2

Footnotes

  1. No successful run was found on main (86634a0) during the generation of this report, so 25a4021 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

Copy link
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@chenjiahan chenjiahan merged commit f4c7791 into web-infra-dev:main Jan 7, 2026
52 checks passed
LingyuCoder pushed a commit that referenced this pull request Jan 8, 2026
fix(lint): enable require-await rule and fix violations

- Enable @typescript-eslint/require-await rule (off -> error)
- FileSystem.ts: Add missing return for Promise, remove async
- SubresourceIntegrityPlugin.ts: Use Promise.resolve() instead of async
- browser/service.ts: Remove async from function that only throws
- loader-runner/worker.ts: Remove async from .then/.catch callbacks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants