From e84d8798aea740a5c7c47283136c7f01255778fa Mon Sep 17 00:00:00 2001 From: Dominic Griesel Date: Mon, 4 Nov 2024 10:32:41 +0100 Subject: [PATCH] refactor: file extensions --- maintenance/tsconfig.json | 1 - test/{run.ts => run.cts} | 0 test/tsconfig.json | 2 +- tsconfig.all.json | 2 +- tsconfig.docs.json | 6 +++++- turbo.json | 12 ++++++------ 6 files changed, 13 insertions(+), 10 deletions(-) rename test/{run.ts => run.cts} (100%) diff --git a/maintenance/tsconfig.json b/maintenance/tsconfig.json index b55e47991d2a..90c99d3c147a 100644 --- a/maintenance/tsconfig.json +++ b/maintenance/tsconfig.json @@ -3,7 +3,6 @@ "compileOnSave": true, "compilerOptions": { "module": "commonjs", - "moduleResolution": "node", // "noImplicitAny": true, "rootDir": "../", "newLine": "lf" diff --git a/test/run.ts b/test/run.cts similarity index 100% rename from test/run.ts rename to test/run.cts diff --git a/test/tsconfig.json b/test/tsconfig.json index 217a20995603..e83bdf4cd316 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,4 +1,4 @@ { "extends": "../tsconfig.base.json", - "include": ["*.ts"] + "include": ["*.ts", "run.cts"] } diff --git a/tsconfig.all.json b/tsconfig.all.json index 6e076145f93d..e22b232ef18c 100644 --- a/tsconfig.all.json +++ b/tsconfig.all.json @@ -2,6 +2,6 @@ // This is used for linting and other maintenance tasks { "extends": "./tsconfig.base.json", - "include": ["**/*.ts"], + "include": ["**/*.ts", "**/*.cts", "**/*.mts"], "exclude": ["**/build/**", "**/node_modules/**"] } diff --git a/tsconfig.docs.json b/tsconfig.docs.json index b58d0915ab1e..a11a148af5a2 100644 --- a/tsconfig.docs.json +++ b/tsconfig.docs.json @@ -4,5 +4,9 @@ "compilerOptions": { "customConditions": ["@@dev"] }, - "include": ["packages/**/src/**/*.ts"] + "include": [ + "packages/**/src/**/*.ts", + "packages/**/src/**/*.cts", + "packages/**/src/**/*.mts" + ] } diff --git a/turbo.json b/turbo.json index 44a03d801689..69c08b6be9b3 100644 --- a/turbo.json +++ b/turbo.json @@ -48,7 +48,7 @@ "inputs": [ // https://github.com/vercel/turborepo/issues/1407 ":!:build/", - "**/*.{ts,json}", + "**/*.{ts,cts,mts,json}", // The style based linting tasks depend on the corresponding configuration in the repo root "../../eslint.config.mjs", "../../tsconfig.all.json" @@ -59,12 +59,12 @@ "inputs": [ // https://github.com/vercel/turborepo/issues/1407 ":!:build/", - "**/*.{ts,json}", + "**/*.{ts,cts,mts,json}", // The style based linting tasks depend on the corresponding configuration in the repo root "../../eslint.config.mjs", "../../tsconfig.all.json" ], - "outputs": ["**/*.{ts,json}"] + "outputs": ["**/*.{ts,cts,mts,json}"] }, "lint:zwave": { @@ -73,7 +73,7 @@ }, "@zwave-js/config#lint:zwave": { "inputs": [ - "**/*.ts", + "**/*.{ts,cts,mts}", "config/**/*.json", "config/eslint.config.mjs" ] @@ -81,14 +81,14 @@ "extract-api": { "dependsOn": ["//#build:turbo"], - "inputs": ["src/**/*.ts", "build/**"], + "inputs": ["src/**/*.{ts,cts,mts}", "build/**"], "cache": false // "outputs": [".tmp/api.md", "api.md"] }, "test:ts": { // "dependsOn": ["//#build:turbo"], - "inputs": ["src/**/*.ts", "vitest.config.mjs"] + "inputs": ["src/**/*.{ts,cts,mts}", "vitest.config.mjs"] // TODO: consider snapshot files } },