From ac630987615dc70bb80255c391ee6960a50e98ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?L=C3=A9o=20Banno-Cloutier?=
 <leo.banno-cloutier@savoirfairelinux.com>
Date: Tue, 8 Aug 2023 11:27:27 -0400
Subject: [PATCH] add tsconfig.json

Gitlab: #100
Change-Id: I66d9fea122f431b36ec9fe6cae24552edabdb5c0
---
 jams-react-client/jsconfig.json          | 10 ---------
 jams-react-client/package.json           |  8 ++++---
 jams-react-client/src/react-app-env.d.ts |  1 +
 jams-react-client/tsconfig.json          | 27 ++++++++++++++++++++++++
 4 files changed, 33 insertions(+), 13 deletions(-)
 delete mode 100644 jams-react-client/jsconfig.json
 create mode 100644 jams-react-client/src/react-app-env.d.ts
 create mode 100644 jams-react-client/tsconfig.json

diff --git a/jams-react-client/jsconfig.json b/jams-react-client/jsconfig.json
deleted file mode 100644
index 5230ed4e..00000000
--- a/jams-react-client/jsconfig.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "compilerOptions": {
-    "jsx": "react",
-    "baseUrl": "src",
-    "checkJs": true
-  },
-  "include": [
-    "src"
-  ]
-}
\ No newline at end of file
diff --git a/jams-react-client/package.json b/jams-react-client/package.json
index 1002551d..fb6bc962 100644
--- a/jams-react-client/package.json
+++ b/jams-react-client/package.json
@@ -10,6 +10,10 @@
     "@mui/icons-material": "^5.11.16",
     "@mui/material": "^5.13.6",
     "@mui/styles": "^5.13.2",
+    "@types/jest": "^29.5.3",
+    "@types/node": "^20.4.2",
+    "@types/react": "^18.2.15",
+    "@types/react-dom": "^18.2.7",
     "axios": "^1.4.0",
     "classnames": "2.3.2",
     "formik": "^2.1.5",
@@ -33,6 +37,7 @@
     "react-image-file-resizer": "^0.3.8",
     "react-router-dom": "5.2.0",
     "react-scripts": "^4.0.0",
+    "typescript": "^3.9.3",
     "yup": "^1.2.0"
   },
   "scripts": {
@@ -57,9 +62,6 @@
   "bugs": {
     "url": "https://github.com/creativetimofficial/material-dashboard-react/issues"
   },
-  "optionalDependencies": {
-    "typescript": "3.9.3"
-  },
   "devDependencies": {
     "@babel/core": "^7.11.6",
     "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
diff --git a/jams-react-client/src/react-app-env.d.ts b/jams-react-client/src/react-app-env.d.ts
new file mode 100644
index 00000000..6431bc5f
--- /dev/null
+++ b/jams-react-client/src/react-app-env.d.ts
@@ -0,0 +1 @@
+/// <reference types="react-scripts" />
diff --git a/jams-react-client/tsconfig.json b/jams-react-client/tsconfig.json
new file mode 100644
index 00000000..b7ac98f5
--- /dev/null
+++ b/jams-react-client/tsconfig.json
@@ -0,0 +1,27 @@
+{
+  "compilerOptions": {
+    "baseUrl": "src",
+    "target": "es5",
+    "module": "esnext",
+    "allowJs": true,
+    "esModuleInterop": true,
+    "skipLibCheck": true,
+    "forceConsistentCasingInFileNames": true,
+    "lib": [
+      "dom",
+      "dom.iterable",
+      "esnext"
+    ],
+    "allowSyntheticDefaultImports": true,
+    "strict": true,
+    "noFallthroughCasesInSwitch": true,
+    "moduleResolution": "node",
+    "resolveJsonModule": true,
+    "isolatedModules": true,
+    "noEmit": true,
+    "jsx": "react"
+  },
+  "include": [
+    "src"
+  ]
+}
-- 
GitLab