From 1e5857d008707c2d2ce5f5ea84bde91a98f60103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Belin?= Date: Sat, 27 Apr 2024 16:58:20 +0200 Subject: [PATCH] Fix the TypeScript settings --- etc/typedoc.js | 2 +- gulpfile.js | 4 ++-- src/{jsconfig.json => tsconfig.json} | 4 ++-- jsconfig.json => tsconfig.json | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) rename src/{jsconfig.json => tsconfig.json} (79%) rename jsconfig.json => tsconfig.json (91%) diff --git a/etc/typedoc.js b/etc/typedoc.js index e181d103..22699cd6 100644 --- a/etc/typedoc.js +++ b/etc/typedoc.js @@ -9,5 +9,5 @@ export default { name: "Akismet for JS", out: "../docs/api", readme: "none", - tsconfig: "../src/jsconfig.json" + tsconfig: "../src/tsconfig.json" }; diff --git a/gulpfile.js b/gulpfile.js index ddbb9b39..65cdaf11 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,7 +7,7 @@ import pkg from "./package.json" with {type: "json"}; // Builds the project. export function build() { - return $`tsc --project src/jsconfig.json`; + return $`tsc --project src/tsconfig.json`; } // Deletes all generated files. @@ -23,7 +23,7 @@ export async function doc() { // Performs the static analysis of source code. export async function lint() { - await $`tsc --project jsconfig.json`; + await $`tsc --project tsconfig.json`; return $`eslint --config=etc/eslint.config.js gulpfile.js etc example src test`; } diff --git a/src/jsconfig.json b/src/tsconfig.json similarity index 79% rename from src/jsconfig.json rename to src/tsconfig.json index 7a5bbd3d..6f5c67b5 100644 --- a/src/jsconfig.json +++ b/src/tsconfig.json @@ -1,6 +1,6 @@ { - "extends": "../jsconfig.json", - "include": ["index.js"], + "extends": "../tsconfig.json", + "include": ["**/*.js"], "compilerOptions": { "declaration": true, "declarationMap": true, diff --git a/jsconfig.json b/tsconfig.json similarity index 91% rename from jsconfig.json rename to tsconfig.json index 82c1ded3..583d5629 100644 --- a/jsconfig.json +++ b/tsconfig.json @@ -2,12 +2,14 @@ "exclude": ["etc/eslint.config.js"], "include": ["*.js", "etc/*.js", "example/*.js", "src/**/*.js", "test/**/*.js"], "compilerOptions": { + "allowJs": true, "baseUrl": ".", "checkJs": true, "esModuleInterop": true, "isolatedModules": true, "module": "NodeNext", "moduleResolution": "NodeNext", + "noEmit": true, "noImplicitOverride": true, "resolveJsonModule": true, "strict": true,