Skip to content

Commit

Permalink
ESLint Plugin: Bring JSDoc plugin to the latest version (#53629)
Browse files Browse the repository at this point in the history
* ESLint Plugin: Bring JSDoc plugin to the latest version

* Add CHANGELOG entry
  • Loading branch information
gziolo committed Aug 15, 2023
1 parent b04b4ae commit c083f70
Show file tree
Hide file tree
Showing 17 changed files with 128 additions and 64 deletions.
157 changes: 109 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export default memo( BlockPreview );
* @param {Object} options.props Optional. Props to pass to the element. Must contain
* the ref if one is defined.
* @param {Object} options.layout Layout settings to be used in the preview.
*
*/
export function useBlockPreview( { blocks, props = {}, layout } ) {
const originalSettings = useSelect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ function flattenTree( input = {}, prefix, token ) {
*
* @param {string} styleVariationSelector The style variation selector.
* @return {string} Combined selector string.
*
*/
function concatFeatureVariationSelectorString(
featureSelector,
Expand Down
1 change: 0 additions & 1 deletion packages/block-editor/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,6 @@ export function __unstableSetTemporarilyEditingAsBlocks(
* the report url for the media item. It accepts the `InserterMediaItem` as an argument.
* @property {boolean} [isExternalResource] If the media category is an external resource, this should be set to true.
* This is used to avoid making a request to the external resource when the user
*
*/
export const registerInserterMediaCategory =
( category ) =>
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export const coreBlocks = [
* Function to register a block variations e.g. social icons different types.
*
* @param {Object} block The block which variations will be registered.
*
*/
const registerBlockVariations = ( block ) => {
const { metadata, settings, name } = block;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { safeDecodeURI } from '@wordpress/url';
* @param {Object} updatedValue New block attributes to update.
* @param {Function} setAttributes Block attribute update function.
* @param {WPNavigationLinkBlockAttributes} blockAttributes Current block attributes.
*
*/

export const updateAttributes = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { useState, useCallback } from '@wordpress/element';
* );
* };
* ```
*
*/
const useResizeObserver = () => {
const [ measurements, setMeasurements ] = useState( null );
Expand Down
1 change: 0 additions & 1 deletion packages/data/src/plugins/persistence/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { combineReducers } from '../../';
* at least implement `getItem` and `setItem` of
* the Web Storage API.
* @property {string} storageKey Key on which to set in persistent storage.
*
*/

/**
Expand Down
1 change: 0 additions & 1 deletion packages/e2e-test-utils/src/set-option.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { pressKeyWithModifier } from './press-key-with-modifier';
* @param {string} value The value to set the option to.
*
* @return {string} The previous value of the option.
*
*/
export async function setOption( setting, value ) {
await switchUserToAdmin();
Expand Down
1 change: 0 additions & 1 deletion packages/edit-widgets/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export function reinitializeEditor() {
* Function to register an individual block.
*
* @param {Object} block The block to be registered.
*
*/
const registerBlock = ( block ) => {
if ( ! block ) {
Expand Down
8 changes: 8 additions & 0 deletions packages/eslint-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## Unreleased

### Breaking Changes

- The bundled `eslint-plugin-jsdoc` dependency has been updated from requiring ^39.6.9 to requiring ^46.4.6 ([#53629](https://github.com/WordPress/gutenberg/pull/53629)):
- Removes `jsdoc/newline-after-description` rule in favor of `jsdoc/tag-lines` with option `startLines: 0` for "never" and `startLines: 1` for "always". Defaults now to `startLines: null`.
- Removes `dropEndLines: true` from `jsdoc/tag-lines` in favor of option `endLines: 0`.
- Drops `jsdoc/tag-lines` rule's `noEndLines: true` in favor of `applyToEndTag: false`.
- Disables the newly introduced `jsdoc/no-defaults` rule.

### Enhancement

- Support Typescript 5 and 5.1 by updating both `@typescript-eslint/parser` and `@typescript-eslint/eslint-plugin` to version `^5.62.0`. ([#52621](https://github.com/WordPress/gutenberg/pull/52621)).
Expand Down

0 comments on commit c083f70

Please sign in to comment.