-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Return type {Object | String}
crashes ESLint JSdoc
#861
Comments
🎉 This issue has been resolved in version 38.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
That was fast! I didn't expect this be fixed within 15min after reporting. That is amazing! 💯 🎉 Thank you very much, @brettz9 ! |
Sure, my pleasure. 🙏 I did a little more tightening just now in 38.1.3 though your particular example was fixed in 38.1.2. |
crapStone
pushed a commit
to Calciumdibromid/CaBr2
that referenced
this issue
Mar 31, 2022
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | devDependencies | minor | [`38.0.8` -> `38.1.3`](https://renovatebot.com/diffs/npm/eslint-plugin-jsdoc/38.0.8/38.1.3) | --- ### Release Notes <details> <summary>gajus/eslint-plugin-jsdoc</summary> ### [`v38.1.3`](https://github.com/gajus/eslint-plugin-jsdoc/releases/v38.1.3) [Compare Source](gajus/eslint-plugin-jsdoc@v38.1.2...v38.1.3) ##### Bug Fixes - **`check-types`, `no-undefined-types`:** safer optional chaining ([63a96ee](gajus/eslint-plugin-jsdoc@63a96ee)) ### [`v38.1.2`](https://github.com/gajus/eslint-plugin-jsdoc/releases/v38.1.2) [Compare Source](gajus/eslint-plugin-jsdoc@v38.1.1...v38.1.2) ##### Bug Fixes - **`check-types`:** proper use of optional chaining; fixes [#​861](gajus/eslint-plugin-jsdoc#861) ([7dbdd9f](gajus/eslint-plugin-jsdoc@7dbdd9f)) ### [`v38.1.1`](https://github.com/gajus/eslint-plugin-jsdoc/releases/v38.1.1) [Compare Source](gajus/eslint-plugin-jsdoc@v38.1.0...v38.1.1) ##### Bug Fixes - **`check-types`:** for `jsdoc` mode, avoid objecting to upper-case; fixes [#​860](gajus/eslint-plugin-jsdoc#860) ([d11d271](gajus/eslint-plugin-jsdoc@d11d271)) ### [`v38.1.0`](https://github.com/gajus/eslint-plugin-jsdoc/releases/v38.1.0) [Compare Source](gajus/eslint-plugin-jsdoc@v38.0.8...v38.1.0) ##### Features - unless the user supplies their own `object` type `preferredTypes`, prefer `object` for plain objects and otherwise prefer `Object<>`; fixes [#​800](gajus/eslint-plugin-jsdoc#800) ([#​855](gajus/eslint-plugin-jsdoc#855)) ([0f27282](gajus/eslint-plugin-jsdoc@0f27282)) </details> --- ### Configuration 📅 **Schedule**: 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). Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1262 Reviewed-by: 6543 <6543@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you very much for this useful plugin. It appears, that the latest patch version (38.1.1) introduced a bug.
I'll do my best to describe it below. A minimal example as well as demo-repository is attached.
Expected behavior
ESLint (jsdoc plugin) reports issues, if any.
Actual behavior
ESLint (jsdoc plugin) crashes with an internal error
TypeError: Cannot read properties of undefined (reading 'type')
.If I use
@return {Object | String}
, it crashes.@return {object | String}
works.Full stack:
Everything worked in 38.1.0, but 38.1.1 crashes. Seems to be related to #860
For an example, see below.
ESLint Config
ESLint sample
Furthermore, I have created a minimal example here: https://github.com/bugwelle/eslint-issue
Environment
eslint-plugin-jsdoc
version: 38.1.1The text was updated successfully, but these errors were encountered: