From d1288ecfefbd29bd244c064b569dd20ca28ba3f0 Mon Sep 17 00:00:00 2001 From: Charley Kline Date: Thu, 24 Mar 2022 11:07:18 -0500 Subject: [PATCH] Update tsconfig.json for es2020 type libraries Closes FOO-2784 flag = none In order to use things like Intl.DateTimeFormat, we need the ES2020 libraries, since a bunch of stuff is missing in es7's type definition libs. Test plan: * all our TS still compiles Change-Id: If06d88e46b2e748c360c1f6f6e2657288e8ce914 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287938 Tested-by: Service Cloud Jenkins Reviewed-by: Aaron Shafovaloff Reviewed-by: Isaac Moore QA-Review: Charley Kline Product-Review: Charley Kline --- tsconfig.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 59570eb4890..d525fc32ec7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,14 +4,14 @@ "esModuleInterop": true, // more accurately transpiles to the ES6 module spec (maybe not needed w/ babel transpilation) "isolatedModules": true, // required to adhere to babel's single-file transpilation process "jsx": "react", // transpiles jsx to React.createElement calls (maybe not needed w/ babel transpilation) - "lib": ["dom", "es7"], // include types for DOM APIs and standard JS up to ES2016 / ES7 - "module": "ES2020", // support the most modern ES6-style module syntax + "lib": ["dom", "es2020"], // include types for DOM APIs and standard JS up to ES2020 + "module": "es2020", // support the most modern ES6-style module syntax "moduleResolution": "node", // required for non-commonjs imports "noEmit": true, // don't generate transpiled JS files, source-maps, or .d.ts files for Canvas source code "resolveJsonModule": true, // enables importing json files "skipLibCheck": true, // don't do type-checking on dependencies' internal types for improved performance "strict": true, // enables a bunch of strict mode family options. See https://www.typescriptlang.org/tsconfig#strict - "target": "ES2020", // support the most modern JS features (let babel handle transpilation) + "target": "es2020", // support the most modern JS features (let babel handle transpilation) "noImplicitAny": false, // temporarily allows un-typed variables (and imports) to be automatically defined as "any", "baseUrl": "./ui", // recommended to be defined when using `paths` "paths": {