MetaMask / MetaMask/eslint-config
Enforce no line length for JSDoc description blocks
- Dominant language
- JavaScript
- Stars
- 12
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Some of us (🤚🏻) are used to wrapping code at 80 characters and apply this line wrapping to JSDocs as well.
Unfortunately the JSDoc interpreter part of the language server renders line breaks literally, and may cause params, properties, etc. to not get rendered appropriately.
For instance, notice how the `@returns` line is missing an em-dash:

This happens because `@returns` is wrapped at 80 characters. However, if we don't do that, then we get this:

It would be nice if we could figure out some way of enforcing no excessive line breaks in JSDocs. This would likely have to be a custom rule due to line breaks being necessary to separate paragraphs, etc.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the repository's ESLint configuration and its existing rule tests, then check ESLint's custom-rule guidance for how JSDoc comments are parsed. Define how excessive line breaks differ from paragraph-separating breaks; done means the rule catches the reported wrapped JSDoc case without rejecting intentional paragraph breaks, with tests covering both behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100