-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Spurious complaint jsdoc/require-returns-check
.
#1315
Closed
danfuzz opened this issue
Sep 18, 2024
· 3 comments
· Fixed by #1316 · May be fixed by WontonSam/markdownlint#38
Closed
Spurious complaint jsdoc/require-returns-check
.
#1315
danfuzz opened this issue
Sep 18, 2024
· 3 comments
· Fixed by #1316 · May be fixed by WontonSam/markdownlint#38
Comments
brettz9
added a commit
to brettz9/eslint-plugin-jsdoc
that referenced
this issue
Sep 18, 2024
…ne branch to return; fixes gajus#1315
🎉 This issue has been resolved in version 50.2.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks so much for the quick fix! |
Thank you for the report! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
A
for (;;)
(forever) loop containing a conditionalreturn
statement gets recognized as such, vis-a-vis the rulerequire-returns-check
.Actual behavior
This warning is reported, even though a
return
is present:The error goes away if
for (;;)
is changed towhile (true)
.But also, surprisingly, if the
@returns
declaration is omitted, then this warning is reported instead:ESLint Config
ESLint sample
In the following, the definition of
x()
causes a problem, buty()
does not:Here is a complete example as a tarball. Unpack it and then run the
demo
script:bug-report.tar.gz
Environment
eslint-plugin-jsdoc
version: 50.2.3The text was updated successfully, but these errors were encountered: