Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(eslint-plugin): handle override modifier in promise-function-async fixer#11730

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
sushichan044 wants to merge2 commits intotypescript-eslint:main
base:main
Choose a base branch
Loading
fromsushichan044:sushichan044-202510312002-promise-fn-async

Conversation

@sushichan044
Copy link

@sushichan044sushichan044 commentedOct 31, 2025
edited
Loading

PR Checklist

Overview

This PR fixes the promise-function-async rule's fixer to correctly handle the override modifier when inserting the async keyword into method declarations.

The fixer was incorrectly placing async before override, generating invalid TypeScript syntax. The root cause was that the token-skipping logic only handled Keyword type tokens, but TypeScript's override is actually an Identifier token.

The fix extends the while loop condition to also skip Identifier tokens with the value 'override', ensuring that async is inserted in the correct position according to TypeScript's modifier order specification.

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@sushichan044!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint.

@netlify
Copy link

netlifybot commentedOct 31, 2025
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commite3d0dbb
🔍 Latest deploy loghttps://app.netlify.com/projects/typescript-eslint/deploys/6904a61a0cc5e40007a8d52e
😎 Deploy Previewhttps://deploy-preview-11730--typescript-eslint.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: 90
Accessibility: 97
Best Practices: 100
SEO: 92
PWA: 80
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to yourNetlify project configuration.

@sushichan044sushichan044 changed the titlefix(eslint-plugin): handle override modifier in promise-function-asyn…fix(eslint-plugin): handle override modifier in promise-function-async fixerOct 31, 2025
@nx-cloud
Copy link

nx-cloudbot commentedOct 31, 2025
edited
Loading

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable themin workspace settings.


View yourCI Pipeline Execution ↗ for commite3d0dbb

CommandStatusDurationResult
nx run integration-tests:test❌ Failed53sView ↗
nx test eslint-plugin --coverage=false✅ Succeeded5m 7sView ↗
nx run-many -t lint✅ Succeeded3m 12sView ↗
nx run-many -t typecheck✅ Succeeded2m 1sView ↗
nx test eslint-plugin-internal --coverage=false✅ Succeeded4sView ↗
nx test typescript-estree --coverage=false✅ Succeeded1sView ↗
nx run types:build✅ Succeeded5sView ↗
nx run generate-configs✅ Succeeded5sView ↗
Additional runs (29)✅ Succeeded...View ↗

☁️Nx Cloud last updated this comment at2025-10-31 12:17:18 UTC

@codecov
Copy link

codecovbot commentedOct 31, 2025
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.66%. Comparing base (55ca033) to head (e3d0dbb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@##             main   #11730   +/-   ##=======================================  Coverage   90.66%   90.66%           =======================================  Files         518      518             Lines       52415    52417    +2       Branches     8678     8678           =======================================+ Hits        47521    47523    +2  Misses       4880     4880             Partials       14       14
FlagCoverage Δ
unittest90.66% <100.00%> (+<0.01%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

Files with missing linesCoverage Δ
.../eslint-plugin/src/rules/promise-function-async.ts98.67% <100.00%> (+0.01%)⬆️
🚀 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.

@sushichan044sushichan044 marked this pull request as ready for reviewNovember 1, 2025 00:43
@sushichan044
Copy link
Author

sushichan044 commentedNov 1, 2025
edited
Loading

Integration test is failing but not seems like caused by this PR.
https://github.com/typescript-eslint/typescript-eslint/actions/runs/18972004493/job/54181942681?pr=11730#step:5:199

Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! ✨

@JoshuaKGoldbergJoshuaKGoldberg added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelNov 3, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg approved these changes

Assignees

No one assigned

Labels

1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Bug: [promise-function-async] fixer generates invalid syntax with override keyword

2 participants

@sushichan044@JoshuaKGoldberg

[8]ページ先頭

©2009-2025 Movatter.jp