From 321fa66338b1e2039a94b3d93a7ee530b962768f Mon Sep 17 00:00:00 2001 From: Atridad Lahiji Date: Tue, 20 May 2025 00:43:02 -0600 Subject: [PATCH] linter fixes --- astro.config.mjs | 8 ++++---- src/pages/index.astro | 14 ++++++++------ src/pages/posts.astro | 25 +++++++++++++++++-------- 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 026c857..d0b3fd6 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -24,10 +24,10 @@ export default defineConfig({ }, integrations: [preact(), mdx(), icon({ - include: { - mdi: ["clock", "tag", "arrow-right", "link", "email", "rss", "download", "web", "arrow-left"], - }, - }), + include: { + mdi: ["clock", "tag", "arrow-right", "link", "email", "rss", "download", "web", "arrow-left"], + }, + }), ], adapter: node({ diff --git a/src/pages/index.astro b/src/pages/index.astro index 30b6dd1..782428a 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,8 +1,8 @@ --- -import { Image } from 'astro:assets'; -import SocialLinks from '../components/SocialLinks.astro'; -import TechLinks from '../components/TechLinks.astro'; -import Layout from '../layouts/Layout.astro'; +import { Image } from "astro:assets"; +import SocialLinks from "../components/SocialLinks.astro"; +import TechLinks from "../components/TechLinks.astro"; +import Layout from "../layouts/Layout.astro"; --- @@ -13,11 +13,13 @@ import Layout from '../layouts/Layout.astro'; width={150} /> -

+

Atridad Lahiji

-

+

Researcher, Full-Stack Developer, and IT Professional.

diff --git a/src/pages/posts.astro b/src/pages/posts.astro index b83c432..516393e 100644 --- a/src/pages/posts.astro +++ b/src/pages/posts.astro @@ -8,23 +8,32 @@ const posts = await getCollection("posts"); // Sort posts by date, newest first const sortedPosts = posts.sort( - (a: CollectionEntry<"posts">, b: CollectionEntry<"posts">) => new Date(b.data.pubDate).valueOf() - new Date(a.data.pubDate).valueOf() + (a: CollectionEntry<"posts">, b: CollectionEntry<"posts">) => + new Date(b.data.pubDate).valueOf() - new Date(a.data.pubDate).valueOf(), ); ---
-

+

Posts

-
- {sortedPosts.map((post: CollectionEntry<"posts">) => ( +
+ {sortedPosts.map((post) => ( ))}
- - {sortedPosts.length === 0 && ( -

No posts available yet. Check back soon!

- )} + + { + sortedPosts.length === 0 && ( +

+ No posts available yet. Check back soon! +

+ ) + }