valid-jsdoc for option objects
See original GitHub issueGiven code as such:
/**
* Some description.
* @param {Object} s State.
* @param {boolean} opts.reverse Is reverse?
* @param {Array.<Natural>} opts.exclude List of ids to exclude.
* @return {Object} New state.
*/
function getPreviewState(s, opts) {}
The valid-jsdoc
rule (as of ESLint 3.7.0) using the default setting currently tells me that I’m missing a param for opts
. However, I was hoping it would recognize opts.*
as covering that case. Is this something that could be supported? As it stands adding a @param {Object} opts Options.
line gets rid of the warning.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
valid-jsdoc - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Use JSDoc: @param
If a parameter is destructured without an explicit name, you can give the object an appropriate one and document its properties. Documenting a...
Read more >ESLint - valid-jsdoc - The --fix option on the command line can ...
This rule enforces valid and consistent JSDoc comments. It reports any of the following problems: missing parameter tag: @arg , @argument , or...
Read more >JSDoc Reference - TypeScript: Documentation
@typedef , @callback , and @param ; @param {Object} options - The shape is the same as SpecialType above. * @param {string} options.prop1...
Read more >How to describe "object" arguments in jsdoc? - Stack Overflow
In this case a @typedef comes in very handy. You can define the type at one point in your source and use it...
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
I’m OK with keeping things the way they are so good to close IMO.
@wavded Has this been resolved by our discussion above? Want to make sure you’re good before we close this.