diff --git a/tsconfig.json b/tsconfig.json index e107fb6e545..0a1b6daa54a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,8 @@ "esModuleInterop": true, "module": "Node16", "moduleResolution": "Node16", - "noEmit": true + "noEmit": true, + "noUncheckedIndexedAccess": true }, "references": [ { "path": "./packages/accounts-controller" }, diff --git a/tsconfig.packages.json b/tsconfig.packages.json index 8d0d5aee5ed..2ad5e02f29d 100644 --- a/tsconfig.packages.json +++ b/tsconfig.packages.json @@ -5,6 +5,7 @@ "lib": ["ES2020", "DOM"], "module": "Node16", "moduleResolution": "Node16", + "noUncheckedIndexedAccess": true, /** * Here we ensure that TypeScript resolves `@metamask/*` imports to the * uncompiled source code for packages that live in this repo.