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

check-types: add exemptTagContexts option #461

Merged
merged 1 commit into from
Dec 31, 2019

Conversation

brettz9
Copy link
Collaborator

@brettz9 brettz9 commented Dec 28, 2019

feat(check-types): add option exemptTagContexts to exempt type-checking (certain types or any types) on specific tags; fixes #255

@brettz9 brettz9 requested a review from golopot December 28, 2019 04:00
@brettz9 brettz9 force-pushed the exemptTagContexts branch 4 times, most recently from 44ec029 to a9bd614 Compare December 29, 2019 14:06
…ecking (certain types or any types) on specific tags; fixes gajus#255
@brettz9 brettz9 merged commit 5d99663 into gajus:master Dec 31, 2019
@gajus
Copy link
Owner

gajus commented Dec 31, 2019

🎉 This PR is included in version 18.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Dec 31, 2019
@brettz9 brettz9 deleted the exemptTagContexts branch December 31, 2019 02:40
@binury
Copy link

binury commented Nov 18, 2020

@brettz9 Was there some/any issue with using expressions? Having to specify the exact match means that custom types can't be used without an inline disable or editing the eslintrc like:

{
      "jsdoc/check-types": [
      2,
      {
        "exemptTagContexts": [
          {
            "tag":"type",
            "types":[
              "Object.<string, string>",
              "Object.<string, object>",
              "Object.<string, number>",
              "Object.<string, boolean>",
              "Object.<string, SomeCustomType>",
              "Object.<string, Flower>"
            ]
          }
        ]
      }
    ],
}

vs, e.g.,

{
      "jsdoc/check-types": [
      2,
      {
        "exemptTagContexts": [
          {
            "tag":"type",
            "types":[ "Object.<*, *>" ]
          }
        ]
      }
    ],
}

@brettz9
Copy link
Collaborator Author

brettz9 commented Nov 18, 2020

@binury : No guarantees I'll get to looking into it, but should be best to file as a separate issue so this doesn't get lost...

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

Successfully merging this pull request may close these issues.

check-types option to allow @typedef to be exempt from preferredTypes setting (at least rejections)
3 participants