Skip to content

Commit

Permalink
phpcs and npm lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mogmarsh committed Nov 30, 2023
1 parent 90b2fb0 commit b55e011
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
6 changes: 2 additions & 4 deletions blocks/post-byline/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-disable camelcase */
import { usePostById } from '@alleyinteractive/block-editor-tools';
import { __ } from '@wordpress/i18n';
import { RichText } from '@wordpress/block-editor';
import { useBlockProps } from '@wordpress/block-editor';
import { RichText, useBlockProps } from '@wordpress/block-editor';
import { WP_REST_API_Post } from 'wp-types';

import './index.scss';
Expand Down Expand Up @@ -45,9 +44,8 @@ export default function Edit({

postByline = overrideByline || postByline;


return (
<p {...useBlockProps({className: 'post__byline' })}>
<p {...useBlockProps({ className: 'post__byline' })}>
<RichText
value={postByline}
tagName="span"
Expand Down
3 changes: 2 additions & 1 deletion blocks/post-byline/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
* @package wp-newsletter-builder
*/

use function WP_Newsletter_Builder\get_byline;

$wp_newsletter_builder_block_post = $block->context['postId'] ?? null;
Expand All @@ -25,4 +26,4 @@
$wp_newsletter_builder_byline
);
?>
</p>
</p>
5 changes: 2 additions & 3 deletions blocks/post-excerpt/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-disable camelcase */
import { usePostById } from '@alleyinteractive/block-editor-tools';
import { __ } from '@wordpress/i18n';
import { RichText } from '@wordpress/block-editor';
import { useBlockProps } from '@wordpress/block-editor';
import { RichText, useBlockProps } from '@wordpress/block-editor';
import { WP_REST_API_Post } from 'wp-types';

import './index.scss';
Expand Down Expand Up @@ -43,7 +42,7 @@ export default function Edit({
postExcerpt = overrideExcerpt || postExcerpt;

return (
<div {...useBlockProps({className: 'post__dek' })}>
<div {...useBlockProps({ className: 'post__dek' })}>
<RichText
value={postExcerpt}
tagName="p"
Expand Down
5 changes: 2 additions & 3 deletions blocks/post-title/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-disable camelcase */
import { usePostById } from '@alleyinteractive/block-editor-tools';
import { __ } from '@wordpress/i18n';
import { RichText } from '@wordpress/block-editor';
import { useBlockProps } from '@wordpress/block-editor';
import { RichText, useBlockProps } from '@wordpress/block-editor';
import { WP_REST_API_Post } from 'wp-types';

import './index.scss';
Expand Down Expand Up @@ -46,7 +45,7 @@ export default function Edit({
const titleClass = smallerFont ? 'post__title--small' : '';

return (
<h2 {...useBlockProps({className: titleClass })}>
<h2 {...useBlockProps({ className: titleClass })}>
<RichText
value={postTitle}
tagName="span"
Expand Down

0 comments on commit b55e011

Please sign in to comment.