Skip to content

Commit 55dee54

Browse files
committed
fix lint errors
1 parent 5441f0d commit 55dee54

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

packages/content/src/plugins/sanity-image-url-transform.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const sanityImageUrlTransformSchema = z.object({
3535
.describe("Function to build the image URL"),
3636
});
3737

38-
3938
function tryImportSanityImage() {
4039
try {
4140
return import("@sanity/image-url");
@@ -47,7 +46,6 @@ function tryImportSanityImage() {
4746
}
4847
}
4948

50-
5149
export default function sanityImageUrlTransform(
5250
options: z.input<typeof sanityImageUrlTransformSchema>,
5351
) {
@@ -61,7 +59,6 @@ export default function sanityImageUrlTransform(
6159
name: "sanity-to-html",
6260
hooks: {
6361
async onContentFetchDone(ctx) {
64-
6562
const { default: imageUrlBuilder } = await tryImportSanityImage();
6663

6764
const builder = imageUrlBuilder(rest);

packages/content/src/plugins/sanity-to-html.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const sanityToHtmlSchema = z.object({
1111
keys: dataKeysSchema.optional(),
1212
});
1313

14-
1514
function tryImportPortableText() {
1615
try {
1716
return import("@portabletext/to-html");
@@ -23,15 +22,13 @@ function tryImportPortableText() {
2322
}
2423
}
2524

26-
2725
export default function sanityToHtml(options: z.input<typeof sanityToHtmlSchema>) {
2826
const { path, keys } = parsePluginConfig("sanityToHtml", sanityToHtmlSchema, options);
2927

3028
return defineContentPlugin({
3129
name: "sanity-to-html",
3230
hooks: {
3331
async onContentFetchDone(ctx) {
34-
3532
const { toHTML } = await tryImportPortableText();
3633

3734
let transformCount = 0;

packages/content/src/plugins/sanity-to-markdown.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { z } from "zod";
32
import { defineContentPlugin } from "../content-plugin-driver.js";
43
import { applyTransformToFiles, isBlockContent } from "../utils/content-transform-utils.js";
@@ -12,7 +11,6 @@ const sanityToMdSchema = z.object({
1211
keys: dataKeysSchema.optional(),
1312
});
1413

15-
1614
function tryImportBlockToMd() {
1715
try {
1816
// @ts-expect-error - no types from this lib
@@ -25,7 +23,6 @@ function tryImportBlockToMd() {
2523
}
2624
}
2725

28-
2926
export default function sanityToMd(options: z.input<typeof sanityToMdSchema>) {
3027
const { path, keys } = parsePluginConfig("sanityToMd", sanityToMdSchema, options);
3128

packages/content/src/plugins/sharp.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,16 @@ const sharpPluginSchema = z.object({
4545
concurrency: z.number().default(4).describe("The number of images to transform concurrently."),
4646
});
4747

48-
49-
5048
function tryImportSharp() {
5149
try {
5250
return import("sharp");
5351
} catch (e) {
54-
throw new Error(
55-
'Could not find peer dependency "sharp". Make sure you have installed it.',
56-
{ cause: e },
57-
);
52+
throw new Error('Could not find peer dependency "sharp". Make sure you have installed it.', {
53+
cause: e,
54+
});
5855
}
5956
}
6057

61-
6258
async function transformImage(
6359
sharpTransform: SharpType.Sharp,
6460
sourceImagePath: string,

0 commit comments

Comments
 (0)