From 113b2d587a0747f79561c2b46169ec85f89b6897 Mon Sep 17 00:00:00 2001 From: Arghya Ghosh <71373838+uiuxarghya@users.noreply.github.com> Date: Sat, 2 Aug 2025 04:18:46 +0530 Subject: [PATCH 1/6] chore(dependencies): add `prettier` and `prettier-plugin-tailwindcss` for code formatting --- bun.lock | 6 ++++++ package.json | 3 +++ 2 files changed, 9 insertions(+) diff --git a/bun.lock b/bun.lock index 8408e2d0..67c7af9c 100644 --- a/bun.lock +++ b/bun.lock @@ -16,6 +16,8 @@ "motion": "^12.23.12", "next": "15.4.2", "ogl": "^1.0.11", + "prettier": "^3.6.2", + "prettier-plugin-tailwindcss": "^0.6.14", "react": "^19.1.0", "react-dom": "^19.1.0", "sharp": "^0.34.3", @@ -1099,6 +1101,10 @@ "prelude-ls": ["prelude-ls@1.2.1", "", {}, "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g=="], + "prettier": ["prettier@3.6.2", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ=="], + + "prettier-plugin-tailwindcss": ["prettier-plugin-tailwindcss@0.6.14", "", { "peerDependencies": { "@ianvs/prettier-plugin-sort-imports": "*", "@prettier/plugin-hermes": "*", "@prettier/plugin-oxc": "*", "@prettier/plugin-pug": "*", "@shopify/prettier-plugin-liquid": "*", "@trivago/prettier-plugin-sort-imports": "*", "@zackad/prettier-plugin-twig": "*", "prettier": "^3.0", "prettier-plugin-astro": "*", "prettier-plugin-css-order": "*", "prettier-plugin-import-sort": "*", "prettier-plugin-jsdoc": "*", "prettier-plugin-marko": "*", "prettier-plugin-multiline-arrays": "*", "prettier-plugin-organize-attributes": "*", "prettier-plugin-organize-imports": "*", "prettier-plugin-sort-imports": "*", "prettier-plugin-style-order": "*", "prettier-plugin-svelte": "*" }, "optionalPeers": ["@ianvs/prettier-plugin-sort-imports", "@prettier/plugin-hermes", "@prettier/plugin-oxc", "@prettier/plugin-pug", "@shopify/prettier-plugin-liquid", "@trivago/prettier-plugin-sort-imports", "@zackad/prettier-plugin-twig", "prettier-plugin-astro", "prettier-plugin-css-order", "prettier-plugin-import-sort", "prettier-plugin-jsdoc", "prettier-plugin-marko", "prettier-plugin-multiline-arrays", "prettier-plugin-organize-attributes", "prettier-plugin-organize-imports", "prettier-plugin-sort-imports", "prettier-plugin-style-order", "prettier-plugin-svelte"] }, "sha512-pi2e/+ZygeIqntN+vC573BcW5Cve8zUB0SSAGxqpB4f96boZF4M3phPVoOFCeypwkpRYdi7+jQ5YJJUwrkGUAg=="], + "prop-types": ["prop-types@15.8.1", "", { "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.13.1" } }, "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg=="], "property-information": ["property-information@7.1.0", "", {}, "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ=="], diff --git a/package.json b/package.json index 6c8cd85d..084401f0 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "build": "next build", "dev": "next dev --turbo", "start": "next start", + "format": "prettier {src,content}/**/*.{ts,tsx,mdx,css} --write", "postinstall": "fumadocs-mdx" }, "dependencies": { @@ -21,6 +22,8 @@ "motion": "^12.23.12", "next": "15.4.2", "ogl": "^1.0.11", + "prettier": "^3.6.2", + "prettier-plugin-tailwindcss": "^0.6.14", "react": "^19.1.0", "react-dom": "^19.1.0", "sharp": "^0.34.3", From 2b0280ccdf0aed6fa4c0818d5cc1b3a0fdbb9213 Mon Sep 17 00:00:00 2001 From: Arghya Ghosh <71373838+uiuxarghya@users.noreply.github.com> Date: Sat, 2 Aug 2025 04:18:58 +0530 Subject: [PATCH 2/6] chore: add .prettierrc configuration for code formatting --- .prettierrc | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..0fb25db6 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "tabWidth": 2, + "useTabs": false, + "plugins": ["prettier-plugin-tailwindcss"] +} From c04a4a7422df76cd587cf331b3c8b623e7a46ae3 Mon Sep 17 00:00:00 2001 From: Arghya Ghosh <71373838+uiuxarghya@users.noreply.github.com> Date: Sat, 2 Aug 2025 04:52:34 +0530 Subject: [PATCH 3/6] refactor: clean up imports and improve formatting in layout, particles, footer, icons, and button components --- src/app/docs/layout.tsx | 7 ++----- src/components/Particles.tsx | 20 +++++++++++++------- src/components/footer.tsx | 22 +++++++++++----------- src/components/icons.tsx | 20 ++++++++++++-------- src/components/ui/button.tsx | 2 +- 5 files changed, 39 insertions(+), 32 deletions(-) diff --git a/src/app/docs/layout.tsx b/src/app/docs/layout.tsx index ce2e9463..7fe91ff7 100644 --- a/src/app/docs/layout.tsx +++ b/src/app/docs/layout.tsx @@ -1,14 +1,11 @@ -import { DocsLayout, DocsLayoutProps } from "fumadocs-ui/layouts/notebook"; -import type { ReactNode } from "react"; import { baseOptions } from "@/app/layout.config"; import { source } from "@/lib/source"; +import { DocsLayout, DocsLayoutProps } from "fumadocs-ui/layouts/notebook"; +import type { ReactNode } from "react"; const docsLayoutOptions: DocsLayoutProps = { tree: source.pageTree, ...baseOptions, - themeSwitch: { - mode: "light-dark", - }, }; export default function Layout({ children }: { children: ReactNode }) { diff --git a/src/components/Particles.tsx b/src/components/Particles.tsx index 134aaa69..c59abf18 100644 --- a/src/components/Particles.tsx +++ b/src/components/Particles.tsx @@ -21,7 +21,10 @@ const defaultColors: string[] = ["#ffffff", "#ffffff", "#ffffff"]; const hexToRgb = (hex: string): [number, number, number] => { hex = hex.replace(/^#/, ""); if (hex.length === 3) { - hex = hex.split("").map((c) => c + c).join(""); + hex = hex + .split("") + .map((c) => c + c) + .join(""); } const int = parseInt(hex, 16); const r = ((int >> 16) & 255) / 255; @@ -142,7 +145,10 @@ const Particles: React.FC = ({ const positions = new Float32Array(count * 3); const randoms = new Float32Array(count * 4); const colors = new Float32Array(count * 3); - const palette = particleColors && particleColors.length > 0 ? particleColors : defaultColors; + const palette = + particleColors && particleColors.length > 0 + ? particleColors + : defaultColors; for (let i = 0; i < count; i++) { let x: number, y: number, z: number, len: number; @@ -154,7 +160,10 @@ const Particles: React.FC = ({ } while (len > 1 || len === 0); const r = Math.cbrt(Math.random()); positions.set([x * r, y * r, z * r], i * 3); - randoms.set([Math.random(), Math.random(), Math.random(), Math.random()], i * 4); + randoms.set( + [Math.random(), Math.random(), Math.random(), Math.random()], + i * 4, + ); const col = hexToRgb(palette[Math.floor(Math.random() * palette.length)]); colors.set(col, i * 3); } @@ -237,10 +246,7 @@ const Particles: React.FC = ({ ]); return ( -
+
); }; diff --git a/src/components/footer.tsx b/src/components/footer.tsx index 26d207f4..aaf66bb8 100644 --- a/src/components/footer.tsx +++ b/src/components/footer.tsx @@ -35,11 +35,11 @@ const footerNav = { export function Footer() { return ( -