Skip to content

Commit

Permalink
npm lint cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mogmarsh committed Nov 29, 2023
1 parent 66c5454 commit 532ce3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 41 deletions.
26 changes: 3 additions & 23 deletions blocks/post-featured-image/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
/**
* Retrieves the translation of text.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/
*/
/* eslint-disable camelcase */
import { usePostById, useMedia, ImagePicker } from '@alleyinteractive/block-editor-tools';

import {
PanelBody,
PanelRow,
} from '@wordpress/components';
import { PanelBody, PanelRow } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
*/
import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
import { WP_REST_API_Post, WP_REST_API_Attachment } from 'wp-types';

/**
* Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
* Those files can contain any CSS code that gets applied to the editor.
*
* @see https://www.npmjs.com/package/@wordpress/scripts#using-css
*/
import './index.scss';

interface EditProps {
Expand Down Expand Up @@ -61,7 +41,7 @@ export default function Edit({

featuredMediaId = overrideImage || featuredMediaId;

const media = featuredMediaId ? useMedia(featuredMediaId) as any as WP_REST_API_Attachment : null;
const media = useMedia(featuredMediaId) as any as WP_REST_API_Attachment;

const postImage = media ? media.source_url : '';

Expand Down
19 changes: 1 addition & 18 deletions blocks/post-title/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
/**
* Retrieves the translation of text.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/
*/
/* eslint-disable camelcase */
import { usePostById } from '@alleyinteractive/block-editor-tools';
import { __ } from '@wordpress/i18n';

/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
*/
import { RichText } from '@wordpress/block-editor';
import { WP_REST_API_Post } from 'wp-types';

/**
* Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
* Those files can contain any CSS code that gets applied to the editor.
*
* @see https://www.npmjs.com/package/@wordpress/scripts#using-css
*/
import './index.scss';

interface EditProps {
Expand Down
1 change: 1 addition & 0 deletions blocks/signup-form-list/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export default function Edit({
/>
</>
) : (
/* @ts-ignore */
<MediaPlaceholder
icon="format-image"
labels={{
Expand Down

0 comments on commit 532ce3c

Please sign in to comment.