Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Jun 21, 2022
1 parent 17678a4 commit dfe94b9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
20 changes: 8 additions & 12 deletions packages/edit-post/src/components/start-page-options/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
};
}, [] );
Expand Down Expand Up @@ -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() &&
Expand Down

0 comments on commit dfe94b9

Please sign in to comment.