Skip to content

Commit 390eb4a

Browse files
chore(prettier): es5 setting for trailing comma
1 parent 8f5957f commit 390eb4a

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"singleQuote": false,
33
"semi": true,
4-
"trailingComma": "all",
4+
"trailingComma": "es5",
55
"proseWrap": "always"
66
}

lib/ast-to-solid.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Context = {
2424
type TransformLink = (
2525
href: string,
2626
children: ElementContent[],
27-
title?: string,
27+
title?: string
2828
) => string;
2929
type TransformImage = (src: string, alt: string, title?: string) => string;
3030
type TransformLinkTargetType =
@@ -37,7 +37,7 @@ type TransformLinkTargetType =
3737
type TransformLinkTarget = (
3838
href: string,
3939
children: ElementContent[],
40-
title?: string,
40+
title?: string
4141
) => TransformLinkTargetType | undefined;
4242

4343
type SolidMarkdownNames = keyof JSX.IntrinsicElements;
@@ -116,7 +116,7 @@ const tableElements = new Set(["table", "thead", "tbody", "tfoot", "tr"]);
116116

117117
export function childrenToSolid(
118118
context: Context,
119-
node: Element | Root,
119+
node: Element | Root
120120
): JSX.Element[] {
121121
const children: JSX.Element[] = [];
122122
let childIndex = -1;
@@ -156,7 +156,7 @@ function toSolid(
156156
context: Context,
157157
node: Element,
158158
index: number,
159-
parent: Element | Root,
159+
parent: Element | Root
160160
): JSX.Element {
161161
const options = context.options;
162162
const parentSchema = context.schema;
@@ -224,7 +224,7 @@ function toSolid(
224224
? options.linkTarget(
225225
String(properties.href || ""),
226226
node.children,
227-
typeof properties.title === "string" ? properties.title : undefined,
227+
typeof properties.title === "string" ? properties.title : undefined
228228
)
229229
: options.linkTarget;
230230
}
@@ -233,7 +233,7 @@ function toSolid(
233233
properties.href = options.transformLinkUri(
234234
String(properties.href || ""),
235235
node.children,
236-
typeof properties.title === "string" ? properties.title : undefined,
236+
typeof properties.title === "string" ? properties.title : undefined
237237
);
238238
}
239239

@@ -262,7 +262,7 @@ function toSolid(
262262
properties.src = options.transformImageUri(
263263
String(properties.src || ""),
264264
String(properties.alt || ""),
265-
typeof properties.title === "string" ? properties.title : undefined,
265+
typeof properties.title === "string" ? properties.title : undefined
266266
);
267267
}
268268

@@ -338,7 +338,7 @@ function getInputElement(node: Element | Root): Element | null {
338338

339339
function getElementsBeforeCount(
340340
parent: Element | Root,
341-
node?: Element,
341+
node?: Element
342342
): number {
343343
let index = -1;
344344
let count = 0;
@@ -355,7 +355,7 @@ function addProperty(
355355
props: Record<string, unknown>,
356356
prop: string,
357357
value: unknown,
358-
ctx: Context,
358+
ctx: Context
359359
) {
360360
const info = find(ctx.schema, prop);
361361
let result = value;
@@ -414,7 +414,7 @@ function flattenPosition(
414414
| {
415415
start: { line: null; column: null; offset: null };
416416
end: { line: null; column: null; offset: null };
417-
},
417+
}
418418
): string {
419419
return [
420420
pos.start.line,

lib/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const SolidMarkdown: Component<Partial<SolidMarkdownOptions>> = (opts) => {
5858
file.value = options.children;
5959
} else if (options.children !== undefined && options.children !== null) {
6060
console.warn(
61-
`[solid-markdown] Warning: please pass a string as \`children\` (not: \`${options.children}\`)`,
61+
`[solid-markdown] Warning: please pass a string as \`children\` (not: \`${options.children}\`)`
6262
);
6363
}
6464

lib/rehype-filter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { Plugin } from "unified";
66
type AllowElement = (
77
element: HElement,
88
index: number,
9-
parent: HElement | HRoot,
9+
parent: HElement | HRoot
1010
) => boolean | undefined;
1111

1212
export type Options = {
@@ -19,7 +19,7 @@ export type Options = {
1919
const rehypeFilter: Plugin<[Options], HRoot> = (options: Options) => {
2020
if (options.allowedElements && options.disallowedElements) {
2121
throw new TypeError(
22-
"Only one of `allowedElements` and `disallowedElements` should be defined",
22+
"Only one of `allowedElements` and `disallowedElements` should be defined"
2323
);
2424
}
2525

0 commit comments

Comments
 (0)