Skip to content

require-param: Why require-param rule reports about function name?  #351

@yeonjuan

Description

@yeonjuan

Maybe I’m wrong..but I think require param checks more(beyond it's responsibility)
Because I think, this rule should check only presence of @param.
but it also report about the function parameter name.

in require-param test

// first
/**
 * @param foo
 */
function quux (foo) {
}
// valid
// second
/**
 * @param
 */
function quux (foo) {
}
// invalid (Messege: Missing JSDoc @param "foo" declaration.)

I think the second test case is valid, because the presence of jsdocParamName( ex: foo) should be checked by 'require-param-name' rule

So,,, I think, It would be better if the report only check presence of param

ex) There are 3 parameters in function , but only 1 in jsdoc

Am I misunderstand about this rule's responsibility?
Thanks for reading, Please reply at your convenience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions