From 941ddb9856785815d97dbd018b3b53b8f321b3b3 Mon Sep 17 00:00:00 2001 From: Hermann_Kitio Date: Fri, 17 Apr 2026 16:13:18 +0300 Subject: [PATCH] chore(scaffold): activer TypeScript strict, alias @ et script typecheck --- package.json | 1 + tsconfig.app.json | 8 ++++++++ vite.config.ts | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/package.json b/package.json index edf4901..99ff45a 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "vite", "build": "tsc -b && vite build", + "typecheck": "tsc --noEmit -p tsconfig.app.json", "lint": "eslint .", "preview": "vite preview" }, diff --git a/tsconfig.app.json b/tsconfig.app.json index 1d29c88..aaeabd4 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -15,6 +15,14 @@ "noEmit": true, "jsx": "react-jsx", + /* Path aliases */ + "paths": { + "@/*": ["./src/*"] + }, + + /* Strict type checking */ + "strict": true, + /* Linting */ "noUnusedLocals": true, "noUnusedParameters": true, diff --git a/vite.config.ts b/vite.config.ts index c4069b7..92d835f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,3 +1,4 @@ +import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' @@ -5,4 +6,9 @@ import tailwindcss from '@tailwindcss/vite' // https://vite.dev/config/ export default defineConfig({ plugins: [react(), tailwindcss()], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)), + }, + }, })