-
Notifications
You must be signed in to change notification settings - Fork 4.8k
JSDoc: Add missing params to fix new ESLint errors #22907
Copy link
Copy link
Closed
Labels
[Package] Block editor/packages/block-editor/packages/block-editor[Package] Block library/packages/block-library/packages/block-library[Package] Blocks/packages/blocks/packages/blocks[Package] Components/packages/components/packages/components[Package] Core data/packages/core-data/packages/core-data[Package] Edit Post/packages/edit-post/packages/edit-post[Package] Format library/packages/format-library/packages/format-library[Package] Interface/packages/interface/packages/interface[Package] Rich text/packages/rich-text/packages/rich-text[Tool] E2E Test Utils/packages/e2e-test-utils/packages/e2e-test-utils[Tool] Env/packages/env/packages/env[Type] Developer DocumentationDocumentation for developersDocumentation for developers[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Description
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:
- packages/block-editor/src/autocompleters/block.js Block Editor: Update createBlockCompleter for @param rules #22975
- packages/block-editor/src/components/block-navigation/tree.js Block Editor: JSDoc warnings fix #22976
- packages/block-editor/src/components/block-toolbar/utils.js Block Editor: JSDoc warnings fix #22976
- packages/block-editor/src/components/color-style-selector/index.js Block Editor: Add missing @param docs #22981
- packages/block-editor/src/components/inserter/index.native.js Block Editor: Add missing @param docs #22981
- packages/block-editor/src/components/writing-flow/index.js Block Editor: Add missing @param docs #22981
- packages/block-library/src/navigation/block-colors-selector.js Block Library: Add missing @param docs #22982
- packages/block-library/src/table/edit.js Block Library: Add missing @param docs #22982
- packages/block-library/src/table/state.js Block Library: Add missing @param docs #22982
- packages/blocks/src/api/registration.js Blocks: Add missing param docs for BlockContentProvider and registerBlockCollection() #22943
- packages/blocks/src/block-content-provider/index.js Blocks: Add missing param docs for BlockContentProvider and registerBlockCollection() #22943
- packages/components/src/menu-item/index.js Components: Add missing @param docs #22971
- packages/components/src/placeholder/index.js Components: Add missing @param docs #22971
- packages/components/src/range-control/utils.js Components: Add missing @param docs #22971
- packages/components/src/toolbar-group/index.js Components: Add missing @param docs #22971
- packages/components/src/toolbar/index.js Components: Add missing @param docs #22971
- packages/components/src/tree-grid/index.js Components: Add missing @param docs #22971
- packages/components/src/tree-grid/roving-tab-index.js Components: Add missing @param docs #22971
- packages/components/src/unit-control/unit-select-control.js Components: Add missing @param docs #22971
- packages/components/src/visually-hidden/index.js Components: Add missing @param docs #22971
- packages/core-data/src/actions.js Core Data: Add missing param doc for saveEntityRecord() #22966
- packages/e2e-test-utils/src/create-new-post.js E2E Test Utils: Add missing param docs for createNewPost() #22948
- packages/edit-post/src/components/block-settings-menu/plugin-block-settings-menu-item.js Edit Post: Add missing param docs for PluginBlockSettingsMenuItem and PluginPostStatusInfo. #22944
- packages/edit-post/src/components/sidebar/plugin-post-status-info/index.js Edit Post: Add missing param docs for PluginBlockSettingsMenuItem and PluginPostStatusInfo. #22944
- packages/env/lib/config.js Env: Remove unused options.hasTests param from JSDoc #22911
- packages/format-library/src/link/utils.js Format library: Remove unused options.text param from JSDoc for createLinkFormat() #22913
- packages/interface/src/store/reducer.js Interface: Add missing param docs for singleEnableItems() and multipleEnableItems() #22964
- packages/rich-text/src/component/boundary-style.js
- packages/rich-text/src/create.js
- packages/rich-text/src/get-active-formats.js
- packages/rich-text/src/get-active-object.js
- packages/rich-text/src/get-last-child-index.js
- packages/rich-text/src/get-line-index.js
- packages/rich-text/src/get-parent-line-index.js
- packages/rich-text/src/get-text-content.js
- packages/rich-text/src/indent-list-items.js
- packages/rich-text/src/is-collapsed.js
- packages/rich-text/src/is-empty.js
- packages/rich-text/src/replace.js
- packages/rich-text/src/to-dom.js
Hint from @gziolo:
I executed
npm run lint-js -- --fixand it adds all those missing params but they miss types and description. Still, it seems like a good way to speed up process :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Package] Block editor/packages/block-editor/packages/block-editor[Package] Block library/packages/block-library/packages/block-library[Package] Blocks/packages/blocks/packages/blocks[Package] Components/packages/components/packages/components[Package] Core data/packages/core-data/packages/core-data[Package] Edit Post/packages/edit-post/packages/edit-post[Package] Format library/packages/format-library/packages/format-library[Package] Interface/packages/interface/packages/interface[Package] Rich text/packages/rich-text/packages/rich-text[Tool] E2E Test Utils/packages/e2e-test-utils/packages/e2e-test-utils[Tool] Env/packages/env/packages/env[Type] Developer DocumentationDocumentation for developersDocumentation for developers[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Type
Fields
Give feedbackNo fields configured for issues without a type.