Support for defining custom tag syntax
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 162
- Avg merge
- 17h 24m
- Merged PRs (30d)
- 8
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the TSDoc tagDefinitions and supportForTags configuration shown in the issue, then trace how the parser handles syntaxKind and tag content. Done means a custom @prop tag can accept the demonstrated JSDoc format, including repeated tags and following content, while ESLint passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100