Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint should warn about mismatched parameter names #575

Closed
jfirebaugh opened this issue Oct 21, 2016 · 1 comment
Closed

Lint should warn about mismatched parameter names #575

jfirebaugh opened this issue Oct 21, 2016 · 1 comment
Assignees

Comments

@jfirebaugh
Copy link
Member

The following should be a lint error, because as written it will generate documentation for two parameters, which is not what's desired.

/**
 * @param {Object} opts
 */
function foo(options) {}
@tmcw
Copy link
Member

tmcw commented Apr 29, 2017

I want to make this happen, but it'll really have to be a warning, unfortunately, for the case like

/**
 * @param {number} foo
 * @param {number} bar
 */
function add() {
  return arguments[0] + arguments[1];
}

Basically, only using arguments and having little relationship between named and unnamed params.

@tmcw tmcw self-assigned this Apr 29, 2017
tmcw added a commit that referenced this issue Apr 29, 2017
… stage

This will flag cases where people explicitly document things in JSDoc that don't reflect the code
reality - in many cases, misnamed parameter names in documentation tags.

Fixes #575
tmcw added a commit that referenced this issue Apr 29, 2017
… stage

This will flag cases where people explicitly document things in JSDoc that don't reflect the code
reality - in many cases, misnamed parameter names in documentation tags.

Fixes #575
tmcw added a commit that referenced this issue May 1, 2017
… stage

This will flag cases where people explicitly document things in JSDoc that don't reflect the code
reality - in many cases, misnamed parameter names in documentation tags.

Fixes #575
@tmcw tmcw closed this as completed in #764 May 1, 2017
tmcw added a commit that referenced this issue May 1, 2017
… stage

This will flag cases where people explicitly document things in JSDoc that don't reflect the code
reality - in many cases, misnamed parameter names in documentation tags.

Fixes #575
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants