From 0b675ab47fa04271cfcbca1408e68681142d4898 Mon Sep 17 00:00:00 2001 From: yifanwww Date: Sun, 20 Aug 2023 16:06:45 +0800 Subject: [PATCH 1/2] chore: do typecheck with incremental disabled --- packages/app-common/package.json | 2 +- packages/app-main/package.json | 2 +- packages/app-renderer/package.json | 2 +- packages/scripts/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/app-common/package.json b/packages/app-common/package.json index 155e7247..cdd29c33 100644 --- a/packages/app-common/package.json +++ b/packages/app-common/package.json @@ -47,7 +47,7 @@ "lint:fix": "eslint . --fix", "pre-commit": "lint-staged", "test": "unit-test", - "typecheck": "tsc --project tsconfig.json --noEmit" + "typecheck": "tsc --project tsconfig.json --noEmit --incremental false" }, "devDependencies": { "@ter/eslint-config": "workspace:*", diff --git a/packages/app-main/package.json b/packages/app-main/package.json index 5e21b4b1..8eb8923d 100644 --- a/packages/app-main/package.json +++ b/packages/app-main/package.json @@ -24,7 +24,7 @@ "pre-commit": "lint-staged", "test": "unit-test", "test-full": "unit-test", - "typecheck": "tsc --project tsconfig.json --noEmit" + "typecheck": "tsc --project tsconfig.json --noEmit --incremental false" }, "dependencies": { "@ter/app-common": "workspace:*", diff --git a/packages/app-renderer/package.json b/packages/app-renderer/package.json index b9a85002..27654df8 100644 --- a/packages/app-renderer/package.json +++ b/packages/app-renderer/package.json @@ -27,7 +27,7 @@ "pre-commit": "lint-staged", "test": "unit-test", "test-full": "unit-test", - "typecheck": "tsc --project tsconfig.json --noEmit" + "typecheck": "tsc --project tsconfig.json --noEmit --incremental false" }, "dependencies": { "@reduxjs/toolkit": "^1.9.5", diff --git a/packages/scripts/package.json b/packages/scripts/package.json index a0acee0c..a95b2c9a 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -34,7 +34,7 @@ "lint": "eslint .", "lint:fix": "eslint . --fix", "pre-commit": "lint-staged", - "typecheck": "tsc --project tsconfig.json --noEmit" + "typecheck": "tsc --project tsconfig.json --noEmit --incremental false" }, "dependencies": { "@babel/core": "^7.22.5", From 62c737e24e7783b4bf2830f839f940903acdd9f2 Mon Sep 17 00:00:00 2001 From: yifanwww Date: Sun, 20 Aug 2023 17:10:44 +0800 Subject: [PATCH 2/2] refactor: make @ter/scripts pure-esm --- packages/app-common/.eslintrc.json | 2 +- packages/app-common/package.json | 6 +++--- packages/app-common/tsconfig.json | 3 +-- .../{tsconfig.esm.json => tsconfig.lib.json} | 0 packages/app-main/tsconfig.json | 4 +--- packages/app-renderer/index.html | 2 +- packages/app-renderer/tsconfig.json | 4 +--- packages/app-renderer/tsconfig.vite.json | 2 +- .../{vite.config.ts => vite.config.mts} | 0 packages/eslint-config/.eslintrc.basic.js | 3 +++ packages/scripts/.prettierignore | 4 ---- packages/scripts/bin/app-main.js | 4 +++- packages/scripts/bin/mkdir-working.js | 4 +++- packages/scripts/bin/run-build.js | 4 +++- packages/scripts/bin/run-unpacked.js | 4 +++- packages/scripts/bin/unit-test.js | 4 ++-- packages/scripts/package.json | 13 +++++++++---- packages/scripts/src/bin.ts | 2 +- packages/scripts/src/electron.ts | 3 +++ packages/scripts/src/index.ts | 2 +- packages/scripts/src/jest/jest.config.ts | 14 ++++++++++---- packages/scripts/src/jest/transform.babel.ts | 5 ++++- packages/scripts/src/jest/transform.css.ts | 2 +- packages/scripts/src/jest/transform.file.ts | 2 +- packages/scripts/src/utils/index.ts | 2 +- packages/scripts/src/utils/paths.ts | 5 ++++- .../src/webpack/utils/getCacheIdentifier.ts | 4 ++++ .../src/webpack/webpack.main.config.ts | 19 ++++++++++++------- packages/scripts/tsconfig.json | 3 +-- .../{tsconfig.cjs.json => tsconfig.dist.json} | 2 +- .../scripts/tsconfigs/tsconfig.types.json | 2 +- packages/tsconfigs/README.md | 10 +--------- ...dler.json => tsconfig.bundler.eslint.json} | 1 + .../tsconfigs/tsconfig.bundler.react.json | 7 ------- packages/tsconfigs/tsconfig.eslint.node.json | 7 ------- .../tsconfigs/tsconfig.node16.eslint.json | 7 +++++++ ...fig.node.cjs.json => tsconfig.node16.json} | 2 +- ....types.json => tsconfig.node16.types.json} | 2 +- packages/tsconfigs/tsconfig.react.eslint.json | 7 +++++++ packages/tsconfigs/tsconfig.react.json | 8 ++++++++ 40 files changed, 106 insertions(+), 75 deletions(-) rename packages/app-common/tsconfigs/{tsconfig.esm.json => tsconfig.lib.json} (100%) rename packages/app-renderer/{vite.config.ts => vite.config.mts} (100%) rename packages/scripts/tsconfigs/{tsconfig.cjs.json => tsconfig.dist.json} (71%) rename packages/tsconfigs/{tsconfig.eslint.bundler.json => tsconfig.bundler.eslint.json} (76%) delete mode 100644 packages/tsconfigs/tsconfig.bundler.react.json delete mode 100644 packages/tsconfigs/tsconfig.eslint.node.json create mode 100644 packages/tsconfigs/tsconfig.node16.eslint.json rename packages/tsconfigs/{tsconfig.node.cjs.json => tsconfig.node16.json} (66%) rename packages/tsconfigs/{tsconfig.node.types.json => tsconfig.node16.types.json} (75%) create mode 100644 packages/tsconfigs/tsconfig.react.eslint.json create mode 100644 packages/tsconfigs/tsconfig.react.json diff --git a/packages/app-common/.eslintrc.json b/packages/app-common/.eslintrc.json index 003905c5..33c9b67a 100644 --- a/packages/app-common/.eslintrc.json +++ b/packages/app-common/.eslintrc.json @@ -1,7 +1,7 @@ { "root": true, "extends": "@ter/eslint-config/.eslintrc.basic.js", - "ignorePatterns": ["/lib", "*.cjs", "*.js", "*.mjs"], + "ignorePatterns": ["/coverage", "/lib", "*.cjs", "*.js", "*.mjs"], "parserOptions": { "project": "./tsconfig.json" } diff --git a/packages/app-common/package.json b/packages/app-common/package.json index cdd29c33..0c8e06f9 100644 --- a/packages/app-common/package.json +++ b/packages/app-common/package.json @@ -37,11 +37,11 @@ "directory": "packages/app-common" }, "scripts": { - "build": "concurrently -n esm,types \"pnpm run build:esm\" \"pnpm run build:types\"", - "build:esm": "tsc --project tsconfigs/tsconfig.esm.json", + "build": "concurrently -n lib,types \"pnpm run build:lib\" \"pnpm run build:types\"", + "build:lib": "tsc --project tsconfigs/tsconfig.lib.json", "build:types": "tsc --project tsconfigs/tsconfig.types.json", "clean": "rimraf --glob coverage lib tsconfigs/*.tsbuildinfo", - "dev": "pnpm run build:esm -- --watch", + "dev": "pnpm run build:lib -- --watch", "format": "prettier --write \"**/*.{cjs,css,html,js,jsx,mjs,json,less,scss,ts,tsx,yaml,yml}\"", "lint": "eslint .", "lint:fix": "eslint . --fix", diff --git a/packages/app-common/tsconfig.json b/packages/app-common/tsconfig.json index 6ac67dcf..d0b264e2 100644 --- a/packages/app-common/tsconfig.json +++ b/packages/app-common/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "@ter/tsconfigs/tsconfig.eslint.bundler.json", + "extends": "@ter/tsconfigs/tsconfig.bundler.eslint.json", "compilerOptions": { - "incremental": false, "rootDir": "src" }, "include": ["src/**/*"], diff --git a/packages/app-common/tsconfigs/tsconfig.esm.json b/packages/app-common/tsconfigs/tsconfig.lib.json similarity index 100% rename from packages/app-common/tsconfigs/tsconfig.esm.json rename to packages/app-common/tsconfigs/tsconfig.lib.json diff --git a/packages/app-main/tsconfig.json b/packages/app-main/tsconfig.json index 3027ac53..9c25079b 100644 --- a/packages/app-main/tsconfig.json +++ b/packages/app-main/tsconfig.json @@ -1,9 +1,7 @@ { - "extends": "@ter/tsconfigs/tsconfig.eslint.bundler.json", + "extends": "@ter/tsconfigs/tsconfig.bundler.eslint.json", "compilerOptions": { "baseUrl": ".", - "incremental": false, - "noEmit": false, "rootDir": "src" }, "include": ["src/**/*"], diff --git a/packages/app-renderer/index.html b/packages/app-renderer/index.html index cd84e0f5..4b92f7a6 100644 --- a/packages/app-renderer/index.html +++ b/packages/app-renderer/index.html @@ -5,7 +5,7 @@ - + template-electron-react diff --git a/packages/app-renderer/tsconfig.json b/packages/app-renderer/tsconfig.json index 06131eb5..f8dd03aa 100644 --- a/packages/app-renderer/tsconfig.json +++ b/packages/app-renderer/tsconfig.json @@ -1,10 +1,8 @@ { - "extends": "@ter/tsconfigs/tsconfig.bundler.react.json", + "extends": "@ter/tsconfigs/tsconfig.react.eslint.json", "compilerOptions": { "allowImportingTsExtensions": true, "baseUrl": ".", - "incremental": false, - "noEmit": true, "rootDir": "src", "plugins": [ diff --git a/packages/app-renderer/tsconfig.vite.json b/packages/app-renderer/tsconfig.vite.json index 71f1b8d7..5af9b035 100644 --- a/packages/app-renderer/tsconfig.vite.json +++ b/packages/app-renderer/tsconfig.vite.json @@ -6,5 +6,5 @@ "moduleResolution": "bundler", "skipLibCheck": true }, - "include": ["vite.config.ts"] + "include": ["vite.config.mts"] } diff --git a/packages/app-renderer/vite.config.ts b/packages/app-renderer/vite.config.mts similarity index 100% rename from packages/app-renderer/vite.config.ts rename to packages/app-renderer/vite.config.mts diff --git a/packages/eslint-config/.eslintrc.basic.js b/packages/eslint-config/.eslintrc.basic.js index afd0039c..dc702655 100644 --- a/packages/eslint-config/.eslintrc.basic.js +++ b/packages/eslint-config/.eslintrc.basic.js @@ -91,6 +91,9 @@ module.exports = { rules: { // -------------------- ESLint Built-In Rules -------------------- + // https://eslint.org/docs/latest/rules/camelcase + camelcase: 'off', + // https://eslint.org/docs/latest/rules/class-methods-use-this 'class-methods-use-this': 'off', diff --git a/packages/scripts/.prettierignore b/packages/scripts/.prettierignore index a2ac661b..e81fc03c 100644 --- a/packages/scripts/.prettierignore +++ b/packages/scripts/.prettierignore @@ -1,7 +1,3 @@ # Compilation /dist - -# Test - -/coverage diff --git a/packages/scripts/bin/app-main.js b/packages/scripts/bin/app-main.js index 7f1c2413..498e2cd5 100755 --- a/packages/scripts/bin/app-main.js +++ b/packages/scripts/bin/app-main.js @@ -1,3 +1,5 @@ #!/usr/bin/env node -require('../dist/bin').appMain(); +import { appMain } from '../dist/bin.js'; + +appMain(); diff --git a/packages/scripts/bin/mkdir-working.js b/packages/scripts/bin/mkdir-working.js index 438c9924..27ea8db1 100755 --- a/packages/scripts/bin/mkdir-working.js +++ b/packages/scripts/bin/mkdir-working.js @@ -1,3 +1,5 @@ #!/usr/bin/env node -require('../dist/bin').mkdirWorking(); +import { mkdirWorking } from '../dist/bin.js'; + +mkdirWorking(); diff --git a/packages/scripts/bin/run-build.js b/packages/scripts/bin/run-build.js index bba49115..ab96459c 100755 --- a/packages/scripts/bin/run-build.js +++ b/packages/scripts/bin/run-build.js @@ -1,3 +1,5 @@ #!/usr/bin/env node -require('../dist/bin').runBuild(); +import { runBuild } from '../dist/bin.js'; + +runBuild(); diff --git a/packages/scripts/bin/run-unpacked.js b/packages/scripts/bin/run-unpacked.js index 86789474..8dc1a0c2 100755 --- a/packages/scripts/bin/run-unpacked.js +++ b/packages/scripts/bin/run-unpacked.js @@ -1,3 +1,5 @@ #!/usr/bin/env node -require('../dist/bin').runUnpacked(); +import { runUnpacked } from '../dist/bin.js'; + +runUnpacked(); diff --git a/packages/scripts/bin/unit-test.js b/packages/scripts/bin/unit-test.js index 564db480..be766b8f 100755 --- a/packages/scripts/bin/unit-test.js +++ b/packages/scripts/bin/unit-test.js @@ -1,7 +1,7 @@ #!/usr/bin/env node -'use strict'; +import { unitTest } from '../dist/bin.js'; const lifecycleEvent = process.env.npm_lifecycle_event; -require('../dist/bin').unitTest(lifecycleEvent === 'test'); +unitTest(lifecycleEvent === 'test'); diff --git a/packages/scripts/package.json b/packages/scripts/package.json index a95b2c9a..80e5e3f5 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -2,8 +2,13 @@ "name": "@ter/scripts", "version": "0.12.0", "description": "Scripts for ter.", - "main": "dist/index.js", - "typings": "dist/index.d.ts", + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + }, "homepage": "https://github.com/YSoftwareRepo/template-electron-react#readme", "license": "MIT", "author": "yifanwww (https://github.com/yifanwww)", @@ -25,8 +30,8 @@ "unit-test": "./bin/unit-test.js" }, "scripts": { - "build-scripts": "concurrently -n cjs,types \"pnpm run build-scripts:cjs\" \"pnpm run build-scripts:types\"", - "build-scripts:cjs": "tsc --project tsconfigs/tsconfig.cjs.json", + "build-scripts": "concurrently -n dist,types \"pnpm run build-scripts:dist\" \"pnpm run build-scripts:types\"", + "build-scripts:dist": "tsc --project tsconfigs/tsconfig.dist.json", "build-scripts:types": "tsc --project tsconfigs/tsconfig.types.json", "clean": "rimraf --glob dist tsconfigs/*.tsbuildinfo", "dev": "pnpm run build-scripts --watch", diff --git a/packages/scripts/src/bin.ts b/packages/scripts/src/bin.ts index d97dfcff..454d377a 100644 --- a/packages/scripts/src/bin.ts +++ b/packages/scripts/src/bin.ts @@ -3,7 +3,7 @@ import assert from 'node:assert'; import child from 'node:child_process'; import fs from 'node:fs'; -import { paths } from './utils/paths'; +import { paths } from './utils/index.js'; const genCommand = (...params: (string | false | undefined | null)[]) => params.filter(Boolean).join(' '); diff --git a/packages/scripts/src/electron.ts b/packages/scripts/src/electron.ts index f36ce1ce..7382b177 100644 --- a/packages/scripts/src/electron.ts +++ b/packages/scripts/src/electron.ts @@ -1,6 +1,9 @@ import fs from 'node:fs'; +import { createRequire } from 'node:module'; import semver from 'semver'; +const require = createRequire(import.meta.url); + function getElectronMajorVer(): number { const pkg = require.resolve('electron/package.json'); diff --git a/packages/scripts/src/index.ts b/packages/scripts/src/index.ts index 833f939a..41538b92 100644 --- a/packages/scripts/src/index.ts +++ b/packages/scripts/src/index.ts @@ -1 +1 @@ -export * from './electron'; +export * from './electron.js'; diff --git a/packages/scripts/src/jest/jest.config.ts b/packages/scripts/src/jest/jest.config.ts index 8c932f0f..95e6e247 100644 --- a/packages/scripts/src/jest/jest.config.ts +++ b/packages/scripts/src/jest/jest.config.ts @@ -1,10 +1,13 @@ -import type { Config } from '@jest/types'; +import type { Config } from 'jest'; import fs from 'node:fs'; +import { createRequire } from 'node:module'; import path from 'node:path'; -import { paths } from '../utils'; +import { paths } from '../utils/index.js'; -function getConfig(): Config.InitialOptions { +const require = createRequire(import.meta.url); + +function getConfig(): Config { const packageJson = process.env.npm_package_json; const packageDir = packageJson ? path.dirname(packageJson) : process.cwd(); @@ -44,6 +47,7 @@ function getConfig(): Config.InitialOptions { '^react-native$': 'react-native-web', '^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy', '^src/(.*)$': '/src/$1', + '^(.*).js$': ['$1.js', '$1.ts'], }, moduleFileExtensions: ['js', 'json', 'jsx', 'node', 'ts', 'tsx', 'web.js', 'web.jsx', 'web.ts', 'web.tsx'], @@ -56,4 +60,6 @@ function getConfig(): Config.InitialOptions { }; } -export = getConfig(); +const config: Config = getConfig(); + +export default config; diff --git a/packages/scripts/src/jest/transform.babel.ts b/packages/scripts/src/jest/transform.babel.ts index a93344d7..d6772207 100644 --- a/packages/scripts/src/jest/transform.babel.ts +++ b/packages/scripts/src/jest/transform.babel.ts @@ -1,6 +1,9 @@ import type { TransformOptions } from '@babel/core'; import type { SyncTransformer } from '@jest/transform'; import babelJest from 'babel-jest'; +import { createRequire } from 'node:module'; + +const require = createRequire(import.meta.url); const transformer: SyncTransformer | Promise> = babelJest.createTransformer({ @@ -19,4 +22,4 @@ const transformer: SyncTransformer | Promise/packages/scripts/src` // `../..` points to `/packages/scripts` // `../../..` points to `/packages` // `../../../..` points to `` -const repo = path.resolve(__dirname, '../../../..'); +const repo = path.resolve(_dirname, '../../../..'); const build = path.resolve(repo, 'build'); const rootNodeModules = path.resolve(repo, 'node_modules'); diff --git a/packages/scripts/src/webpack/utils/getCacheIdentifier.ts b/packages/scripts/src/webpack/utils/getCacheIdentifier.ts index 8cccb75d..9f809e27 100644 --- a/packages/scripts/src/webpack/utils/getCacheIdentifier.ts +++ b/packages/scripts/src/webpack/utils/getCacheIdentifier.ts @@ -1,3 +1,7 @@ +import { createRequire } from 'node:module'; + +const require = createRequire(import.meta.url); + export function getCacheIdentifier(environment: string, packages: string[]) { let cacheIdentifier = environment == null ? '' : environment.toString(); for (const packageName of packages) { diff --git a/packages/scripts/src/webpack/webpack.main.config.ts b/packages/scripts/src/webpack/webpack.main.config.ts index ecbe80b7..d7031955 100644 --- a/packages/scripts/src/webpack/webpack.main.config.ts +++ b/packages/scripts/src/webpack/webpack.main.config.ts @@ -1,14 +1,19 @@ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; +import { createRequire } from 'node:module'; import path from 'node:path'; +import url from 'node:url'; import TerserPlugin from 'terser-webpack-plugin'; import type { Configuration, WebpackPluginInstance } from 'webpack'; -import { paths } from '../utils'; +import { paths } from '../utils/index.js'; -import { createEnvironmentHash } from './utils/createEnvironmentHash'; -import { getCacheIdentifier } from './utils/getCacheIdentifier'; -import { ReloadElectronWebpackPlugin } from './utils/reloadElectronWebpackPlugin'; -import { WebpackStatsPrettifyPlugin } from './utils/webpackStatsPrettifyPlugin'; +import { createEnvironmentHash } from './utils/createEnvironmentHash.js'; +import { getCacheIdentifier } from './utils/getCacheIdentifier.js'; +import { ReloadElectronWebpackPlugin } from './utils/reloadElectronWebpackPlugin.js'; +import { WebpackStatsPrettifyPlugin } from './utils/webpackStatsPrettifyPlugin.js'; + +const _filename = url.fileURLToPath(import.meta.url); +const require = createRequire(import.meta.url); const resolveAppMain = (relative: string) => path.resolve(paths.electronMain, relative); @@ -72,7 +77,7 @@ const factory: ConfigurationFactory = (env, argv) => { store: 'pack', buildDependencies: { defaultWebpack: ['webpack/lib/'], - config: [__filename], + config: [_filename], tsconfig: [appMainPaths.appTsConfig], }, }, @@ -258,4 +263,4 @@ const factory: ConfigurationFactory = (env, argv) => { return webpack; }; -export = factory; +export default factory; diff --git a/packages/scripts/tsconfig.json b/packages/scripts/tsconfig.json index 9f8a0452..dc604e8d 100644 --- a/packages/scripts/tsconfig.json +++ b/packages/scripts/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "@ter/tsconfigs/tsconfig.eslint.node.json", + "extends": "@ter/tsconfigs/tsconfig.node16.eslint.json", "compilerOptions": { - "incremental": false, "rootDir": "src" }, "include": ["src/**/*"], diff --git a/packages/scripts/tsconfigs/tsconfig.cjs.json b/packages/scripts/tsconfigs/tsconfig.dist.json similarity index 71% rename from packages/scripts/tsconfigs/tsconfig.cjs.json rename to packages/scripts/tsconfigs/tsconfig.dist.json index 1fa9cefe..8e590fee 100644 --- a/packages/scripts/tsconfigs/tsconfig.cjs.json +++ b/packages/scripts/tsconfigs/tsconfig.dist.json @@ -1,5 +1,5 @@ { - "extends": "@ter/tsconfigs/tsconfig.node.cjs.json", + "extends": "@ter/tsconfigs/tsconfig.node16.json", "compilerOptions": { "outDir": "../dist", "rootDir": "../src" diff --git a/packages/scripts/tsconfigs/tsconfig.types.json b/packages/scripts/tsconfigs/tsconfig.types.json index aab5661b..5fc8938a 100644 --- a/packages/scripts/tsconfigs/tsconfig.types.json +++ b/packages/scripts/tsconfigs/tsconfig.types.json @@ -1,5 +1,5 @@ { - "extends": "@ter/tsconfigs/tsconfig.node.types.json", + "extends": "@ter/tsconfigs/tsconfig.node16.types.json", "compilerOptions": { "outDir": "../dist", "rootDir": "../src" diff --git a/packages/tsconfigs/README.md b/packages/tsconfigs/README.md index ccdd29a0..191e93c4 100644 --- a/packages/tsconfigs/README.md +++ b/packages/tsconfigs/README.md @@ -4,15 +4,7 @@ Typescript configurations for ter. ## Usage -Your typescript configurations can be extended from -- `@ter/tsconfigs/tsconfig.base.json` -- `@ter/tsconfigs/tsconfig.bundler.json` -- `@ter/tsconfigs/tsconfig.bundler.react.json` -- `@ter/tsconfigs/tsconfig.bundler.types.json` -- `@ter/tsconfigs/tsconfig.eslint.bundler.json` -- `@ter/tsconfigs/tsconfig.eslint.node.json` -- `@ter/tsconfigs/tsconfig.node.cjs.json` -- `@ter/tsconfigs/tsconfig.node.types.json` +Your typescript configurations can be extended from this package. Then you need to specify the following options if need - `compilerOptions` diff --git a/packages/tsconfigs/tsconfig.eslint.bundler.json b/packages/tsconfigs/tsconfig.bundler.eslint.json similarity index 76% rename from packages/tsconfigs/tsconfig.eslint.bundler.json rename to packages/tsconfigs/tsconfig.bundler.eslint.json index a4da86e6..7114a611 100644 --- a/packages/tsconfigs/tsconfig.eslint.bundler.json +++ b/packages/tsconfigs/tsconfig.bundler.eslint.json @@ -1,6 +1,7 @@ { "extends": "./tsconfig.bundler.json", "compilerOptions": { + "incremental": false, "noEmit": true } } diff --git a/packages/tsconfigs/tsconfig.bundler.react.json b/packages/tsconfigs/tsconfig.bundler.react.json deleted file mode 100644 index 9e7e3318..00000000 --- a/packages/tsconfigs/tsconfig.bundler.react.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.bundler.json", - "compilerOptions": { - "jsx": "react-jsx", - "lib": ["DOM", "DOM.Iterable", "ESNext"] - } -} diff --git a/packages/tsconfigs/tsconfig.eslint.node.json b/packages/tsconfigs/tsconfig.eslint.node.json deleted file mode 100644 index f44da051..00000000 --- a/packages/tsconfigs/tsconfig.eslint.node.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "module": "CommonJS", - "noEmit": true - } -} diff --git a/packages/tsconfigs/tsconfig.node16.eslint.json b/packages/tsconfigs/tsconfig.node16.eslint.json new file mode 100644 index 00000000..a37e534c --- /dev/null +++ b/packages/tsconfigs/tsconfig.node16.eslint.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.node16.json", + "compilerOptions": { + "incremental": false, + "noEmit": true + } +} diff --git a/packages/tsconfigs/tsconfig.node.cjs.json b/packages/tsconfigs/tsconfig.node16.json similarity index 66% rename from packages/tsconfigs/tsconfig.node.cjs.json rename to packages/tsconfigs/tsconfig.node16.json index e081b265..5cdae29d 100644 --- a/packages/tsconfigs/tsconfig.node.cjs.json +++ b/packages/tsconfigs/tsconfig.node16.json @@ -1,6 +1,6 @@ { "extends": "./tsconfig.base.json", "compilerOptions": { - "module": "CommonJS" + "moduleResolution": "Node16" } } diff --git a/packages/tsconfigs/tsconfig.node.types.json b/packages/tsconfigs/tsconfig.node16.types.json similarity index 75% rename from packages/tsconfigs/tsconfig.node.types.json rename to packages/tsconfigs/tsconfig.node16.types.json index 748286fd..ffa030e8 100644 --- a/packages/tsconfigs/tsconfig.node.types.json +++ b/packages/tsconfigs/tsconfig.node16.types.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.node.cjs.json", + "extends": "./tsconfig.node16.json", "compilerOptions": { "declaration": true, "emitDeclarationOnly": true, diff --git a/packages/tsconfigs/tsconfig.react.eslint.json b/packages/tsconfigs/tsconfig.react.eslint.json new file mode 100644 index 00000000..73621607 --- /dev/null +++ b/packages/tsconfigs/tsconfig.react.eslint.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.react.json", + "compilerOptions": { + "incremental": false, + "noEmit": true + } +} diff --git a/packages/tsconfigs/tsconfig.react.json b/packages/tsconfigs/tsconfig.react.json new file mode 100644 index 00000000..8717f589 --- /dev/null +++ b/packages/tsconfigs/tsconfig.react.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "jsx": "react-jsx", + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "moduleResolution": "Bundler" + } +}