From a479f8d44b442f1f7c6d6389a798dfe659fc5e1a Mon Sep 17 00:00:00 2001 From: Aaron Hayes Date: Tue, 10 Nov 2020 17:01:33 +1000 Subject: [PATCH] Improve typescript config --- src/useScript.ts | 1 - tsconfig.json | 2 +- tslint.json | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/useScript.ts b/src/useScript.ts index 3b6d5b0..b31ce31 100644 --- a/src/useScript.ts +++ b/src/useScript.ts @@ -7,7 +7,6 @@ function useScript(src: string): boolean[] { const [loaded, setLoaded] = useState(false); const [error, setError] = useState(false); - // @ts-ignore useEffect(() => { // If cachedScripts array already includes src that means another instance ... // ... of this hook already loaded this script, so no need to load again. diff --git a/tsconfig.json b/tsconfig.json index 38125d1..05dca7a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,7 +22,7 @@ /* Additional Checks */ "noUnusedLocals": true /* Report errors on unused locals. */, "noUnusedParameters": true /* Report errors on unused parameters. */, - "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, + "noImplicitReturns": false /* Report error when not all code paths in function return a value. */, "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, "allowUnreachableCode": false, diff --git a/tslint.json b/tslint.json index 6e01aa2..999c57c 100644 --- a/tslint.json +++ b/tslint.json @@ -9,7 +9,7 @@ "readonly-keyword": true, "readonly-array": false, "no-let": true, - "no-object-mutation": true, + "no-object-mutation": false, "no-delete": true, "no-method-signature": true, "no-this": true,