From 0c584e70fd840e6ca857f4b177a21a389d958633 Mon Sep 17 00:00:00 2001 From: Johannes Ewald Date: Fri, 15 Nov 2024 12:54:08 +0100 Subject: [PATCH] fix: TypeScript configs --- package.json | 5 +++-- tsconfig.json | 2 +- typescript/base.json | 1 + typescript/lib.json | 7 +++++++ 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 typescript/lib.json diff --git a/package.json b/package.json index 2d6253e..e5e61b7 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,8 @@ "./eslint/styles/prefer-interface": "./eslint/styles/prefer-interface.js", "./prettier": "./prettier/base.js", "./semantic-release": "./semantic-release/base.js", - "./typescript": "./typescript/base.js" + "./typescript": "./typescript/base.json", + "./typescript/lib": "./typescript/lib.json" }, "files": [ "eslint", @@ -105,7 +106,7 @@ "typescript": "5.6.3" }, "peerDependencies": { - "eslint": "^9.10.0" + "eslint": "^9.0.0" }, "publishConfig": { "access": "public" diff --git a/tsconfig.json b/tsconfig.json index 325b858..75ccc97 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "extends": "./typescript/base.json", - "include": ["eslint", "prettier", "typescript"], + "include": ["eslint", "prettier", "typescript", "semantic-release"], "exclude": [ "eslint/presets/typescript.test", "eslint/presets/typescript-react.test", diff --git a/typescript/base.json b/typescript/base.json index 9a92f19..9842e5f 100644 --- a/typescript/base.json +++ b/typescript/base.json @@ -5,6 +5,7 @@ "exactOptionalPropertyTypes": true, "forceConsistentCasingInFileNames": true, "isolatedModules": true, + "lib": ["DOM", "ESNext"], "module": "NodeNext", "noEmit": true, // If code should be emitted, it's recommended to create a separate tsconfig.build.json file "noImplicitOverride": true, diff --git a/typescript/lib.json b/typescript/lib.json new file mode 100644 index 0000000..e754d7b --- /dev/null +++ b/typescript/lib.json @@ -0,0 +1,7 @@ +{ + "extends": "./typescript.json", + "compilerOptions": { + "sourceMap": true, + "declaration": true + } +}