Skip to content

Commit 94d541c

Browse files
committed
Remove codeblocksettings interface
1 parent 6b1f0a8 commit 94d541c

File tree

1 file changed

+3
-85
lines changed
  • projects/packages/jetpack-mu-wpcom/src/features/wpcom-blocks/code/block-definition

1 file changed

+3
-85
lines changed

projects/packages/jetpack-mu-wpcom/src/features/wpcom-blocks/code/block-definition/block-definition.tsx

Lines changed: 3 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -72,92 +72,10 @@ const selectLanguageOptions: ReadonlyArray< {
7272
* Filter to enhance the core code block.
7373
*
7474
* @param settings - Block settings
75-
* @return Settings.
75+
* @return Modified settings.
7676
*/
77-
78-
interface CodeBlockSettings {
79-
name: string;
80-
icon?: React.JSX.Element;
81-
keywords?: [];
82-
attributes: {
83-
content: {
84-
type: string;
85-
source: string;
86-
selector: string;
87-
__unstablePreserveWhiteSpace: boolean;
88-
};
89-
lock: {
90-
type: string;
91-
};
92-
metadata: {
93-
type: string;
94-
};
95-
align: {
96-
type: string;
97-
enum: string[];
98-
};
99-
className: {
100-
type: string;
101-
};
102-
style: {
103-
type: string;
104-
};
105-
backgroundColor: {
106-
type: string;
107-
};
108-
textColor: {
109-
type: string;
110-
};
111-
gradient: {
112-
type: string;
113-
};
114-
fontSize: {
115-
type: string;
116-
};
117-
fontFamily: {
118-
type: string;
119-
};
120-
borderColor: {
121-
type: string;
122-
};
123-
anchor: {
124-
type: string;
125-
source: string;
126-
attribute: string;
127-
selector: string;
128-
};
129-
blockCommentId: {
130-
type: string;
131-
};
132-
};
133-
supports: {};
134-
apiVersion?: number;
135-
title?: string;
136-
description?: string | React.JSX.Element;
137-
category?: string;
138-
variations?: [];
139-
example?: {
140-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
141-
attributes?: any;
142-
};
143-
transforms?: {
144-
from?: any[];
145-
to?: any[];
146-
};
147-
148-
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
149-
edit: Function;
150-
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
151-
save: Function;
152-
}
153-
154-
/**
155-
* Enhance the core code block.
156-
*
157-
* @param settings - Block settings.
158-
* @return Enhanced block settings.
159-
*/
160-
function filterBlockRegistration( settings: CodeBlockSettings ) {
77+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- No good interface available for this type now.
78+
function filterBlockRegistration( settings: any ) {
16179
// Our transform is better than the transform provided by syntaxhighlighter/code.
16280
// Remove thier transform.
16381
if ( false && settings.name === 'syntaxhighlighter/code' ) {

0 commit comments

Comments
 (0)