chore(deps): update dependency prettier to v2.8.2 (#311)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Lautzenheiser <lautzd@gmail.com>
This commit is contained in:
parent
d9ecbd9841
commit
704dfa96b2
@ -85,7 +85,7 @@
|
||||
"npm-run-all": "4.1.5",
|
||||
"postcss": "8.4.21",
|
||||
"postcss-scss": "4.0.6",
|
||||
"prettier": "2.8.1",
|
||||
"prettier": "2.8.2",
|
||||
"source-map-loader": "4.0.1",
|
||||
"style-loader": "3.3.1",
|
||||
"to-string-loader": "1.2.0",
|
||||
|
@ -243,7 +243,7 @@
|
||||
"npm-run-all": "4.1.5",
|
||||
"postcss": "8.4.21",
|
||||
"postcss-scss": "4.0.6",
|
||||
"prettier": "2.8.1",
|
||||
"prettier": "2.8.2",
|
||||
"process": "0.11.10",
|
||||
"react-refresh": "0.14.0",
|
||||
"react-svg-loader": "3.0.3",
|
||||
|
@ -11,7 +11,7 @@ const Languages = {
|
||||
JSON: 'json',
|
||||
} as const;
|
||||
|
||||
type Language = typeof Languages[keyof typeof Languages];
|
||||
type Language = (typeof Languages)[keyof typeof Languages];
|
||||
|
||||
export type Delimiter = string | [string, string];
|
||||
type Format = { language: Language; delimiters: Delimiter };
|
||||
|
@ -28,7 +28,7 @@ import type {
|
||||
} from '../interface';
|
||||
|
||||
export const allowedEvents = ['prePublish', 'postPublish', 'preSave', 'postSave'] as const;
|
||||
export type AllowedEvent = typeof allowedEvents[number];
|
||||
export type AllowedEvent = (typeof allowedEvents)[number];
|
||||
|
||||
const eventHandlers = allowedEvents.reduce((acc, e) => {
|
||||
acc[e] = [];
|
||||
|
@ -24,11 +24,11 @@ const formatters = {
|
||||
|
||||
function catchFormatErrors<T extends keyof typeof formatters>(
|
||||
format: T,
|
||||
formatter: typeof formatters[T],
|
||||
formatter: (typeof formatters)[T],
|
||||
) {
|
||||
return (res: Response) => {
|
||||
try {
|
||||
return formatter(res) as ReturnType<typeof formatters[T]>;
|
||||
return formatter(res) as ReturnType<(typeof formatters)[T]>;
|
||||
} catch (error: unknown) {
|
||||
if (error instanceof Error) {
|
||||
throw new Error(
|
||||
@ -62,8 +62,8 @@ interface ParseResponseOptions {
|
||||
export async function parseResponse<T extends keyof typeof responseFormatters = 'text'>(
|
||||
res: Response,
|
||||
{ expectingOk = true, format = 'text', apiName = '' }: ParseResponseOptions,
|
||||
): Promise<Awaited<ReturnType<typeof responseFormatters[T]>>> {
|
||||
let body: Awaited<ReturnType<typeof responseFormatters[T]>>;
|
||||
): Promise<Awaited<ReturnType<(typeof responseFormatters)[T]>>> {
|
||||
let body: Awaited<ReturnType<(typeof responseFormatters)[T]>>;
|
||||
try {
|
||||
const formatter = responseFormatters[format] ?? false;
|
||||
if (!formatter) {
|
||||
|
@ -178,90 +178,90 @@ export interface TextNodeStyles {
|
||||
export type TextNode = { text?: string | undefined } & TextNodeStyles;
|
||||
|
||||
export type CodeBlockNode = {
|
||||
type: typeof NodeTypes['code_block'];
|
||||
type: (typeof NodeTypes)['code_block'];
|
||||
lang: string | undefined;
|
||||
code: string;
|
||||
};
|
||||
|
||||
export type HeadingNode = {
|
||||
type:
|
||||
| typeof NodeTypes['heading'][1]
|
||||
| typeof NodeTypes['heading'][2]
|
||||
| typeof NodeTypes['heading'][3]
|
||||
| typeof NodeTypes['heading'][4]
|
||||
| typeof NodeTypes['heading'][5]
|
||||
| typeof NodeTypes['heading'][6];
|
||||
| (typeof NodeTypes)['heading'][1]
|
||||
| (typeof NodeTypes)['heading'][2]
|
||||
| (typeof NodeTypes)['heading'][3]
|
||||
| (typeof NodeTypes)['heading'][4]
|
||||
| (typeof NodeTypes)['heading'][5]
|
||||
| (typeof NodeTypes)['heading'][6];
|
||||
children: Array<DeserializedNode>;
|
||||
};
|
||||
|
||||
export type ListNode = {
|
||||
type: typeof NodeTypes['ol_list'] | typeof NodeTypes['ul_list'];
|
||||
type: (typeof NodeTypes)['ol_list'] | (typeof NodeTypes)['ul_list'];
|
||||
children: Array<DeserializedNode>;
|
||||
};
|
||||
|
||||
export type ListItemNode = {
|
||||
type: typeof NodeTypes['listItem'];
|
||||
type: (typeof NodeTypes)['listItem'];
|
||||
checked: boolean;
|
||||
children: Array<DeserializedNode>;
|
||||
};
|
||||
|
||||
export type ListItemContentNode = {
|
||||
type: typeof NodeTypes['listItemContent'];
|
||||
type: (typeof NodeTypes)['listItemContent'];
|
||||
children: Array<DeserializedNode>;
|
||||
};
|
||||
|
||||
export type ParagraphNode = {
|
||||
type: typeof NodeTypes['paragraph'];
|
||||
type: (typeof NodeTypes)['paragraph'];
|
||||
break?: true;
|
||||
children: Array<DeserializedNode>;
|
||||
};
|
||||
|
||||
export type LinkNode = {
|
||||
type: typeof NodeTypes['link'];
|
||||
type: (typeof NodeTypes)['link'];
|
||||
children: Array<DeserializedNode>;
|
||||
url: string | undefined;
|
||||
};
|
||||
|
||||
export type ImageNode = {
|
||||
type: typeof NodeTypes['image'];
|
||||
type: (typeof NodeTypes)['image'];
|
||||
children: Array<DeserializedNode>;
|
||||
url: string | undefined;
|
||||
alt: string | undefined;
|
||||
};
|
||||
|
||||
export type TableNode = {
|
||||
type: typeof NodeTypes['table'];
|
||||
type: (typeof NodeTypes)['table'];
|
||||
children: Array<TableRowNode>;
|
||||
};
|
||||
|
||||
export type TableRowNode = {
|
||||
type: typeof NodeTypes['tableRow'];
|
||||
type: (typeof NodeTypes)['tableRow'];
|
||||
children: Array<TableCellNode>;
|
||||
};
|
||||
|
||||
export type TableCellNode = {
|
||||
type: typeof NodeTypes['tableCell'];
|
||||
type: (typeof NodeTypes)['tableCell'];
|
||||
children: Array<DeserializedNode>;
|
||||
};
|
||||
|
||||
export type BlockQuoteNode = {
|
||||
type: typeof NodeTypes['block_quote'];
|
||||
type: (typeof NodeTypes)['block_quote'];
|
||||
children: Array<DeserializedNode>;
|
||||
};
|
||||
|
||||
export type InlineCodeMarkNode = {
|
||||
type: typeof NodeTypes['inline_code_mark'];
|
||||
type: (typeof NodeTypes)['inline_code_mark'];
|
||||
children: Array<TextNode>;
|
||||
language: string | undefined;
|
||||
};
|
||||
|
||||
export type ThematicBreakNode = {
|
||||
type: typeof NodeTypes['thematic_break'];
|
||||
type: (typeof NodeTypes)['thematic_break'];
|
||||
children: Array<DeserializedNode>;
|
||||
};
|
||||
|
||||
export type ItalicNode = {
|
||||
[K in typeof NodeTypes['emphasis_mark']]: true;
|
||||
[K in (typeof NodeTypes)['emphasis_mark']]: true;
|
||||
} & {
|
||||
children: TextNode;
|
||||
};
|
||||
@ -275,19 +275,19 @@ export type MarkNode =
|
||||
| InlineCodeNode;
|
||||
|
||||
export type SuperscriptNode = {
|
||||
[K in typeof NodeTypes['superscript_mark']]: true;
|
||||
[K in (typeof NodeTypes)['superscript_mark']]: true;
|
||||
} & {
|
||||
children: TextNode;
|
||||
};
|
||||
|
||||
export type SubscriptNode = {
|
||||
[K in typeof NodeTypes['subscript_mark']]: true;
|
||||
[K in (typeof NodeTypes)['subscript_mark']]: true;
|
||||
} & {
|
||||
children: TextNode;
|
||||
};
|
||||
|
||||
export type UnderlineNode = {
|
||||
[K in typeof NodeTypes['underline_mark']]: true;
|
||||
[K in (typeof NodeTypes)['underline_mark']]: true;
|
||||
} & {
|
||||
children: TextNode;
|
||||
};
|
||||
|
@ -52,7 +52,7 @@
|
||||
"eslint-plugin-babel": "5.3.1",
|
||||
"eslint-plugin-unicorn": "45.0.2",
|
||||
"npm-run-all": "4.1.5",
|
||||
"prettier": "2.8.1",
|
||||
"prettier": "2.8.2",
|
||||
"typescript": "4.9.4",
|
||||
"webpack": "5.75.0"
|
||||
},
|
||||
|
@ -12946,10 +12946,10 @@ prettier-linter-helpers@^1.0.0:
|
||||
dependencies:
|
||||
fast-diff "^1.1.2"
|
||||
|
||||
prettier@2.8.1:
|
||||
version "2.8.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc"
|
||||
integrity sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==
|
||||
prettier@2.8.2:
|
||||
version "2.8.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.2.tgz#c4ea1b5b454d7c4b59966db2e06ed7eec5dfd160"
|
||||
integrity sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==
|
||||
|
||||
pretty-bytes@^5.3.0, pretty-bytes@^5.4.1:
|
||||
version "5.6.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user