Use a loose set of rules for consistent JSDoc comments
See original GitHub issueWhile 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:
"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
}]
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
How do I configure ESLint to check for TypeScript class ...
Firstly, I should note that eslint-plugin-jsdoc 's rules are incremental. If you don't have any jsdoc block at all, you first need to...
Read more >Use JSDoc: @constant
The @constant tag is used to mark the documentation as belonging to a symbol that is a constant. Examples. In this example we...
Read more >Rules - ESLint - Pluggable JavaScript Linter
Rules in ESLint are grouped by type to help you understand their purpose. ... Enforce the consistent use of either `function` declarations or...
Read more >Joshua's Docs - JSDoc Cheatsheet and Type Safety Tricks
Cheatsheet on using JSDoc, especially with VSCode, and some tips on type ... I found the right syntax thanks to this Github issue...
Read more >A JSDoc in TypeScript's Clothing - DEV Community
Similarly, we strive to ensure a consistent output from our functions. With both TS and JSDoc, it's at least possible to annotate the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bryankennedy Sure!
@ljharb Could you expand your thoughts, or point me to some reading behind your (Airbnb’s) dislike of JSDoc? Seen this referenced in a couple issues, and I’m just trying to understand.
Edit - Nevermind, sorry…saw that you did just what I was asking about here.