Use a loose set of rules for consistent JSDoc comments
- Dominant language
- JavaScript
- Stars
- 148k
- Forks
- 26.6k
- PR merge metrics
- No merged PRs in 30d
Description
While using JSDoc should not be mandatory, I think that its users should aim for more consistency, which may be achieved by the following set of loose ESLint rules:
```json
"valid-jsdoc": ["error", {
"prefer": {
"arg": "param",
"argument": "param",
"class": "constructor",
"return": "returns",
"virtual": "abstract"
},
"preferType": {
"Boolean": "boolean",
"Number": "number",
"object": "Object",
"String": "string"
},
"requireReturn": false
}]
```
Contributor guide
No contributing guide indexed for this repository
Research direction
No file or test is named in the issue. Start by locating the repository’s ESLint configuration and current JSDoc guidance, then compare them with the proposed valid-jsdoc options. Done means the agreed consistency rules are applied in the appropriate configuration and verified by the relevant lint checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100