Skip to content
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

const assertions is not supported #846

Closed
JounQin opened this issue Mar 6, 2022 · 4 comments
Closed

const assertions is not supported #846

JounQin opened this issue Mar 6, 2022 · 4 comments

Comments

@JounQin
Copy link

JounQin commented Mar 6, 2022

microsoft/TypeScript#45464

Expected behavior

No warning

Actual behavior

Error

image

ESLint Config

{
  "jsdoc/no-undefined-types": "error"
}

ESLint sample

const configs = /** @type {const} */ (['cjs', 'esm'])

Environment

  • Node version: v16.14.0
  • ESLint version v8.10.0
  • eslint-plugin-jsdoc version: 37.7.1
@brettz9
Copy link
Collaborator

brettz9 commented Mar 6, 2022

Thanks for the report. As this relates to type parsing, please file this with jsdoc-type-pratt-parser. Closing as we typically update pretty quickly after its own updates, but please do cross-reference this issue if filing over there. Thanks!

@brettz9 brettz9 closed this as completed Mar 6, 2022
@JounQin
Copy link
Author

JounQin commented Mar 6, 2022

@brettz9 It seems jsdoc-type-pratt-parser parsed {const} as type correctly, but it is not supported here.

image

@brettz9 brettz9 reopened this Mar 6, 2022
@brettz9 brettz9 closed this as completed in b5b3e17 Mar 6, 2022
@brettz9
Copy link
Collaborator

brettz9 commented Mar 6, 2022

Oh, my apologies, I assumed the error was from valid-types. I've added const (and also unknown).

@gajus
Copy link
Owner

gajus commented Mar 6, 2022

🎉 This issue has been resolved in version 37.9.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Mar 6, 2022
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this issue Mar 8, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | devDependencies | patch | [`37.9.5` -> `37.9.7`](https://renovatebot.com/diffs/npm/eslint-plugin-jsdoc/37.9.5/37.9.7) |

---

### Release Notes

<details>
<summary>gajus/eslint-plugin-jsdoc</summary>

### [`v37.9.7`](https://github.com/gajus/eslint-plugin-jsdoc/releases/v37.9.7)

[Compare Source](gajus/eslint-plugin-jsdoc@v37.9.6...v37.9.7)

##### Bug Fixes

-   **`no-undefined-types`:** support `unknown` and `const`; fixes [#&#8203;846](gajus/eslint-plugin-jsdoc#846) ([b5b3e17](gajus/eslint-plugin-jsdoc@b5b3e17))

### [`v37.9.6`](https://github.com/gajus/eslint-plugin-jsdoc/releases/v37.9.6)

[Compare Source](gajus/eslint-plugin-jsdoc@v37.9.5...v37.9.6)

##### Bug Fixes

-   update devDeps, including gitdown to fix README URLs; fixes [#&#8203;707](gajus/eslint-plugin-jsdoc#707) ([2d69c70](gajus/eslint-plugin-jsdoc@2d69c70))

</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/1196
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
Projects
None yet
Development

No branches or pull requests

3 participants