From 409b5e2f6b4207539dde5a47961e9308a7f9d9f4 Mon Sep 17 00:00:00 2001 From: Rodrigo Fernandes Date: Sun, 6 Aug 2023 19:28:46 +0100 Subject: [PATCH] tweak tsconfig --- .github/workflows/test-and-publish.yml | 2 +- src/ui/js/diff2html-ui-slim.ts | 3 +- src/ui/js/diff2html-ui.ts | 3 +- tsconfig.json | 43 ++++++++++++++++---------- 4 files changed, 31 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test-and-publish.yml b/.github/workflows/test-and-publish.yml index cf69932..5e0ecd7 100644 --- a/.github/workflows/test-and-publish.yml +++ b/.github/workflows/test-and-publish.yml @@ -52,7 +52,7 @@ jobs: needs: [version] strategy: matrix: - node-version: [16.x, 18.x] + node-version: [16.x, 18.x, 20.x] steps: - uses: actions/checkout@v3 with: diff --git a/src/ui/js/diff2html-ui-slim.ts b/src/ui/js/diff2html-ui-slim.ts index 2644e7e..e020110 100644 --- a/src/ui/js/diff2html-ui-slim.ts +++ b/src/ui/js/diff2html-ui-slim.ts @@ -9,4 +9,5 @@ export class Diff2HtmlUI extends Diff2HtmlUIBase { } } -export { Diff2HtmlUIConfig, defaultDiff2HtmlUIConfig }; +export { defaultDiff2HtmlUIConfig }; +export type { Diff2HtmlUIConfig }; diff --git a/src/ui/js/diff2html-ui.ts b/src/ui/js/diff2html-ui.ts index fc51604..57583b4 100644 --- a/src/ui/js/diff2html-ui.ts +++ b/src/ui/js/diff2html-ui.ts @@ -9,4 +9,5 @@ export class Diff2HtmlUI extends Diff2HtmlUIBase { } } -export { Diff2HtmlUIConfig, defaultDiff2HtmlUIConfig }; +export { defaultDiff2HtmlUIConfig }; +export type { Diff2HtmlUIConfig }; diff --git a/tsconfig.json b/tsconfig.json index 2fac7ea..36a9e85 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,28 +1,37 @@ { + "include": ["*env.d.ts", "src/**/*", "./typings/**/*"], + "exclude": ["node_modules", "src/__tests__/**"], "compilerOptions": { - "outDir": "./_target", - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "lib": ["es2020", "dom"], + "outDir": "_target", + "module": "CommonJS", + "moduleResolution": "Node", + "target": "ES6", + "lib": ["ES6", "DOM"], + "jsx": "preserve", "allowJs": false, + "checkJs": false, + "importHelpers": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "resolveJsonModule": true, "declaration": true, "declarationMap": true, + "sourceMap": true, + "noEmit": false, + "forceConsistentCasingInFileNames": true, + "isolatedModules": true, + "incremental": false, "strictNullChecks": true, "removeComments": true, "preserveConstEnums": true, - "sourceMap": true, "alwaysStrict": true, - "strict": true, "noImplicitAny": true, - "noImplicitThis": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "forceConsistentCasingInFileNames": true, - "esModuleInterop": true - }, - "include": ["./src/**/*", "./typings/**/*"], - "exclude": ["node_modules", "./src/__tests__/*"] + "noImplicitThis": true + } }