Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
christinaroise committed Aug 26, 2024
1 parent d2fdbb2 commit f4f13cc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions studioShared/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export const apiVersion =

export const dataset = assertValue(
process.env.NEXT_PUBLIC_SANITY_SHARED_DATASET,
"Missing environment variable: NEXT_PUBLIC_SANITY_SHARED_DATASET"
"Missing environment variable: NEXT_PUBLIC_SANITY_SHARED_DATASET",
);

export const projectId = assertValue(
process.env.NEXT_PUBLIC_SANITY_SHARED_PROJECT_ID,
"Missing environment variable: NEXT_PUBLIC_SANITY_SHARED_PROJECT_ID"
"Missing environment variable: NEXT_PUBLIC_SANITY_SHARED_PROJECT_ID",
);

export const useCdn = process.env.NODE_ENV === "production";
Expand Down
2 changes: 1 addition & 1 deletion studioShared/lib/fetchWithToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
export const fetchWithToken = async <T>(
query: string,
params?: Record<string, any>
params?: Record<string, any>,
): Promise<T> => {
const response = await fetch("/api/fetchData", {
method: "POST",
Expand Down
4 changes: 2 additions & 2 deletions studioShared/lib/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ if (!token) {
throw new Error(
`Missing SANITY_API_TOKEN for ${
process.env.NODE_ENV === "development" ? "development" : "production"
} environment`
} environment`,
);
}

experimental_taintUniqueValue(
"Do not pass the sanity API read token to the client.",
process,
token
token,
);
2 changes: 1 addition & 1 deletion studioShared/schemas/documents/blogPosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const blogPosts = defineType({
},
prepare({ title, date }) {
const subtitles = [date && format(parseISO(date), "LLL d, yyyy")].filter(
Boolean
Boolean,
);

return { title, subtitle: subtitles.join(" ") };
Expand Down

0 comments on commit f4f13cc

Please sign in to comment.