-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
require-returns-check returning false errors #924
Comments
🎉 This issue has been resolved in version 39.3.20 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks for the report. Some changes needed to be made in an earlier release as the rule was not catching missing return statements from certain branches of execution (if at least one valid return was present). The new logic may still have some gaps, so feel free to report any other such issues. Thanks! |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | devDependencies | patch | [`39.3.14` -> `39.3.21`](https://renovatebot.com/diffs/npm/eslint-plugin-jsdoc/39.3.14/39.3.21) | --- ### Release Notes <details> <summary>gajus/eslint-plugin-jsdoc</summary> ### [`v39.3.21`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.21) [Compare Source](gajus/eslint-plugin-jsdoc@v39.3.20...v39.3.21) ##### Bug Fixes - **`require-param`:** do not cache by comment node; fixes [#​901](gajus/eslint-plugin-jsdoc#901) ([867edc3](gajus/eslint-plugin-jsdoc@867edc3)) ### [`v39.3.20`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.20) [Compare Source](gajus/eslint-plugin-jsdoc@v39.3.19...v39.3.20) ##### Bug Fixes - **`require-returns-check`:** allow for missing catch or finalizer and missing case contents; fixes [#​924](gajus/eslint-plugin-jsdoc#924) ([4fabdd6](gajus/eslint-plugin-jsdoc@4fabdd6)) ### [`v39.3.19`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.19) [Compare Source](gajus/eslint-plugin-jsdoc@v39.3.18...v39.3.19) ##### Bug Fixes - **`require-param`:** be tolerant if `this` is not included as `[@param](https://github.com/param)`; fixes [#​919](gajus/eslint-plugin-jsdoc#919) ([c1f21f8](gajus/eslint-plugin-jsdoc@c1f21f8)) ### [`v39.3.18`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.18) [Compare Source](gajus/eslint-plugin-jsdoc@v39.3.17...v39.3.18) ##### Bug Fixes - **`require-returns-check`:** check child nodes of consequents; fixes [#​923](gajus/eslint-plugin-jsdoc#923) ([dc1f875](gajus/eslint-plugin-jsdoc@dc1f875)) ### [`v39.3.17`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.17) [Compare Source](gajus/eslint-plugin-jsdoc@v39.3.16...v39.3.17) ##### Bug Fixes - **`require-returns-check`:** throw statements to be exempted from final check if elsewhere in function; fixes [#​892](gajus/eslint-plugin-jsdoc#892) ([87c1c2a](gajus/eslint-plugin-jsdoc@87c1c2a)) ### [`v39.3.16`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.16) [Compare Source](gajus/eslint-plugin-jsdoc@v39.3.15...v39.3.16) ##### Bug Fixes - **`check-param-names`:** tolerate documented "this" param; fixes [#​919](gajus/eslint-plugin-jsdoc#919) ([5d20bdf](gajus/eslint-plugin-jsdoc@5d20bdf)) ### [`v39.3.15`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.15) [Compare Source](gajus/eslint-plugin-jsdoc@v39.3.14...v39.3.15) ##### Bug Fixes - **`require-returns-check`:** checks that all branches of final node return; fixes [#​892](gajus/eslint-plugin-jsdoc#892) ([bdd6af2](gajus/eslint-plugin-jsdoc@bdd6af2)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yNDEuOCIsInVwZGF0ZWRJblZlciI6IjMyLjI0MS4xMCJ9--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1600 Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Expected behavior
There should be no
jsdoc/require-returns-check
errors reported for the functions below. This was working correctly with eslint-plugin-jsdoc v39.3.14.Actual behavior
After upgrading to v39.3.19 both functions above return a
jsdoc/require-returns-check
error.ESLint Config
Environment
eslint-plugin-jsdoc
version: 39.3.19The text was updated successfully, but these errors were encountered: