diff --git a/.release-it.js b/.release-it.js index 4665b7c..22f2c7a 100644 --- a/.release-it.js +++ b/.release-it.js @@ -1,12 +1,13 @@ module.exports = { hooks: { - "before:init": "nr test run", + "before:init": ["nr test run", "which git-cliff"], "before:beforeBump": [ "git flow release start v${version}", "echo \uD83D\uDC4A before:bump version=v${version} latestVersion=v${latestVersion}" ], "after:bump": [ - "pnpx auto-changelog -p && git add CHANGELOG.md", + "git cliff -o CHANGELOG.md && git add CHANGELOG.md", + 'git commit --allow-empty -am "ci: update CHANGELOG"', "echo \uD83D\uDC4A after:bump version=v${version} latestVersion=v${latestVersion}" ], "after:release": [ diff --git a/biome.json b/biome.json index 77b5eb1..bc89457 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.5.1/schema.json", + "$schema": "https://biomejs.dev/schemas/1.9.2/schema.json", "files": { "ignore": [".next", "./**/*config.js", "./**/*.d.ts"], "ignoreUnknown": true @@ -29,7 +29,7 @@ "formatter": { "jsxQuoteStyle": "single", "quoteProperties": "asNeeded", - "trailingComma": "none", + "trailingCommas": "none", "semicolons": "always", "arrowParentheses": "always", "bracketSpacing": true, diff --git a/bun.lockb b/bun.lockb index 1e47269..4f885e4 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index f773cf5..dd56886 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,15 @@ "version": "1.14.0", "private": true, "scripts": { - "dev": "next dev", - "dev:turbo": "next dev --turbo", + "dev:old": "next dev", + "format": "biome format --write", + "dev": "next dev --turbo", "bun:dev": "bun --bun run dev", "build": "next build", "start": "next start", "lint": "next lint --format=stylish", "lint:fix": "pnpm lint --fix", - "lint:types": "pnpm tsc", + "lint:types": "nr tsc --noEmit", "test": "vitest", "commitlint": "commitlint --edit", "check": "biome check --apply ./", @@ -33,56 +34,58 @@ "build-storybook": "storybook build" }, "dependencies": { - "@changesets/cli": "^2.27.7", + "@changesets/cli": "^2.27.8", + "@hookform/error-message": "^2.0.1", + "@hookform/resolvers": "^3.9.0", "@icons-pack/react-simple-icons": "^9.7.0", - "@tanstack/react-query": "^5.53.3", - "@tanstack/react-query-devtools": "^5.54.0", + "@tanstack/react-query": "^5.56.2", + "@tanstack/react-query-devtools": "^5.58.0", "@testing-library/jest-dom": "^6.5.0", "chalk": "^5.3.0", "clsx": "^2.1.1", - "next": "14.2.5", + "next": "14.2.10", "nextjs-google-analytics": "^2.3.7", "react": "^18.3.1", "react-dom": "^18.3.1", "react-hook-form": "^7.53.0", "react-hotjar": "^6.3.1", "react-obfuscate": "^3.7.0", - "remeda": "^2.12.0", - "tailwindcss-radix": "^3.0.4", + "remeda": "^2.14.0", + "tailwindcss-radix": "^3.0.5", "validator": "^13.12.0", "zod": "^3.23.8" }, "devDependencies": { "@biomejs/biome": "1.8.3", "@chromatic-com/storybook": "1.6.1", - "@commitlint/cli": "^19.4.1", - "@commitlint/config-conventional": "^19.4.1", - "@eslint/js": "^9.9.1", + "@commitlint/cli": "^19.5.0", + "@commitlint/config-conventional": "^19.5.0", + "@eslint/js": "^9.11.1", "@faker-js/faker": "^8.4.1", - "@release-it/conventional-changelog": "^8.0.1", - "@storybook/addon-essentials": "^8.2.9", - "@storybook/addon-interactions": "^8.2.9", - "@storybook/addon-links": "^8.2.9", - "@storybook/addon-onboarding": "^8.2.9", - "@storybook/blocks": "^8.2.9", - "@storybook/nextjs": "^8.2.9", - "@storybook/react": "^8.2.9", - "@storybook/test": "^8.2.9", - "@tailwindcss/forms": "^0.5.8", + "@release-it/conventional-changelog": "^8.0.2", + "@storybook/addon-essentials": "^8.3.4", + "@storybook/addon-interactions": "^8.3.4", + "@storybook/addon-links": "^8.3.4", + "@storybook/addon-onboarding": "^8.3.4", + "@storybook/blocks": "^8.3.4", + "@storybook/nextjs": "^8.3.4", + "@storybook/react": "^8.3.4", + "@storybook/test": "^8.3.4", + "@tailwindcss/forms": "^0.5.9", "@tailwindcss/typography": "^0.5.15", - "@tanstack/eslint-plugin-query": "^5.53.0", + "@tanstack/eslint-plugin-query": "^5.58.1", "@testing-library/react": "^16.0.1", "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/fs-extra": "^11.0.4", - "@types/node": "^20.16.3", - "@types/react": "^18.3.5", + "@types/node": "^20.16.10", + "@types/react": "^18.3.10", "@types/react-dom": "^18.3.0", "@typescript-eslint/eslint-plugin": "^7.18.0", - "@vitejs/plugin-react": "^4.3.1", + "@vitejs/plugin-react": "^4.3.2", "autoprefixer": "^10.4.20", "depcheck": "^1.4.7", "dotenv-cli": "^7.4.2", - "eslint": "^9.9.1", + "eslint": "^9.11.1", "eslint-config-airbnb": "^19.0.4", "eslint-config-next": "14.2.5", "eslint-config-prettier": "^9.1.0", @@ -93,26 +96,26 @@ "eslint-plugin-sonarjs": "^1.0.4", "eslint-plugin-storybook": "^0.8.0", "eslint-plugin-unicorn": "^55.0.0", - "execa": "^9.3.1", + "execa": "^9.4.0", "fs-extra": "^11.2.0", "globals": "^15.9.0", - "husky": "^9.1.5", + "husky": "^9.1.6", "jsdom": "^24.1.3", - "lighthouse": "^12.2.0", + "lighthouse": "^12.2.1", "oxlint": "^0.6.1", - "postcss": "^8.4.44", + "postcss": "^8.4.47", "prettier": "^3.3.3", "pretty-quick": "^4.0.0", "release-it": "^17.6.0", "rimraf": "^6.0.1", - "storybook": "^8.2.9", - "tailwindcss": "^3.4.10", - "tsx": "^4.19.0", - "typescript": "^5.5.4", + "storybook": "^8.3.4", + "tailwindcss": "^3.4.13", + "tsx": "^4.19.1", + "typescript": "^5.6.2", "typescript-eslint": "^7.18.0", - "unplugin-auto-import": "^0.18.2", + "unplugin-auto-import": "^0.18.3", "vite-tsconfig-paths": "^4.3.2", - "vitest": "^2.0.5" + "vitest": "^2.1.1" }, "eslintConfig": { "extends": [ diff --git a/src/hooks/use-contact-form.ts b/src/hooks/use-contact-form.ts index c3e9425..ea21e8e 100644 --- a/src/hooks/use-contact-form.ts +++ b/src/hooks/use-contact-form.ts @@ -25,7 +25,7 @@ const contactFormSchema = z.object({ // message: z.string().min(1, { message: "Message is Required" }) // age: z.number().min(10), }); -export type contactFormFields = z.infer; // string +export type ContactFormFields = z.infer; // string export function useContactForm() { const { @@ -33,8 +33,8 @@ export function useContactForm() { handleSubmit, control, formState: { errors, isSubmitting } - } = useForm({ + } = useForm({ resolver: zodResolver(contactFormSchema) }); - return { control, register, handleSubmit, errors, isSubmitting }; + return { control, register, handleSubmit, errors, isSubmitting } as const; } diff --git a/src/ui/contact.stories.tsx b/src/ui/contact.stories.tsx index 767bdcb..7e8e36b 100644 --- a/src/ui/contact.stories.tsx +++ b/src/ui/contact.stories.tsx @@ -18,7 +18,7 @@ export default meta; type Story = StoryObj; export const Default: Story = { args: { - onSubmit: async (data: any) => { + onSubmit: async (data: unknown) => { await delay(2000); console.log("Form submitted with data:", data); // You can add any logic here diff --git a/src/ui/contact.tsx b/src/ui/contact.tsx index ad5ff74..c51f766 100644 --- a/src/ui/contact.tsx +++ b/src/ui/contact.tsx @@ -1,13 +1,13 @@ import type { SubmitHandler } from "react-hook-form"; -import { type contactFormFields, useContactForm } from "@/hooks/use-contact-form"; +import { type ContactFormFields, useContactForm } from "@/hooks/use-contact-form"; import Button from "@/ui/button"; import { ErrorMessage } from "@hookform/error-message"; import { StarIcon } from "@storybook/icons"; import clsx from "clsx"; -export type ContactFormProps = { onSubmit: SubmitHandler }; +export type ContactFormProps = { onSubmit: SubmitHandler }; // Street // Suite 100 @@ -69,7 +69,7 @@ export function ContactForm(props: ContactFormProps) {

{message}

} /> ); @@ -79,7 +79,7 @@ export function ContactForm(props: ContactFormProps) { } export default function ContactSection() { - const handleSubmit: SubmitHandler = async (data) => { + const handleSubmit: SubmitHandler = async (data) => { console.time("work"); await new Promise((r) => setTimeout(r, 2000)); console.log("Contact Form", data); diff --git a/src/ui/sections/external-links-section.tsx b/src/ui/sections/external-links-section.tsx index f01cd42..f243f85 100644 --- a/src/ui/sections/external-links-section.tsx +++ b/src/ui/sections/external-links-section.tsx @@ -58,6 +58,7 @@ export function ExternalLinksSection() {
    {Object.entries(data.links).map(([label, value]) => (
  • + {/* @ts-ignore */}