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

Add eslint rule for curly brace presence in JSX #62026

Merged
merged 7 commits into from
May 29, 2024
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
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ module.exports = {
'error',
{ props: 'never', children: 'never' },
],
'react/no-unescaped-entities': 'off',
'@wordpress/dependency-group': 'error',
'@wordpress/wp-global-usage': 'error',
'@wordpress/react-no-unsafe-timeout': 'error',
Expand Down
13 changes: 11 additions & 2 deletions packages/block-library/src/page-list/convert-to-links-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* WordPress dependencies
*/
import { Button, Modal } from '@wordpress/components';
import { useInstanceId } from '@wordpress/compose';
import { __ } from '@wordpress/i18n';

export const convertDescription = __(
Expand All @@ -15,10 +16,18 @@ export function ConvertToLinksModal( { onClick, onClose, disabled } ) {
title={ __( 'Edit Page List' ) }
className="wp-block-page-list-modal"
aria={ {
describedby: 'wp-block-page-list-modal__description',
describedby: useInstanceId(
ConvertToLinksModal,
'wp-block-page-list-modal__description'
),
DaniGuardiola marked this conversation as resolved.
Show resolved Hide resolved
} }
>
<p id="wp-block-page-list-modal__description">
<p
id={ useInstanceId(
ConvertToLinksModal,
'wp-block-page-list-modal__description'
) }
>
{ convertDescription }
</p>
<div className="wp-block-page-list-modal-buttons">
Expand Down
Loading