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

JSDoc: Add missing params to fix new ESLint errors #22907

Closed
40 tasks done
ocean90 opened this issue Jun 4, 2020 · 1 comment · Fixed by #27879
Closed
40 tasks done

JSDoc: Add missing params to fix new ESLint errors #22907

ocean90 opened this issue Jun 4, 2020 · 1 comment · Fixed by #27879
Assignees
Labels
[Package] Block editor /packages/block-editor [Package] Block library /packages/block-library [Package] Blocks /packages/blocks [Package] Components /packages/components [Package] Core data /packages/core-data [Package] Edit Post /packages/edit-post [Package] Format library /packages/format-library [Package] Interface /packages/interface [Package] Rich text /packages/rich-text [Tool] E2E Test Utils /packages/e2e-test-utils [Tool] Env /packages/env [Type] Developer Documentation Documentation for developers [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.

Comments

@ocean90
Copy link
Member

ocean90 commented Jun 4, 2020

This is a follow-up for #22771 which introduced a new version of eslint-plugin-jsdoc. There are two rules which are more strict now:

  • jsdoc/require-param
  • jsdoc/check-param-name

The rules have been reduced to a warning for now with the intend to get them fixed asap since the errors are valid. #22794 is an example for an already fixed case.

Current result of npm run lint-js:

✖ 215 problems (0 errors, 215 warnings)
  0 errors and 129 warnings potentially fixable with the `--fix` option.

List of files with errors:


Hint from @gziolo:

I executed npm run lint-js -- --fix and it adds all those missing params but they miss types and description. Still, it seems like a good way to speed up process :)

@ocean90 ocean90 added [Type] Developer Documentation Documentation for developers [Package] Core data /packages/core-data [Package] Components /packages/components [Package] Blocks /packages/blocks [Package] Block library /packages/block-library [Package] Format library /packages/format-library [Package] Rich text /packages/rich-text [Package] Block editor /packages/block-editor [Tool] E2E Test Utils /packages/e2e-test-utils [Package] Edit Post /packages/edit-post [Tool] Env /packages/env [Package] Interface /packages/interface labels Jun 4, 2020
@youknowriad youknowriad added [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. Good First Issue An issue that's suitable for someone looking to contribute for the first time labels Jun 4, 2020
@gziolo
Copy link
Member

gziolo commented Dec 13, 2020

There are only two related warnings left and we can consider this PR done:

/Users/gziolo/Projects/gutenberg/bin/plugin/commands/performance.js
  182:0  warning  Expected @param names to be "branches, options". Got "options, branches"  jsdoc/check-param-names

/Users/gziolo/Projects/gutenberg/packages/block-editor/src/autocompleters/block.js
  32:0  warning  @param "props" does not match an existing function parameter  jsdoc/check-param-names

Amazing work everyone involved 👏🏻

@gziolo gziolo removed Good First Issue An issue that's suitable for someone looking to contribute for the first time [Status] In Progress Tracking issues with work in progress labels Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Package] Block library /packages/block-library [Package] Blocks /packages/blocks [Package] Components /packages/components [Package] Core data /packages/core-data [Package] Edit Post /packages/edit-post [Package] Format library /packages/format-library [Package] Interface /packages/interface [Package] Rich text /packages/rich-text [Tool] E2E Test Utils /packages/e2e-test-utils [Tool] Env /packages/env [Type] Developer Documentation Documentation for developers [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants