From 3cd4b8861ea4458cdc7b71619d0142b5214c72f9 Mon Sep 17 00:00:00 2001 From: Lionarius Date: Wed, 21 May 2025 08:47:21 +0300 Subject: [PATCH] . --- app/.prettierrc => .prettierrc | 0 app/lib/api/types.ts | 3 +- components.json | 38 +++++----- eslint.config.js | 26 +++---- package.json | 122 ++++++++++++++++----------------- react-router.config.ts | 6 +- tsconfig.json | 50 +++++++------- vite.config.ts | 2 +- 8 files changed, 123 insertions(+), 124 deletions(-) rename app/.prettierrc => .prettierrc (100%) diff --git a/app/.prettierrc b/.prettierrc similarity index 100% rename from app/.prettierrc rename to .prettierrc diff --git a/app/lib/api/types.ts b/app/lib/api/types.ts index da4f570..93ee954 100644 --- a/app/lib/api/types.ts +++ b/app/lib/api/types.ts @@ -1,8 +1,7 @@ import { z } from "zod"; export type TypeToZod = { - [K in keyof T]: // 1. Handle Arrays (including arrays of objects, optional or required) - T[K] extends ReadonlyArray | undefined + [K in keyof T]: T[K] extends ReadonlyArray | undefined // 1. Handle Arrays (including arrays of objects, optional or required) ? undefined extends T[K] ? E extends object ? z.ZodOptional>>> diff --git a/components.json b/components.json index fa1e81b..de009c4 100644 --- a/components.json +++ b/components.json @@ -1,21 +1,21 @@ { - "$schema": "https://ui.shadcn.com/schema.json", - "style": "new-york", - "rsc": false, - "tsx": true, - "tailwind": { - "config": "", - "css": "app/app.css", - "baseColor": "neutral", - "cssVariables": true, - "prefix": "" - }, - "aliases": { - "components": "~/components", - "utils": "~/lib/utils", - "ui": "~/components/ui", - "lib": "~/lib", - "hooks": "~/hooks" - }, - "iconLibrary": "lucide" + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "", + "css": "app/app.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "~/components", + "utils": "~/lib/utils", + "ui": "~/components/ui", + "lib": "~/lib", + "hooks": "~/hooks" + }, + "iconLibrary": "lucide" } diff --git a/eslint.config.js b/eslint.config.js index 45b59f1..df400ff 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -7,17 +7,17 @@ import globals from "globals"; import tseslint from "typescript-eslint"; export default defineConfig([ - { - files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], - plugins: { js }, - extends: ["js/recommended"], - }, - { - files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], - languageOptions: { globals: globals.browser }, - }, - tseslint.configs.recommended, - pluginReact.configs.recommended, - reactHooks.configs.recommended, - eslintConfigPrettier, + { + files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], + plugins: { js }, + extends: ["js/recommended"], + }, + { + files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], + languageOptions: { globals: globals.browser }, + }, + tseslint.configs.recommended, + pluginReact.configs.recommended, + reactHooks.configs.recommended, + eslintConfigPrettier, ]); diff --git a/package.json b/package.json index 3f2253f..7decbc8 100644 --- a/package.json +++ b/package.json @@ -1,63 +1,63 @@ { - "name": "diplom", - "private": true, - "type": "module", - "scripts": { - "build": "react-router build", - "dev": "react-router dev", - "start": "react-router-serve ./build/server/index.js", - "typecheck": "react-router typegen && tsc" - }, - "dependencies": { - "@hookform/resolvers": "^5.0.1", - "@radix-ui/react-aspect-ratio": "^1.1.6", - "@radix-ui/react-avatar": "^1.1.9", - "@radix-ui/react-context-menu": "^2.2.14", - "@radix-ui/react-dialog": "^1.1.13", - "@radix-ui/react-dropdown-menu": "^2.1.14", - "@radix-ui/react-label": "^2.1.6", - "@radix-ui/react-scroll-area": "^1.2.8", - "@radix-ui/react-select": "^2.2.4", - "@radix-ui/react-separator": "^1.1.6", - "@radix-ui/react-slot": "^1.2.2", - "@radix-ui/react-tabs": "^1.1.11", - "@radix-ui/react-tooltip": "^1.2.6", - "@react-router/node": "^7.6.0", - "@react-router/serve": "^7.6.0", - "@tanstack/react-query": "^5.76.1", - "@yornaath/batshit": "^0.10.1", - "axios": "^1.9.0", - "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", - "immer": "^10.1.1", - "isbot": "^5.1.28", - "lucide-react": "^0.510.0", - "react": "^19.1.0", - "react-dom": "^19.1.0", - "react-hook-form": "^7.56.3", - "react-router": "^7.6.0", - "tailwind-merge": "^3.3.0", - "zod": "^3.24.4", - "zustand": "^5.0.4" - }, - "devDependencies": { - "@eslint/js": "^9.27.0", - "@react-router/dev": "^7.6.0", - "@tailwindcss/vite": "^4.1.6", - "@types/node": "^22.15.18", - "@types/react": "^19.1.4", - "@types/react-dom": "^19.1.5", - "eslint": "^9.27.0", - "eslint-plugin-prettier": "5.4.0", - "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^5.2.0", - "globals": "^16.1.0", - "prettier": "3.5.3", - "tailwindcss": "^4.1.6", - "tw-animate-css": "^1.2.9", - "typescript": "^5.8.3", - "typescript-eslint": "^8.32.1", - "vite": "^6.3.5", - "vite-tsconfig-paths": "^5.1.4" - } + "name": "diplom", + "private": true, + "type": "module", + "scripts": { + "build": "react-router build", + "dev": "react-router dev", + "start": "react-router-serve ./build/server/index.js", + "typecheck": "react-router typegen && tsc" + }, + "dependencies": { + "@hookform/resolvers": "^5.0.1", + "@radix-ui/react-aspect-ratio": "^1.1.6", + "@radix-ui/react-avatar": "^1.1.9", + "@radix-ui/react-context-menu": "^2.2.14", + "@radix-ui/react-dialog": "^1.1.13", + "@radix-ui/react-dropdown-menu": "^2.1.14", + "@radix-ui/react-label": "^2.1.6", + "@radix-ui/react-scroll-area": "^1.2.8", + "@radix-ui/react-select": "^2.2.4", + "@radix-ui/react-separator": "^1.1.6", + "@radix-ui/react-slot": "^1.2.2", + "@radix-ui/react-tabs": "^1.1.11", + "@radix-ui/react-tooltip": "^1.2.6", + "@react-router/node": "^7.6.0", + "@react-router/serve": "^7.6.0", + "@tanstack/react-query": "^5.76.1", + "@yornaath/batshit": "^0.10.1", + "axios": "^1.9.0", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "immer": "^10.1.1", + "isbot": "^5.1.28", + "lucide-react": "^0.510.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "react-hook-form": "^7.56.3", + "react-router": "^7.6.0", + "tailwind-merge": "^3.3.0", + "zod": "^3.24.4", + "zustand": "^5.0.4" + }, + "devDependencies": { + "@eslint/js": "^9.27.0", + "@react-router/dev": "^7.6.0", + "@tailwindcss/vite": "^4.1.6", + "@types/node": "^22.15.18", + "@types/react": "^19.1.4", + "@types/react-dom": "^19.1.5", + "eslint": "^9.27.0", + "eslint-plugin-prettier": "5.4.0", + "eslint-plugin-react": "^7.37.5", + "eslint-plugin-react-hooks": "^5.2.0", + "globals": "^16.1.0", + "prettier": "3.5.3", + "tailwindcss": "^4.1.6", + "tw-animate-css": "^1.2.9", + "typescript": "^5.8.3", + "typescript-eslint": "^8.32.1", + "vite": "^6.3.5", + "vite-tsconfig-paths": "^5.1.4" + } } diff --git a/react-router.config.ts b/react-router.config.ts index b8b143a..f86f544 100644 --- a/react-router.config.ts +++ b/react-router.config.ts @@ -1,7 +1,7 @@ import type { Config } from "@react-router/dev/config"; export default { - // Config options... - // Server-side render by default, to enable SPA mode set this to `false` - ssr: false, + // Config options... + // Server-side render by default, to enable SPA mode set this to `false` + ssr: false, } satisfies Config; diff --git a/tsconfig.json b/tsconfig.json index dc391a4..4540ed2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,27 +1,27 @@ { - "include": [ - "**/*", - "**/.server/**/*", - "**/.client/**/*", - ".react-router/types/**/*" - ], - "compilerOptions": { - "lib": ["DOM", "DOM.Iterable", "ES2022"], - "types": ["node", "vite/client"], - "target": "ES2022", - "module": "ES2022", - "moduleResolution": "bundler", - "jsx": "react-jsx", - "rootDirs": [".", "./.react-router/types"], - "baseUrl": ".", - "paths": { - "~/*": ["./app/*"] - }, - "esModuleInterop": true, - "verbatimModuleSyntax": true, - "noEmit": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true - } + "include": [ + "**/*", + "**/.server/**/*", + "**/.client/**/*", + ".react-router/types/**/*" + ], + "compilerOptions": { + "lib": ["DOM", "DOM.Iterable", "ES2022"], + "types": ["node", "vite/client"], + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "bundler", + "jsx": "react-jsx", + "rootDirs": [".", "./.react-router/types"], + "baseUrl": ".", + "paths": { + "~/*": ["./app/*"] + }, + "esModuleInterop": true, + "verbatimModuleSyntax": true, + "noEmit": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true + } } diff --git a/vite.config.ts b/vite.config.ts index 4a88d58..f1bc5f2 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,5 +4,5 @@ import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; export default defineConfig({ - plugins: [tailwindcss(), reactRouter(), tsconfigPaths()], + plugins: [tailwindcss(), reactRouter(), tsconfigPaths()], });