Skip to content

Commit

Permalink
Fixup eslint-disable-next-line usages where the next has moved
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Apr 25, 2022
1 parent 2eae7d2 commit f4237c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Expand Up @@ -39,11 +39,12 @@ export default function useTemplatePartAreaLabel( clientId ) {
// Blocks can be loaded into a *non-post* block editor.
// This code is lifted from this file:
// packages/block-library/src/template-part/edit/advanced-controls.js
// eslint-disable-next-line @wordpress/data-no-store-string-literals
/* eslint-disable @wordpress/data-no-store-string-literals */
const definedAreas =
select(
'core/editor'
).__experimentalGetDefaultTemplatePartAreas();
/* eslint-enable @wordpress/data-no-store-string-literals */
const { getEditedEntityRecord } = select( coreStore );

for ( const templatePartClientId of parentTemplatePartClientIds ) {
Expand Down
Expand Up @@ -31,9 +31,10 @@ export function TemplatePartAdvancedControls( {
const { areaOptions } = useSelect( ( select ) => {
// FIXME: @wordpress/block-library should not depend on @wordpress/editor.
// Blocks can be loaded into a *non-post* block editor.
// eslint-disable-next-line @wordpress/data-no-store-string-literals
/* eslint-disable @wordpress/data-no-store-string-literals */
const definedAreas =
select( 'core/editor' ).__experimentalGetDefaultTemplatePartAreas();
/* eslint-enable @wordpress/data-no-store-string-literals */
return {
areaOptions: definedAreas.map( ( { label, area: _area } ) => ( {
label,
Expand Down
3 changes: 2 additions & 1 deletion packages/block-library/src/template-part/edit/utils/hooks.js
Expand Up @@ -143,11 +143,12 @@ export function useTemplatePartArea( area ) {
( select ) => {
// FIXME: @wordpress/block-library should not depend on @wordpress/editor.
// Blocks can be loaded into a *non-post* block editor.
// eslint-disable-next-line @wordpress/data-no-store-string-literals
/* eslint-disable @wordpress/data-no-store-string-literals */
const definedAreas =
select(
'core/editor'
).__experimentalGetDefaultTemplatePartAreas();
/* eslint-enable @wordpress/data-no-store-string-literals */

const selectedArea = find( definedAreas, { area } );
const defaultArea = find( definedAreas, { area: 'uncategorized' } );
Expand Down

0 comments on commit f4237c7

Please sign in to comment.