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

Support for defining custom tag syntax #366

Open
oliveryasuna opened this issue Aug 7, 2023 · 1 comment
Open

Support for defining custom tag syntax #366

oliveryasuna opened this issue Aug 7, 2023 · 1 comment

Comments

@oliveryasuna
Copy link

oliveryasuna commented Aug 7, 2023

Example:

I want to use supported JSDoc tags with @custom-elements-manifest/analyzer:

/**
 * @prop {string} dir - The directionality of the element.
 * @prop {string} lang - The language of the element.
 */

Problem:

There is no way to define custom tags that support this format.

// tsdoc.json
{
  "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
  "extends": ["@microsoft/api-extractor/extends/tsdoc-base.json"],
  "tagDefinitions": [
    {
      "tagName": "@prop",
      "syntaxKind": "modifier",
      "allowMultiple": true
    }
  ],
  "supportForTags": {
    "@prop": true
  }
}

ESLint will not pass.

Proposal:

Support custom tag syntax, perhaps through regex. Further, it would be nice if you could omit specifying the syntax kind, such that the parser would allow the content following the tag to be whatever.

@braebo
Copy link

braebo commented Oct 8, 2023

Is this what "noStandardTags": true, is for? I thought it was mean to allow you to disable the default behavior in case you want to override it yourself.

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

No branches or pull requests

2 participants