From 66aee16bc7ae256f7af42b986e3299d87efe5fc0 Mon Sep 17 00:00:00 2001 From: aamoghS Date: Tue, 20 Jan 2026 18:02:02 -0500 Subject: [PATCH 1/8] typescript --- sites/mainweb/eslint.config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sites/mainweb/eslint.config.js b/sites/mainweb/eslint.config.js index 0879d2b..e8b1e51 100644 --- a/sites/mainweb/eslint.config.js +++ b/sites/mainweb/eslint.config.js @@ -1,4 +1,5 @@ +import baseConfig from "@query/eslint-config/base"; import nextJsConfig from "@query/eslint-config/next-js"; -/** @type {import("eslint").Linter.Config} */ -export default nextJsConfig; +/** @type {import("eslint").Linter.Config[]} */ +export default [baseConfig, ...nextJsConfig]; From 27855c501f8c99e67378c3a0af14ca0e8b28cca5 Mon Sep 17 00:00:00 2001 From: aamoghS Date: Tue, 20 Jan 2026 18:03:13 -0500 Subject: [PATCH 2/8] some more eslint --- sites/mainweb/eslint.config.js | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/sites/mainweb/eslint.config.js b/sites/mainweb/eslint.config.js index e8b1e51..9ef5dfb 100644 --- a/sites/mainweb/eslint.config.js +++ b/sites/mainweb/eslint.config.js @@ -1,5 +1,31 @@ -import baseConfig from "@query/eslint-config/base"; -import nextJsConfig from "@query/eslint-config/next-js"; +import tseslint from "typescript-eslint"; +import nextPlugin from "@next/eslint-plugin-next"; /** @type {import("eslint").Linter.Config[]} */ -export default [baseConfig, ...nextJsConfig]; +export default tseslint.config( + { + ignores: [".next/**", "node_modules/**", "out/**"], + }, + { + files: ["**/*.ts", "**/*.tsx"], + languageOptions: { + parser: tseslint.parser, + parserOptions: { + projectService: true, + }, + }, + plugins: { + "@typescript-eslint": tseslint.plugin, + "@next/next": nextPlugin, + }, + rules: { + ...nextPlugin.configs.recommended.rules, + ...nextPlugin.configs["core-web-vitals"].rules, + "@next/next/no-duplicate-head": "off", + "@typescript-eslint/no-unused-vars": [ + "warn", + { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, + ], + }, + } +); From 3e912f9d4efc657dd51c226473540c145d0ee0d4 Mon Sep 17 00:00:00 2001 From: aamoghS Date: Tue, 20 Jan 2026 18:07:38 -0500 Subject: [PATCH 3/8] cleaning up --- pnpm-lock.yaml | 21 +++++++++++++++++++ sites/mainweb/components/Card/index.tsx | 14 ++++++------- sites/mainweb/components/InputField/index.tsx | 10 ++++----- sites/mainweb/components/Navbar/index.tsx | 6 ++---- sites/mainweb/components/Section/index.tsx | 8 +++---- sites/mainweb/components/SmallHero/index.tsx | 10 ++++----- sites/mainweb/components/TeamCard/index.tsx | 10 ++++----- sites/mainweb/package.json | 3 ++- 8 files changed, 46 insertions(+), 36 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8d2239f..9230657 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -346,6 +346,9 @@ importers: typescript: specifier: 5.9.3 version: 5.9.3 + typescript-eslint: + specifier: ^8.53.1 + version: 8.53.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) sites/portal: dependencies: @@ -4151,6 +4154,13 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} + typescript-eslint@8.53.1: + resolution: {integrity: sha512-gB+EVQfP5RDElh9ittfXlhZJdjSU4jUSTyE2+ia8CYyNvet4ElfaLlAIqDvQV9JPknKx0jQH1racTYe/4LaLSg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} @@ -7893,6 +7903,17 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 + typescript-eslint@8.53.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.53.1(@typescript-eslint/parser@8.53.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.53.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.53.1(typescript@5.9.3) + '@typescript-eslint/utils': 8.53.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + eslint: 9.39.2(jiti@2.6.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + typescript@5.9.3: {} uglify-js@3.19.3: diff --git a/sites/mainweb/components/Card/index.tsx b/sites/mainweb/components/Card/index.tsx index f9024b7..b2d52d5 100644 --- a/sites/mainweb/components/Card/index.tsx +++ b/sites/mainweb/components/Card/index.tsx @@ -1,18 +1,18 @@ "use client"; -import React, { useState } from "react"; +import { useState, ReactNode } from "react"; import Image, { StaticImageData } from "next/image"; interface CardProps { - img?: string | StaticImageData; // <-- allow StaticImageData - imgClassName?: string; // optional class to customize image styling (e.g. filters) + img?: string | StaticImageData; + imgClassName?: string; heading?: string; linkUrl?: string; - children?: React.ReactNode; + children?: ReactNode; className?: string; } -const Card: React.FC = ({ img, imgClassName = "", heading, linkUrl, children, className = "" }) => { +export default function Card({ img, imgClassName = "", heading, linkUrl, children, className = "" }: CardProps) { const [imgError, setImgError] = useState(false); // Compute initials from heading to use in the fallback placeholder @@ -89,6 +89,4 @@ const Card: React.FC = ({ img, imgClassName = "", heading, linkUrl, c ); -}; - -export default Card; +} diff --git a/sites/mainweb/components/InputField/index.tsx b/sites/mainweb/components/InputField/index.tsx index 0ee7fca..2b41946 100644 --- a/sites/mainweb/components/InputField/index.tsx +++ b/sites/mainweb/components/InputField/index.tsx @@ -1,6 +1,6 @@ "use client"; -import React from "react"; +import { ChangeEvent } from "react"; interface InputFieldProps { width?: string | number; @@ -10,14 +10,14 @@ interface InputFieldProps { validIndication?: boolean; type?: "text" | "email" | "password" | "submit" | "textarea"; required?: boolean; - onChange?: (e: React.ChangeEvent) => void; + onChange?: (e: ChangeEvent) => void; pattern?: string; originalValue?: string; onClick?: () => void; helperText?: string; } -const InputField: React.FC = ({ +export default function InputField({ width = "300px", placeholder = "", name, @@ -99,6 +99,4 @@ const InputField: React.FC = ({ ); -}; - -export default InputField; +}: InputFieldProps) { diff --git a/sites/mainweb/components/Navbar/index.tsx b/sites/mainweb/components/Navbar/index.tsx index 342c986..1d8a5f4 100644 --- a/sites/mainweb/components/Navbar/index.tsx +++ b/sites/mainweb/components/Navbar/index.tsx @@ -12,7 +12,7 @@ interface NavbarProps { className?: string; } -const Navbar: React.FC = ({ screen_width, page, className = "" }) => { +export default function Navbar({ screen_width, page, className = "" }: NavbarProps) { const [windowWidth, setWindowWidth] = useState(0); const WIDTH_THRESHOLD = 1000; const [menuOpen, setMenuOpen] = useState(false); @@ -155,6 +155,4 @@ const Navbar: React.FC = ({ screen_width, page, className = "" }) = ); -}; - -export default Navbar; \ No newline at end of file +} \ No newline at end of file diff --git a/sites/mainweb/components/Section/index.tsx b/sites/mainweb/components/Section/index.tsx index d922358..e1fc95e 100644 --- a/sites/mainweb/components/Section/index.tsx +++ b/sites/mainweb/components/Section/index.tsx @@ -1,11 +1,11 @@ -import React, { ReactNode, HTMLAttributes } from "react"; +import { ReactNode, HTMLAttributes } from "react"; interface SectionProps extends HTMLAttributes { children: ReactNode; makefull?: boolean; } -const Section: React.FC = ({ children, makefull = false, ...rest }) => { +export default function Section({ children, makefull = false, ...rest }: SectionProps) { return (
= ({ children, makefull = false, ...rest } {children}
); -}; - -export default Section; \ No newline at end of file +} \ No newline at end of file diff --git a/sites/mainweb/components/SmallHero/index.tsx b/sites/mainweb/components/SmallHero/index.tsx index 58ffcf8..58a7401 100644 --- a/sites/mainweb/components/SmallHero/index.tsx +++ b/sites/mainweb/components/SmallHero/index.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode, HTMLAttributes } from "react"; +import { ReactNode, HTMLAttributes } from "react"; interface SmallHeroProps extends HTMLAttributes { title: string; @@ -7,12 +7,12 @@ interface SmallHeroProps extends HTMLAttributes { children?: ReactNode; } -const SmallHero: React.FC = ({ +export default function SmallHero({ title, desc, description, ...rest -}) => { +}: SmallHeroProps) { const text = desc || description; return ( @@ -44,6 +44,4 @@ const SmallHero: React.FC = ({ ); -}; - -export default SmallHero; +} diff --git a/sites/mainweb/components/TeamCard/index.tsx b/sites/mainweb/components/TeamCard/index.tsx index f85f87d..d132d4f 100644 --- a/sites/mainweb/components/TeamCard/index.tsx +++ b/sites/mainweb/components/TeamCard/index.tsx @@ -1,6 +1,6 @@ "use client"; -import React, { ReactNode, HTMLAttributes } from "react"; +import { ReactNode, HTMLAttributes } from "react"; import Image, { StaticImageData } from "next/image"; interface TeamCardProps extends HTMLAttributes { @@ -11,14 +11,14 @@ interface TeamCardProps extends HTMLAttributes { children?: ReactNode; } -const TeamCard: React.FC = ({ +export default function TeamCard({ img, name, title, zoom, children, ...rest -}) => { +}: TeamCardProps) { return (
= ({
); -}; - -export default TeamCard; \ No newline at end of file +} \ No newline at end of file diff --git a/sites/mainweb/package.json b/sites/mainweb/package.json index ad26505..e02fdf7 100644 --- a/sites/mainweb/package.json +++ b/sites/mainweb/package.json @@ -42,6 +42,7 @@ "postcss": "^8.5.3", "tailwindcss": "^4.1.5", "turbo": "^2.6.3", - "typescript": "5.9.3" + "typescript": "5.9.3", + "typescript-eslint": "^8.53.1" } } From 5582d0194fc67c876d9cb0416324873011914f05 Mon Sep 17 00:00:00 2001 From: aamoghS Date: Tue, 20 Jan 2026 18:13:56 -0500 Subject: [PATCH 4/8] more clean --- packages/ui/package.json | 6 +++--- pnpm-lock.yaml | 6 +++--- sites/mainweb/app/projects/page.tsx | 6 ++---- sites/mainweb/app/tbd/page.tsx | 6 ++---- .../components/InlineRadioInput/index.tsx | 12 +++++------- sites/mainweb/components/InputField/index.tsx | 4 ++-- sites/mainweb/components/Text/Major/index.tsx | 18 ++++++++---------- sites/mainweb/components/Text/Mini/index.tsx | 12 +++++------- sites/mainweb/components/Text/Minor/index.tsx | 14 ++++++-------- sites/mainweb/tsconfig.json | 2 +- 10 files changed, 37 insertions(+), 49 deletions(-) diff --git a/packages/ui/package.json b/packages/ui/package.json index 211031d..1d8ab04 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -22,7 +22,7 @@ "lint": "eslint src --max-warnings 0" }, "peerDependencies": { - "react": "^18.3.1" + "react": "^18.3.1 || ^19.0.0" }, "devDependencies": { "@next/eslint-plugin-next": "^16.0.8", @@ -31,13 +31,13 @@ "@query/tsconfig": "workspace:*", "@tailwindcss/cli": "^4.1.5", "@types/minimatch": "^6.0.0", - "@types/react": "^18.3.11", + "@types/react": "^19.0.0", "eslint": "^9.33.0", "tailwindcss": "^4.1.5", "typescript": "^5.6.3" }, "dependencies": { "minimatch": "^10.1.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1 || ^19.0.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9230657..42f3669 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -244,8 +244,8 @@ importers: specifier: ^6.0.0 version: 6.0.0 '@types/react': - specifier: ^18.3.11 - version: 18.3.27 + specifier: ^19.0.0 + version: 19.2.9 eslint: specifier: ^9.33.0 version: 9.39.2(jiti@2.6.1) @@ -5268,7 +5268,7 @@ snapshots: '@types/react-scroll@1.8.10': dependencies: - '@types/react': 18.3.27 + '@types/react': 19.2.9 '@types/react@18.3.27': dependencies: diff --git a/sites/mainweb/app/projects/page.tsx b/sites/mainweb/app/projects/page.tsx index e9b7c62..e11e299 100644 --- a/sites/mainweb/app/projects/page.tsx +++ b/sites/mainweb/app/projects/page.tsx @@ -52,7 +52,7 @@ const projects: Project[] = [ }, ]; -const ProjectsPage: React.FC = () => { +export default function ProjectsPage() { const [windowWidth, setWindowWidth] = useState(typeof window !== "undefined" ? window.innerWidth : 1024); const categories: Project["category"][] = ["Deep Learning", "Finance", "Sports", "General DS"]; @@ -151,6 +151,4 @@ const ProjectsPage: React.FC = () => {