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

Upgrade eslint-plugin-jsdoc to latest version #24586

Merged
merged 3 commits into from
Aug 16, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 14 additions & 20 deletions package-lock.json

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

2 changes: 0 additions & 2 deletions packages/block-editor/src/components/link-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@ import { ViewerFill } from './viewer-slot';
* @property {string} title Human-readable label to show in user interface.
*/

/* eslint-disable jsdoc/valid-types */
/**
* Properties associated with a link control value, composed as a union of the
* default properties and any custom settings values.
*
* @typedef {WPLinkControlDefaultValue&WPLinkControlSettingsValue} WPLinkControlValue
*/
/* eslint-enable */

/** @typedef {(nextValue:WPLinkControlValue)=>void} WPLinkControlOnChangeProp */

Expand Down
2 changes: 0 additions & 2 deletions packages/element/src/raw-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
import { createElement } from './react';

// Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly.
/* eslint-disable jsdoc/valid-types */
/** @typedef {{children: string} & import('react').ComponentPropsWithoutRef<'div'>} RawHTMLProps */
/* eslint-enable jsdoc/valid-types */

/**
* Component used as equivalent of Fragment with unescaped HTML, in cases where
Expand Down
4 changes: 4 additions & 0 deletions packages/eslint-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Enhancements

- The bundled `eslint-plugin-jsdoc` dependency has been updated from requiring `^26.0.0` to requiring `^30.2.2`.

## 7.1.0-rc.0 (2020-06-24)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"babel-eslint": "^10.1.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-jsdoc": "^26.0.0",
"eslint-plugin-jsdoc": "^30.2.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.20.0",
Expand Down
2 changes: 0 additions & 2 deletions packages/icons/src/icon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
import { cloneElement } from '@wordpress/element';

// Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly.
/* eslint-disable jsdoc/valid-types */
/** @typedef {{icon: JSX.Element, size?: number} & import('react').ComponentPropsWithoutRef<'SVG'>} IconProps */
/* eslint-enable jsdoc/valid-types */

/**
* Return an SVG icon.
Expand Down
2 changes: 0 additions & 2 deletions packages/prettier-config/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
// Disable reason: The current JSDoc tooling does not yet understand TypeScript
// union types.

/* eslint-disable jsdoc/valid-types */
/** @type {PrettierOptions & WPPrettierOptions} */
/* eslint-enable jsdoc/valid-types */
const config = {
useTabs: true,
tabWidth: 4,
Expand Down
3 changes: 0 additions & 3 deletions packages/primitives/src/svg/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import classnames from 'classnames';
*/
import { createElement } from '@wordpress/element';

// Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly.
/* eslint-disable jsdoc/valid-types */
/** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */
/* eslint-enable jsdoc/valid-types */

/**
* @param {import('react').ComponentPropsWithoutRef<'circle'>} props
Expand Down
2 changes: 0 additions & 2 deletions packages/priority-queue/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,12 @@ export const createQueue = () => {

let isRunning = false;

/* eslint-disable jsdoc/valid-types */
/**
* Callback to process as much queue as time permits.
*
* @param {IdleDeadline|number} deadline Idle callback deadline object, or
* animation frame timestamp.
*/
/* eslint-enable */
const runWaitingList = ( deadline ) => {
const hasTimeRemaining =
typeof deadline === 'number'
Expand Down