From a3ac782f17b5a5d8d59bf5fe452f6874a223db5d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20N=C3=A9grier?= Date: Wed, 3 Jun 2020 11:18:53 +0200 Subject: [PATCH] Enabling Typescript strict mode on the front This is very important otherwise, a number of useful checks (like nullable objects not propertly checked) are not performed. See https://dev.to/briwa/how-strict-is-typescript-s-strict-mode-311a --- front/tsconfig.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/front/tsconfig.json b/front/tsconfig.json index c34c1dd..3d91f3d 100644 --- a/front/tsconfig.json +++ b/front/tsconfig.json @@ -7,6 +7,9 @@ "module": "CommonJS", "target": "es5", "jsx": "react", - "allowJs": true + "allowJs": true, + "strict": true, /* Enable all strict type-checking options. */ + "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */ } } -- 2.25.1