MetaMask / MetaMask/eslint-config
(TypeScript) Detect incorrect usages of `@type` in doc blocks
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 12
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
JSDoc includes a [`@type`](https://jsdoc.app/tags-type.html) tag, which can be used to assign a type to a variable. However, this is commonly confused with the [`@typedef`](https://jsdoc.app/tags-typedef.html) tag, which is used to define a type.
In TypeScript, neither of these tags are necessary to document a type or interface; the JSDoc integration in VSCode (or one's editor of choice) is perfectly able to read a doc block placed above such a definition.
It would be great if we could write a lint rule which would verify that `@type` or `@typedef` is not present in a doc block for a type or interface and remove it automatically.
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
The issue names no files, tests, or entry points. Start by locating the repository's existing ESLint rule implementations and tests, then determine how doc blocks on TypeScript types and interfaces are represented. Done means the rule detects the specified @type and @typedef usages and can remove them automatically.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100