Skip to content

allow means to skip roots incheck-types #863

Closed
@brettz9

Description

@brettz9

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.

Activity

changed the title [-]`exemptedBy` for `check-types` and expanded[/-] [+]allow means to skip roots in`check-types`[/+] on Oct 31, 2022
added a commit that references this issue on Oct 31, 2022
66789d3
added 2 commits that reference this issue on Nov 1, 2022
591d2ed
8f0ab1c
added a commit that references this issue on Nov 2, 2022
e5da5bb
gajus

gajus commented on Nov 2, 2022

@gajus
Owner

🎉 This issue has been resolved in version 39.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @brettz9@gajus

      Issue actions

        allow means to skip roots in`check-types` · Issue #863 · gajus/eslint-plugin-jsdoc