From 11a2e6e00756a5b8e330d7d9223ffb90d7678177 Mon Sep 17 00:00:00 2001 From: fire332 <96039230+fire332@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:10:23 -0700 Subject: [PATCH] use stricter tsconfig's --- jsconfig.json | 13 ------------- tsconfig.base.json | 25 +++++++++++++++++++++++++ tsconfig.json | 10 ++++++++++ tsconfig.tooling.json | 7 +++++++ 4 files changed, 42 insertions(+), 13 deletions(-) delete mode 100644 jsconfig.json create mode 100644 tsconfig.base.json create mode 100644 tsconfig.json create mode 100644 tsconfig.tooling.json diff --git a/jsconfig.json b/jsconfig.json deleted file mode 100644 index 6862d473..00000000 --- a/jsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "module": "es2022", - "moduleResolution": "node", - "strict": true, - "jsx": "preserve", - "jsxFactory": "h", - "jsxFragmentFactory": "Fragment", - "jsxImportSource": "preact" - }, - "include": ["src/**/*"], - "exclude": ["node_modules"] -} diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 00000000..bcc36628 --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + // Language + "target": "ESNext", + "module": "ESNext", + "lib": ["ESNext"], + "esModuleInterop": true, + + // Module handling + "composite": true, + "moduleResolution": "bundler", + "resolveJsonModule": true, + "verbatimModuleSyntax": true, + "isolatedModules": true, + + // Linting + "noErrorTruncation": true, + "strict": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + + "outDir": "./node_modules/.cache/tsc_build" + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..0afd9d10 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "allowJs": true, + + "lib": ["ESNext", "DOM"] + }, + "include": ["./src"], + "references": [{ "path": "./tsconfig.tooling.json" }] +} diff --git a/tsconfig.tooling.json b/tsconfig.tooling.json new file mode 100644 index 00000000..2b3929ae --- /dev/null +++ b/tsconfig.tooling.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "checkJs": true + }, + "include": ["./*", "./**/.eslintrc.js"] +}