Skip to content

Conversation

rsimha
Copy link
Contributor

@rsimha rsimha commented May 16, 2018

This PR adds a new boolean setting called allowOverrideWithoutParam with a default value of false.

  • When the setting is true, the @override tag can be used without any accompanying @param tag(s).
  • When the setting is omitted (or explicitly set to false), the original behavior remains, and jsdoc/require-param will flag an error when it finds an @override tag without the correct accompanying @param tags.

This was required due to the recommendations of the Google JS style guide (here, here, and here). See #73 and ampproject/amphtml#15297 for more context.

Fixes #73
Fixes #20
Follow up to #24

@rsimha
Copy link
Contributor Author

rsimha commented May 16, 2018

/to @gajus

@rsimha rsimha changed the title Add a allowOverrideWithoutParam setting for jsdoc/require-param Add an allowOverrideWithoutParam setting for jsdoc/require-param May 16, 2018
@rsimha
Copy link
Contributor Author

rsimha commented May 16, 2018

Travis PR check is green.

I also tested the changes in this PR with ampproject/amphtml: extensions/amp-hulu/0.1/amp-hulu.js, which is supposed to have zero JSDoc lint errors.

Before:

[19:46:52] INFO: Running lint on extensions/amp-hulu/0.1/amp-hulu.js
[19:46:53] /usr/local/google/home/rsimha/src/amphtml/extensions/amp-hulu/0.1/amp-hulu.js
  38:3  warning  Missing JSDoc @param "layout" declaration  jsdoc/require-param

✖ 1 problem (0 errors, 1 warning)

[19:46:53] WARNING: Found 0 error(s) and 1 warning(s).

After:

[19:46:37] INFO: Running lint on extensions/amp-hulu/0.1/amp-hulu.js
[19:46:38] SUCCESS: No linter warnings or errors.

This is ready for review.

@gajus
Copy link
Owner

gajus commented May 17, 2018

Thank you

gajus added a commit that referenced this pull request May 17, 2018
@rsimha
Copy link
Contributor Author

rsimha commented May 17, 2018

@gajus, thanks for the quick turnaround.

I was curious about 83ff68f. Did I miss updating any files?

@gajus
Copy link
Owner

gajus commented May 17, 2018

I was curious about 83ff68f. Did I miss updating any files?

The README.md document you've edited is generated using templates in:

https://github.com/gajus/eslint-plugin-jsdoc/tree/master/.README

Refer to https://github.com/gajus/gitdown for more information.

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

Successfully merging this pull request may close these issues.

2 participants