diff --git a/package-lock.json b/package-lock.json index 0bd36bd2..d275ee6e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,6 +63,7 @@ "@types/eslint__js": "^8.42.3", "@types/react": "^19.0.3", "@types/react-dom": "^19.0.2", + "@ugrc/tsconfigs": "^1.0.3", "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", "concurrently": "^9.1.2", @@ -5090,6 +5091,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@total-typescript/tsconfig": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@total-typescript/tsconfig/-/tsconfig-1.0.4.tgz", + "integrity": "sha512-fO4ctMPGz1kOFOQ4RCPBRBfMy3gDn+pegUfrGyUFRMv/Rd0ZM3/SHH3hFCYG4u6bPLG8OlmOGcBLDexvyr3A5w==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/aria-query": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", @@ -5908,6 +5916,16 @@ "react": ">=16.8.0" } }, + "node_modules/@ugrc/tsconfigs": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@ugrc/tsconfigs/-/tsconfigs-1.0.3.tgz", + "integrity": "sha512-9Z84bZpLJ6wRi4sm6RWvckPHs/Q6XZCHW5yjeHZzboZi/1bsJUOoh3F5wT/qQ5EKewDcHk65WcvUTWPc+JYjtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@total-typescript/tsconfig": "^1.0.4" + } + }, "node_modules/@utahdts/utah-design-system-header": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@utahdts/utah-design-system-header/-/utah-design-system-header-3.0.3.tgz", diff --git a/package.json b/package.json index 7578fcdd..37fdf839 100644 --- a/package.json +++ b/package.json @@ -106,6 +106,7 @@ "@types/eslint__js": "^8.42.3", "@types/react": "^19.0.3", "@types/react-dom": "^19.0.2", + "@ugrc/tsconfigs": "^1.0.3", "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", "concurrently": "^9.1.2", diff --git a/tsconfig.browser.json b/tsconfig.browser.json new file mode 100644 index 00000000..062beb83 --- /dev/null +++ b/tsconfig.browser.json @@ -0,0 +1,4 @@ +{ + "extends": "@ugrc/tsconfigs/browser", + "include": ["src"] +} diff --git a/tsconfig.json b/tsconfig.json index 45f2f41f..a2ea72e0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,20 +1,11 @@ { - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "jsx": "preserve", - "lib": ["esnext", "DOM"], - "module": "esnext", - "moduleResolution": "bundler", - "noEmit": true, - // this is just a dummy prop to make the compiler happy - "outDir": "./typescriptOut", - "resolveJsonModule": true, - "skipLibCheck": true, - "strict": false, - "types": ["node", "vite/client"] - }, - "exclude": ["node_modules/**/*", "functions/node_modules/**/*"], - "include": ["functions/**/*", "src/**/*"] + "files": [], + "references": [ + { + "path": "./tsconfig.browser.json" + }, + { + "path": "./tsconfig.vite-config.json" + } + ] } diff --git a/tsconfig.vite-config.json b/tsconfig.vite-config.json new file mode 100644 index 00000000..ccbe11b1 --- /dev/null +++ b/tsconfig.vite-config.json @@ -0,0 +1,4 @@ +{ + "extends": "@ugrc/tsconfigs/vite-config", + "include": ["vite.config.ts"] +}