From dfe94b9e54d8530a2fb72e0cf835c82100a21d21 Mon Sep 17 00:00:00 2001 From: Jorge Date: Tue, 21 Jun 2022 11:44:48 +0100 Subject: [PATCH] linting --- ...tenberg-rest-block-patterns-controller.php | 18 ++++++++--------- .../components/start-page-options/index.js | 20 ++++++++----------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/lib/compat/wordpress-6.1/class-gutenberg-rest-block-patterns-controller.php b/lib/compat/wordpress-6.1/class-gutenberg-rest-block-patterns-controller.php index 98fbdd9d7d1d50..d58d2234165dbc 100644 --- a/lib/compat/wordpress-6.1/class-gutenberg-rest-block-patterns-controller.php +++ b/lib/compat/wordpress-6.1/class-gutenberg-rest-block-patterns-controller.php @@ -156,31 +156,31 @@ public function get_item_schema() { 'title' => 'block-pattern', 'type' => 'object', 'properties' => array( - 'name' => array( + 'name' => array( 'description' => __( 'The pattern name.' ), 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), - 'title' => array( + 'title' => array( 'description' => __( 'The pattern title, in human readable format.' ), 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), - 'description' => array( + 'description' => array( 'description' => __( 'The pattern detailed description.' ), 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), - 'viewport_width' => array( + 'viewport_width' => array( 'description' => __( 'The pattern viewport width for inserter preview.' ), 'type' => 'number', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), - 'block_types' => array( + 'block_types' => array( 'description' => __( 'Block types that the pattern is intended to be used with.' ), 'type' => 'array', 'readonly' => true, @@ -192,25 +192,25 @@ public function get_item_schema() { 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), - 'categories' => array( + 'categories' => array( 'description' => __( 'The pattern category slugs.' ), 'type' => 'array', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), - 'keywords' => array( + 'keywords' => array( 'description' => __( 'The pattern keywords.' ), 'type' => 'array', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), - 'content' => array( + 'content' => array( 'description' => __( 'The pattern content.' ), 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), - 'inserter' => array( + 'inserter' => array( 'description' => __( 'Determines whether the pattern is visible in inserter.' ), 'type' => 'boolean', 'readonly' => true, diff --git a/packages/edit-post/src/components/start-page-options/index.js b/packages/edit-post/src/components/start-page-options/index.js index 0f571beaabf568..b2b624c5cccd02 100644 --- a/packages/edit-post/src/components/start-page-options/index.js +++ b/packages/edit-post/src/components/start-page-options/index.js @@ -19,14 +19,12 @@ import { store as editPostStore } from '../../store'; function useStartPatterns() { const { blockPatterns, postType } = useSelect( ( select ) => { - const { __experimentalGetPatternsByBlockTypes } = select( - blockEditorStore - ); + const { __experimentalGetPatternsByBlockTypes } = + select( blockEditorStore ); const { getCurrentPostType } = select( editorStore ); return { - blockPatterns: __experimentalGetPatternsByBlockTypes( - 'core/post-content' - ), + blockPatterns: + __experimentalGetPatternsByBlockTypes( 'core/post-content' ), postType: getCurrentPostType(), }; }, [] ); @@ -77,12 +75,10 @@ export default function StartPageOptions() { ) { return false; } - const { getEditedPostContent, isEditedPostSaveable } = select( - editorStore - ); - const { isEditingTemplate, isFeatureActive } = select( - editPostStore - ); + const { getEditedPostContent, isEditedPostSaveable } = + select( editorStore ); + const { isEditingTemplate, isFeatureActive } = + select( editPostStore ); return ( ! isEditedPostSaveable() && '' === getEditedPostContent() &&