diff --git a/astro.config.ts b/astro.config.ts index 8ed199f4..e0e1c4fe 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -25,7 +25,7 @@ export default defineConfig({ }, }, vite: { - plugins: [tailwindcss() as any], + plugins: [tailwindcss()], optimizeDeps: { exclude: ["@resvg/resvg-js"], }, diff --git a/eslint.config.js b/eslint.config.js index e2579a93..6d49da6c 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -15,6 +15,24 @@ export default [ }, { rules: { "no-console": "error" } }, { files: ["scripts/**"], rules: { "no-console": "off" } }, + { + // Vendored third-party code (LibreSpeed: https://github.com/librespeed/speedtest/, + // GNU LGPLv3), copied as-is rather than authored in this project's style. + // These rules don't fit its dialect/conventions, so they're relaxed here + // instead of rewriting upstream logic: + // - no-console: the speed test intentionally logs progress/errors to the console. + // - no-unused-vars: `caughtErrors: "none"` allows the many `catch (e) {}` blocks + // that deliberately ignore the caught error (a common upstream pattern here). + // - no-unused-expressions: speedtest_worker.js uses a bare property access + // (`xhr[i].upload.onprogress;`) inside a try/catch purely for its side effect of + // throwing on unsupported browsers (IE11 feature detection), not as a mistake. + files: ["public/speedtest/**"], + rules: { + "no-console": "off", + "@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "none" }], + "@typescript-eslint/no-unused-expressions": "off", + }, + }, { ignores: [ "dist/**", diff --git a/src/components/Header.astro b/src/components/Header.astro index 3e139c47..1d10c7a9 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -3,7 +3,6 @@ import Hr from "./Hr.astro"; import IconX from "@/assets/icons/IconX.svg"; import IconMoon from "@/assets/icons/IconMoon.svg"; import IconSearch from "@/assets/icons/IconSearch.svg"; -import IconArchive from "@/assets/icons/IconArchive.svg"; import IconSunHigh from "@/assets/icons/IconSunHigh.svg"; import IconMenuDeep from "@/assets/icons/IconMenuDeep.svg"; import LinkButton from "./LinkButton.astro"; diff --git a/src/constants.ts b/src/constants.ts index b3d9fcbd..2ef78181 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -4,11 +4,9 @@ import IconInstagram from "@/assets/icons/instagram-brands.svg"; import IconLinkedin from "@/assets/icons/linkedin-brands.svg"; import IconTwitter from "@/assets/icons/x-twitter-brands.svg"; import IconMastodon from "@/assets/icons/mastodon-brands.svg"; -import IconBluesky from "@/assets/icons/bluesky-brands.svg"; import IconStackOverflow from "@/assets/icons/stack-overflow-brands.svg"; import IconYouTube from "@/assets/icons/youtube-brands.svg"; import IconSteam from "@/assets/icons/steam-brands.svg"; -import { SITE } from "@/config"; import type { GiscusProps } from "@giscus/react"; export const SOCIALS = [ diff --git a/src/layouts/PostDetails.astro b/src/layouts/PostDetails.astro index 17fa6b8c..8ddf9322 100644 --- a/src/layouts/PostDetails.astro +++ b/src/layouts/PostDetails.astro @@ -6,7 +6,6 @@ import Footer from "@/components/Footer.astro"; import Tag from "@/components/Tag.astro"; import Datetime from "@/components/Datetime.astro"; import EditPost from "@/components/EditPost.astro"; -import ShareLinks from "@/components/ShareLinks.astro"; import BackButton from "@/components/BackButton.astro"; import Comments from "@/components/Comments"; import { getPath } from "@/utils/getPath"; @@ -112,7 +111,7 @@ const nextPost =
- +