Skip to content

Commit

Permalink
Merge pull request #830 from gjoseph/some-tsconfig-alignment
Browse files Browse the repository at this point in the history
Align tsconfig.json files
  • Loading branch information
gjoseph authored Dec 13, 2024
2 parents e5ac888 + 88f4ea0 commit 69ebbf0
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 30 deletions.
1 change: 1 addition & 0 deletions tichu-clients/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
node_modules/
lib/
build/
dist/
storybook-static/
*.local
*.log
Expand Down
19 changes: 11 additions & 8 deletions tichu-clients/packages/tichu-client-ts-lib/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{
"compilerOptions": {
"target": "es2023", // when we had es2019, we left a comment to say that: Node doesn't understand nullish coalescing or optional chaining, so instruct ts to transpile
"target": "es2023",
"module": "nodenext",
"moduleResolution": "nodenext",
"esModuleInterop": true,
"resolveJsonModule": true,
"lib": ["es2023", "dom"],
"types": ["node", "fs-extra"],

"allowJs": false,
"declaration": true,
"declarationMap": true,
"experimentalDecorators": true,
"outDir": "./lib",
"rootDir": "./src",
"importHelpers": true,
"strict": true,
"types": ["node", "fs-extra"],
"esModuleInterop": false,
"moduleResolution": "nodenext",
"resolveJsonModule": true,
"importHelpers": true

"outDir": "./lib",
"rootDir": "./src"
},
"exclude": ["node_modules", "lib", "templates"]
}
19 changes: 11 additions & 8 deletions tichu-clients/packages/tichu-term-client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{
"compilerOptions": {
"target": "es2023", // when we had es2019, we left a comment to say that: Node doesn't understand nullish coalescing or optional chaining, so instruct ts to transpile
"target": "es2023",
"module": "commonjs",
"moduleResolution": "node",
"esModuleInterop": true,
"resolveJsonModule": true,
"lib": ["es2023", "dom"],
"types": ["node", "fs-extra"],

"allowJs": false,
"declaration": true,
"declarationMap": true,
"experimentalDecorators": true,
"outDir": "./lib",
"rootDir": "./src",
"importHelpers": true,
"strict": true,
"types": ["node", "fs-extra"],
"esModuleInterop": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"importHelpers": true

"outDir": "./lib",
"rootDir": "./src"
},
"exclude": ["node_modules", "lib", "templates"]
}
File renamed without changes.
21 changes: 15 additions & 6 deletions tichu-clients/packages/tichu-web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
{
"compilerOptions": {
"target": "es2023",
"module": "nodenext",
"moduleResolution": "nodenext",
"esModuleInterop": true,
"resolveJsonModule": true,
"lib": ["dom", "dom.iterable", "esnext"],
"types": ["vite/client", "vite-plugin-svgr/client"],
"allowJs": true,

"allowJs": false,
"declaration": true,
"declarationMap": true,
"experimentalDecorators": true,
"importHelpers": true,
"strict": true,

"outDir": "./lib",
"rootDir": "./src",

"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "nodenext",
"moduleResolution": "nodenext",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
Expand Down
10 changes: 2 additions & 8 deletions tichu-clients/packages/tichu-web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@ import reactRefresh from "@vitejs/plugin-react";
// import eslint from "vite-plugin-eslint";
import svgrPlugin from "vite-plugin-svgr";

// https://vitejs.dev/config/
export default defineConfig({
// This changes the out put dir from dist to build
// comment this out if that isn't relevant for your project
build: {
outDir: "build",
},
resolve: {
preserveSymlinks: true, // we this for the build to work with workspaces, not 100% why
preserveSymlinks: true, // we need this for the build to work with workspaces, not 100% why
},
plugins: [
reactRefresh(),
Expand All @@ -25,6 +19,6 @@ export default defineConfig({
test: {
environment: "jsdom",
globals: false, // this is the default and I agree -- let's use explicit imports instead
setupFiles: "./src/test/setup.js",
setupFiles: "./src/test/setup.ts",
},
});

0 comments on commit 69ebbf0

Please sign in to comment.