Skip to content

Commit

Permalink
chore: update typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
lemueldls committed Jun 11, 2023
1 parent ad85325 commit d11fc3b
Show file tree
Hide file tree
Showing 18 changed files with 311 additions and 99 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
"hub": "yarn packages hub",
"start": "yarn packages start",
"build": "yarn packages build",
"lint:script": "eslint packages/**/*.{ts,astro} --ignore-path .gitignore",
"lint:style": "stylelint packages/**/*.{scss,astro} --ignore-path .gitignore",
"lint:script": "eslint --cache packages/**/*.{ts,astro} --ignore-path .gitignore",
"lint:style": "stylelint --cache packages/**/*.{scss,astro} --ignore-path .gitignore",
"lint:fix": "yarn lint:script --fix && yarn lint:style --fix",
"lint": "yarn lint:script && yarn lint:style",
"test:run": "yarn packages test:run",
"test:open": "yarn packages test:open",
"map": "yarn packages map"
},
"lint-staged": {
"*.ts": "eslint --cache --fix",
"*.scss": "stylelint --cache --fix"
"*.{ts,astro}": "eslint --cache --fix",
"*.{scss,astro}": "stylelint --cache --fix"
},
"devDependencies": {
"@astrojs/ts-plugin": "^1.0.9",
"@astrojs/ts-plugin": "^1.0.10",
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@types/node": "^20.2.5",
Expand Down Expand Up @@ -60,7 +60,7 @@
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-standard-scss": "^9.0.0",
"stylelint-rem-over-px": "^1.0.0",
"typescript": "^5.0.4"
"typescript": "^5.1.3"
},
"workspaces": [
"packages/*"
Expand Down
4 changes: 1 addition & 3 deletions packages/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"name": "@kaetram/admin",
"type": "module",
"scripts": {
"hub": "astro dev",
"build": "astro check && tsc --noEmit && astro build",
"start": "node ./dist/server/entry.mjs"
"hub": "astro dev"
},
"dependencies": {
"@astrojs/node": "^5.2.0",
Expand Down
4 changes: 1 addition & 3 deletions packages/admin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"extends": "../../tsconfig.json"
}
{ "extends": "../../tsconfig.json" }
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"internal-ip": "^7.0.0",
"sass": "^1.62.1",
"sirv-cli": "^2.0.2",
"typescript": "^5.0.4",
"typescript": "^5.1.3",
"vite-plugin-glsl": "^1.1.2",
"vite-plugin-pwa": "^0.16.3"
}
Expand Down
4 changes: 1 addition & 3 deletions packages/client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"extends": "../../tsconfig.json"
}
{ "extends": "../../tsconfig.json" }
4 changes: 1 addition & 3 deletions packages/common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"extends": "../../tsconfig.json"
}
{ "extends": "../../tsconfig.json" }
8 changes: 0 additions & 8 deletions packages/e2e/.eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions packages/e2e/cypress/support/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Cypress.Commands.add('createPlayerInventory', (playerInventory: PlayerInventory)
});

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Cypress {
interface Chainable {
createPlayerInfo(playerInfo: PlayerInfo): Chainable<boolean>;
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"esbuild": "^0.14.53",
"start-server-and-test": "^1.14.0",
"tsx": "^3.12.7",
"typescript": "^5.0.4"
"typescript": "^5.1.3"
},
"cypress-cucumber-preprocessor": {
"stepDefinitions": [
Expand Down
4 changes: 1 addition & 3 deletions packages/e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"extends": "../../tsconfig.json"
}
{ "extends": "../../tsconfig.json" }
9 changes: 5 additions & 4 deletions packages/hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "@kaetram/hub",
"type": "module",
"scripts": {
"hub": "tsx watch --preserve-symlinks --clear-screen=false ./src/main.ts",
"build": "tsc --noEmit",
"start": "tsx --preserve-symlinks ./src/main.ts"
"hub": "tsx --watch --preserve-symlinks ./src/main.ts",
"build": "tsc && esbuild --platform=node --format=esm --outdir=dist --bundle --minify --sourcemap src/main.ts",
"start": "node --enable-source-maps ./dist/main.js"
},
"dependencies": {
"@kaetram/common": "workspace:*",
Expand All @@ -27,6 +27,7 @@
"@types/dotenv-parse-variables": "^2.0.1",
"@types/express": "^4.17.13",
"@types/nodemailer": "^6",
"typescript": "^5.0.4"
"esbuild": "^0.18.0",
"typescript": "^5.1.3"
}
}
4 changes: 1 addition & 3 deletions packages/hub/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"extends": "../../tsconfig.json"
}
{ "extends": "../../tsconfig.json" }
9 changes: 5 additions & 4 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "@kaetram/server",
"type": "module",
"scripts": {
"start": "tsx --preserve-symlinks ./src/main.ts",
"dev": "tsx --watch --preserve-symlinks ./src/main.ts",
"build": "tsc --noEmit"
"dev": "tsx watch --preserve-symlinks --clear-screen=false ./src/main.ts",
"build": "tsc && esbuild --bundle --minify --sourcemap --platform=node --format=esm --outdir=dist src/main.ts",
"start": "node --enable-source-maps ./dist/main.js"
},
"dependencies": {
"@kaetram/common": "workspace:*",
Expand All @@ -28,6 +28,7 @@
"@types/express": "^4.17.13",
"@types/sanitizer": "^0.0.28",
"@types/websocket": "^1.0.5",
"typescript": "^5.0.4"
"esbuild": "^0.18.0",
"typescript": "^5.1.3"
}
}
4 changes: 1 addition & 3 deletions packages/server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"extends": "../../tsconfig.json",
}
{ "extends": "../../tsconfig.json" }
2 changes: 1 addition & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"websocket": "^1.0.34"
},
"devDependencies": {
"typescript": "^5.0.4"
"typescript": "^5.1.3"
}
}
4 changes: 1 addition & 3 deletions packages/tools/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"extends": "../../tsconfig.json",
}
{ "extends": "../../tsconfig.json" }
58 changes: 39 additions & 19 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,52 @@
{
"compilerOptions": {
"strict": true,
"target": "ESNext",
"module": "ESNext",
"incremental": true,
// "composite": true,
"tsBuildInfoFile": "./.tsbuildinfo",

"allowSyntheticDefaultImports": true,
"moduleResolution": "Node",
"target": "esnext",
"moduleDetection": "force",

"module": "esnext",
"rootDir": "./",
"moduleResolution": "node",
"baseUrl": "./packages",
"paths": { "@kaetram/*": ["*"] },
"types": ["@types/node", "@kaetram/common"],
"allowImportingTsExtensions": true,
// "resolvePackageJsonExports": true,
// "resolvePackageJsonImports": true,
"resolveJsonModule": true,
"verbatimModuleSyntax": true,
"preserveSymlinks": true,
"forceConsistentCasingInFileNames": true,
"allowArbitraryExtensions": true,

"skipLibCheck": true,
"incremental": true,
"noEmit": true,
"allowJs": false,
"checkJs": false,
// "maxNodeModuleJsDepth": 1,

"disableSizeLimit": false,
"plugins": [{ "name": "@astrojs/ts-plugin" }],

"noEmit": true,

"isolatedModules": true,
"sourceMap": true,
"verbatimModuleSyntax": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": false,
"preserveSymlinks": true,
"forceConsistentCasingInFileNames": true,

"strictNullChecks": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
// "exactOptionalPropertyTypes": true,
// "noImplicitReturns": true,
// "noFallthroughCasesInSwitch": true,
// "noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": false,
// "noPropertyAccessFromIndexSignature": true,
"allowUnusedLabels": false,
"allowUnreachableCode": false,

"rootDir": "./",
"baseUrl": "./packages",
"paths": { "@kaetram/*": ["*"] },
"types": ["@types/node", "@kaetram/common"],
"plugins": [{ "name": "@astrojs/ts-plugin" }]
"skipLibCheck": true
}
}
Loading

0 comments on commit d11fc3b

Please sign in to comment.