Fix eslint warnings: block and blockinstance
MAILPOET-6316
This commit is contained in:
committed by
Jan Lysý
parent
9686da2918
commit
f9458c2b7f
@ -1,5 +1,5 @@
|
|||||||
import { addFilter } from '@wordpress/hooks';
|
import { addFilter } from '@wordpress/hooks';
|
||||||
import { Block } from '@wordpress/blocks';
|
import { Block } from '@wordpress/blocks/index';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables Styles for button
|
* Disables Styles for button
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { addFilter } from '@wordpress/hooks';
|
import { addFilter } from '@wordpress/hooks';
|
||||||
import { Block } from '@wordpress/blocks';
|
import { Block } from '@wordpress/blocks/index';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switch layout to reduced flex email layout
|
* Switch layout to reduced flex email layout
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { addFilter } from '@wordpress/hooks';
|
import { addFilter } from '@wordpress/hooks';
|
||||||
import { Block } from '@wordpress/blocks';
|
import { Block } from '@wordpress/blocks/index';
|
||||||
|
|
||||||
function enhanceColumnBlock() {
|
function enhanceColumnBlock() {
|
||||||
addFilter(
|
addFilter(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { InspectorControls } from '@wordpress/block-editor';
|
import { InspectorControls } from '@wordpress/block-editor';
|
||||||
import { createHigherOrderComponent } from '@wordpress/compose';
|
import { createHigherOrderComponent } from '@wordpress/compose';
|
||||||
import { Block } from '@wordpress/blocks';
|
import { Block } from '@wordpress/blocks/index';
|
||||||
import { addFilter } from '@wordpress/hooks';
|
import { addFilter } from '@wordpress/hooks';
|
||||||
|
|
||||||
const columnsEditCallback = createHigherOrderComponent(
|
const columnsEditCallback = createHigherOrderComponent(
|
||||||
|
@ -2,7 +2,7 @@ import { addFilter } from '@wordpress/hooks';
|
|||||||
import {
|
import {
|
||||||
Block as WPBlock,
|
Block as WPBlock,
|
||||||
BlockSupports as WPBlockSupports,
|
BlockSupports as WPBlockSupports,
|
||||||
} from '@wordpress/blocks';
|
} from '@wordpress/blocks/index';
|
||||||
|
|
||||||
// Extend the BlockSupports type to include shadow
|
// Extend the BlockSupports type to include shadow
|
||||||
// The shadow is not included in WP6.4 but it is in WP6.5
|
// The shadow is not included in WP6.4 but it is in WP6.5
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { InspectorControls } from '@wordpress/block-editor';
|
import { InspectorControls } from '@wordpress/block-editor';
|
||||||
import { createHigherOrderComponent } from '@wordpress/compose';
|
import { createHigherOrderComponent } from '@wordpress/compose';
|
||||||
import { addFilter } from '@wordpress/hooks';
|
import { addFilter } from '@wordpress/hooks';
|
||||||
import { Block } from '@wordpress/blocks';
|
import { Block } from '@wordpress/blocks/index';
|
||||||
|
|
||||||
const imageEditCallback = createHigherOrderComponent(
|
const imageEditCallback = createHigherOrderComponent(
|
||||||
( BlockEdit ) =>
|
( BlockEdit ) =>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { addFilter } from '@wordpress/hooks';
|
import { addFilter } from '@wordpress/hooks';
|
||||||
import { Block } from '@wordpress/blocks';
|
import { Block } from '@wordpress/blocks/index';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import { useBlockProps } from '@wordpress/block-editor';
|
import { useBlockProps } from '@wordpress/block-editor';
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ import {
|
|||||||
parse,
|
parse,
|
||||||
// @ts-expect-error No types available for this yet.
|
// @ts-expect-error No types available for this yet.
|
||||||
__unstableSerializeAndClean, // eslint-disable-line
|
__unstableSerializeAndClean, // eslint-disable-line
|
||||||
BlockInstance,
|
|
||||||
} from '@wordpress/blocks';
|
} from '@wordpress/blocks';
|
||||||
|
import { BlockInstance } from '@wordpress/blocks/index';
|
||||||
import { addQueryArgs } from '@wordpress/url';
|
import { addQueryArgs } from '@wordpress/url';
|
||||||
import { storeName } from '../../store';
|
import { storeName } from '../../store';
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { BlockInstance, parse } from '@wordpress/blocks';
|
import { parse } from '@wordpress/blocks';
|
||||||
|
import { BlockInstance } from '@wordpress/blocks/index';
|
||||||
import { useSelect } from '@wordpress/data';
|
import { useSelect } from '@wordpress/data';
|
||||||
import { store as blockEditorStore } from '@wordpress/block-editor';
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
||||||
import { storeName, EmailTemplatePreview, TemplatePreview } from '../store';
|
import { storeName, EmailTemplatePreview, TemplatePreview } from '../store';
|
||||||
|
@ -8,7 +8,8 @@ import classnames from 'classnames';
|
|||||||
*/
|
*/
|
||||||
import { createHigherOrderComponent } from '@wordpress/compose';
|
import { createHigherOrderComponent } from '@wordpress/compose';
|
||||||
import { addFilter } from '@wordpress/hooks';
|
import { addFilter } from '@wordpress/hooks';
|
||||||
import { Block, getBlockSupport, hasBlockSupport } from '@wordpress/blocks';
|
import { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';
|
||||||
|
import { Block } from '@wordpress/blocks/index';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BlockControls,
|
BlockControls,
|
||||||
|
@ -3,7 +3,8 @@ import { store as coreDataStore } from '@wordpress/core-data';
|
|||||||
import { store as interfaceStore } from '@wordpress/interface';
|
import { store as interfaceStore } from '@wordpress/interface';
|
||||||
import { store as editorStore } from '@wordpress/editor';
|
import { store as editorStore } from '@wordpress/editor';
|
||||||
import { store as preferencesStore } from '@wordpress/preferences';
|
import { store as preferencesStore } from '@wordpress/preferences';
|
||||||
import { serialize, BlockInstance } from '@wordpress/blocks';
|
import { serialize } from '@wordpress/blocks';
|
||||||
|
import { BlockInstance } from '@wordpress/blocks/index';
|
||||||
import { storeName } from './constants';
|
import { storeName } from './constants';
|
||||||
import { State, Feature, EmailTemplate } from './types';
|
import { State, Feature, EmailTemplate } from './types';
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ export const createStore = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export interface EmailEditorStore {
|
export interface EmailEditorStore {
|
||||||
getActions(): EditorStoreConfig[ 'actions' ];
|
getActions: () => EditorStoreConfig[ 'actions' ];
|
||||||
getSelectors(): EditorStoreConfig[ 'selectors' ];
|
getSelectors: () => EditorStoreConfig[ 'selectors' ];
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@wordpress/data' {
|
declare module '@wordpress/data' {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { EditorSettings, EditorColor } from '@wordpress/block-editor';
|
import { EditorSettings, EditorColor } from '@wordpress/block-editor/index';
|
||||||
import { BlockInstance } from '@wordpress/blocks';
|
import { BlockInstance } from '@wordpress/blocks/index';
|
||||||
|
|
||||||
export enum SendingPreviewStatus {
|
export enum SendingPreviewStatus {
|
||||||
SUCCESS = 'success',
|
SUCCESS = 'success',
|
||||||
|
@ -119,14 +119,14 @@ declare module '@wordpress/notices' {
|
|||||||
) => void;
|
) => void;
|
||||||
};
|
};
|
||||||
selectors: {
|
selectors: {
|
||||||
getNotices( state: unknown, context?: string ): Notice[];
|
getNotices: ( state: unknown, context?: string ) => Notice[];
|
||||||
removeNotice( id: string, context?: string ): void;
|
removeNotice: ( id: string, context?: string ) => void;
|
||||||
};
|
};
|
||||||
} >;
|
} >;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@wordpress/core-data' {
|
declare module '@wordpress/core-data' {
|
||||||
import { BlockInstance } from '@wordpress/blocks';
|
import { BlockInstance } from '@wordpress/blocks/index';
|
||||||
|
|
||||||
export function useEntityBlockEditor(
|
export function useEntityBlockEditor(
|
||||||
kind: string,
|
kind: string,
|
||||||
|
Reference in New Issue
Block a user