From c5aa7abd510d4545eb63be82f09ac46c7480333b Mon Sep 17 00:00:00 2001 From: Jack Kavanagh Date: Wed, 31 Jul 2024 15:02:38 +0200 Subject: [PATCH] Add type checking to sdk package (#7719) * add tsconfig.json * playing * fix tsconfig * remove unused excludes --- packages/insomnia-sdk/package.json | 3 ++- packages/insomnia-sdk/tsconfig.json | 35 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 packages/insomnia-sdk/tsconfig.json diff --git a/packages/insomnia-sdk/package.json b/packages/insomnia-sdk/package.json index 79941e8ba16..a81b16fa971 100644 --- a/packages/insomnia-sdk/package.json +++ b/packages/insomnia-sdk/package.json @@ -6,7 +6,8 @@ "main": "src/objects/index.ts", "types": "src/objects/index.ts", "scripts": { - "test": "vitest run" + "test": "vitest run", + "type-check": "tsc --noEmit --project tsconfig.json" }, "repository": { "type": "git", diff --git a/packages/insomnia-sdk/tsconfig.json b/packages/insomnia-sdk/tsconfig.json new file mode 100644 index 00000000000..1d7f225d8c6 --- /dev/null +++ b/packages/insomnia-sdk/tsconfig.json @@ -0,0 +1,35 @@ +{ + "compilerOptions": { + /* Base Options: */ + "esModuleInterop": true, + "skipLibCheck": true, + "target": "es2022", + "allowJs": true, + "resolveJsonModule": true, + "module": "ES2022", + "moduleResolution": "node", + "isolatedModules": true, + /* Strictness */ + "strict": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "useUnknownInCatchVariables": false, + "verbatimModuleSyntax": true, + "jsx": "react", + /* If your code runs in the DOM: */ + "lib": [ + "es2022", + "dom", + "dom.iterable" + ], + }, + "include": [ + "../insomnia/types" + ], + "exclude": [ + "**/__tests__", + "node_modules" + ] +}