Skip to content

tools: add linter rule to enforce use of SafePromiseAllReturnVoid - #67726

Open
aduh95 wants to merge 2 commits into
nodejs:mainfrom
aduh95:SafePromiseAllReturnVoid
Open

aduh95 wants to merge 2 commits into
nodejs:mainfrom
aduh95:SafePromiseAllReturnVoid

Conversation

@aduh95

@aduh95 aduh95 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Got the idea when reviewing #67602; assisted by an AI agent

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. labels Nov 23, 2026
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.55%. Comparing base (1ad01d3) to head (bc04efc).
⚠️ Report is 33 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #67726   +/-   ##
=======================================
  Coverage   90.55%   90.55%           
=======================================
  Files         801      801           
  Lines      284215   284215           
  Branches    54887    54887           
=======================================
+ Hits       257369   257381   +12     
+ Misses      17015    16997   -18     
- Partials     9831     9837    +6     

see 37 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aduh95
aduh95 requested a review from LiviaMedeiros November 23, 2026 15:03

@LiviaMedeiros LiviaMedeiros left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can go further and make linter flag every SafePromiseAll() call. I.e. either:

  • this rule, if result is used, should accept SafePromiseAllReturnArrayLike but produce different error on SafePromiseAll (suggest SafePromiseAllReturnArrayLike)
  • no-restricted-syntax should error on SafePromiseAll, suggesting either Return version; and this rule should search only for SafePromiseAllReturnArrayLike

@aduh95

aduh95 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@LiviaMedeiros I was thinking of exploring that as follow ups, this PR is the low hanging fruit

@LiviaMedeiros LiviaMedeiros added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 24, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 24, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants