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

allow means to skip roots incheck-types #863

Closed
brettz9 opened this issue Apr 5, 2022 · 1 comment · Fixed by #931
Closed

allow means to skip roots incheck-types #863

brettz9 opened this issue Apr 5, 2022 · 1 comment · Fixed by #931

Comments

@brettz9
Copy link
Collaborator

brettz9 commented Apr 5, 2022

Motivation

To allow the likes of this standard JSDoc approach, which allows for documentation per parameter:

/**
 * @param {object} cfg
 * @param {boolean} cfg.isChecked
 * @param {string} cfg.path
 */

...but without complaining about "object" not being a specific type if one's preferredTypes normally discourage the use of this object. One can already exempt it within a @typedef, but one shouldn't wish to normally exempt it in @param--only if it is the "root" param. This would therefore need to be a new kind of exemptedBy, allowing probably for an object and possibly AST comment and context.

Current behavior

Using object in a root param when it is prevented in preferredTypes will err.

Desired behavior

Don't err when using object in a root param.

Alternatives considered

N/A


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@brettz9 brettz9 changed the title exemptedBy for check-types and expanded allow means to skip roots incheck-types Oct 31, 2022
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Oct 31, 2022
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Nov 1, 2022
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Nov 2, 2022
brettz9 added a commit that referenced this issue Nov 2, 2022
@gajus
Copy link
Owner

gajus commented Nov 2, 2022

🎉 This issue has been resolved in version 39.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

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

---

### Release Notes

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

### [`v39.6.0`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.6.0)

[Compare Source](gajus/eslint-plugin-jsdoc@v39.5.1...v39.6.0)

##### Features

-   **`check-types`:** add `skipRootChecking` option to `preferredTypes` setting; fixes [#&#8203;863](gajus/eslint-plugin-jsdoc#863) ([e5da5bb](gajus/eslint-plugin-jsdoc@e5da5bb))

### [`v39.5.1`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.5.1)

[Compare Source](gajus/eslint-plugin-jsdoc@v39.5.0...v39.5.1)

##### Bug Fixes

-   **`require-returns-check`:** ensure breaks in final switch do not fulfill check for all branches returning ([691a414](gajus/eslint-plugin-jsdoc@691a414))

</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, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMi4xIiwidXBkYXRlZEluVmVyIjoiMzQuMTIuMSJ9-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1623
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants