Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// eslint.config.js
import js from "@eslint/js";
import svelte from "eslint-plugin-svelte";
import { defineConfig } from "eslint/config";
import globals from "globals";
import ts from "typescript-eslint";
import svelteConfig from "./svelte.config.js";

export default ts.config(
export default defineConfig(
{
ignores: ["dist/", ".netlify", ".astro", ".vscode", "test-results"],
},
Expand Down
2 changes: 1 addition & 1 deletion netlify/edge-functions/check-theme.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Config, Context } from "@netlify/edge-functions";

export default async (request: Request, context: Context) => {
export default async (_: Request, context: Context) => {
const response = await context.next();

const contentType = response.headers.get("content-type");
Expand Down
5 changes: 2 additions & 3 deletions src/components/SchemaOrg/SchemaOrg.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
interface Props {
type: "webapplication" | "about";
url?: string;
}

const SITE_NAME = "Hebrew Transliteration App";
Expand All @@ -10,7 +9,7 @@ const SITE_URL = "https://hebrew-transliteration.app";
const description =
"Accurate Hebrew transliteration app for academic, religious, or personal needs, along with a suite of other tools for dealing with Hebrew texts.";

const { type, url = SITE_URL } = Astro.props;
const { type } = Astro.props;

const baseSchema = {
"@context": "https://schema.org",
Expand Down Expand Up @@ -64,4 +63,4 @@ const schema =
};
---

<script type="application/ld+json" set:html={JSON.stringify(schema)} />
<script is:inline type="application/ld+json" set:html={JSON.stringify(schema)} />
3 changes: 2 additions & 1 deletion src/layouts/MainLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const canonicalUrl = new URL(
<meta name="twitter:image" content={imageUrl} />
<meta name="twitter:image:alt" content="Hebrew Transliteration App" />
<meta http-equiv="Accept-CH" content="Sec-CH-Prefers-Color-Scheme" />
<script define:vars={{ gaId: import.meta.env.PUBLIC_GA_TAG_ID }}>
<script is:inline define:vars={{ gaId: import.meta.env.PUBLIC_GA_TAG_ID }}>
(function () {
if (!gaId) return;
window.dataLayer = window.dataLayer || [];
Expand All @@ -63,6 +63,7 @@ const canonicalUrl = new URL(
{
import.meta.env.PUBLIC_GA_TAG_ID && (
<script
is:inline
async
src={`https://www.googletagmanager.com/gtag/js?id=${import.meta.env.PUBLIC_GA_TAG_ID}`}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/schemaSerialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface SerializableSchemaFeature {
TRANSLITERATION: string | { __function: string };
}

export function serialize_value(key: string, value: unknown): unknown {
export function serialize_value(value: unknown): unknown {
if (typeof value === "function") {
return { __function: value.toString() };
}
Expand Down Expand Up @@ -57,7 +57,7 @@ export function serialize_object(obj: unknown): unknown {

const result: Record<string, unknown> = {};
for (const [key, value] of Object.entries(obj)) {
result[key] = serialize_value(key, serialize_object(value));
result[key] = serialize_value(serialize_object(value));
}
return result;
}
Expand Down