Skip to content

Commit 615ad81

Browse files
committed
refactor(electron)!: update tsconfig files
1 parent 599d5f4 commit 615ad81

File tree

9 files changed

+43392
-37
lines changed

9 files changed

+43392
-37
lines changed

package-lock.json

Lines changed: 43354 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
},
2222
"devDependencies": {
2323
"@faker-js/faker": "^8.0.2",
24+
"@tsconfig/node18": "^18.2.0",
25+
"@types/node": "^18.16.19",
2426
"@types/sinon": "^10.0.13",
2527
"@typescript-eslint/eslint-plugin": "^5.58.0",
2628
"@typescript-eslint/parser": "^5.58.0",
@@ -39,6 +41,7 @@
3941
"vue-tsc": "^1.2.0"
4042
},
4143
"dependencies": {
44+
"@vue/tsconfig": "^0.4.0",
4245
"changelogen": "^0.5.3",
4346
"tsup": "^7.1.0",
4447
"tsx": "^3.12.7",

packages/electron/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
"@electron-forge/maker-zip": "^6.2.1",
3232
"@manypkg/find-root": "^1.1.0",
3333
"@npmcli/arborist": "^6.2.7",
34-
"@types/node": "^18.15.11",
35-
"@vue/tsconfig": "^0.1.3",
3634
"electron": "^24.1.2",
3735
"electron-devtools-installer": "^3.2.0",
3836
"npm-run-all": "^4.1.5",

packages/electron/src-electron/workspace-repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'path'
33
import uniqBy from 'lodash/uniqBy'
44
import { app } from 'electron'
55

6-
// import WorkspaceNotFound from '@index-san/core/exceptions/base'
6+
import WorkspaceNotFound from '@index-san/core/exceptions/base'
77
import { isJSON } from '@index-san/core/services/utils'
88

99
import type Workspace from '@index-san/core/entities/workspace'

packages/electron/tsconfig.app.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extends": [
3+
"@tsconfig/node18/tsconfig.json",
4+
"@vue/tsconfig/tsconfig.json"
5+
],
6+
"include": [
7+
"env.d.ts",
8+
"src/**/*",
9+
"src/**/*.vue"
10+
],
11+
"compilerOptions": {
12+
"strictPropertyInitialization": false,
13+
"skipLibCheck": true,
14+
"composite": true,
15+
"baseUrl": ".",
16+
"paths": {
17+
"@client/*": ["../app/*"],
18+
"@index-san/core/*": ["../core/*"],
19+
"@composables/*": [ "../app/composables/*" ],
20+
"@plugins/*": [ "../app/plugins/*" ],
21+
"@modules/*": [ "../app/modules/*" ],
22+
"@store/*": [ "../app/store/*"]
23+
}
24+
}
25+
}

packages/electron/tsconfig.json

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
11
{
2-
"extends": "@vue/tsconfig/tsconfig.web.json",
3-
"include": [
4-
"env.d.ts",
5-
"src/**/*",
6-
"src-electron/*",
7-
"src/**/*.vue",
8-
"../app/auto-import.d.ts"
9-
],
10-
"compilerOptions": {
11-
"importsNotUsedAsValues": "preserve",
12-
"strictPropertyInitialization": false,
13-
"baseUrl": ".",
14-
"paths": {
15-
"@client/*": ["../app/*"],
16-
"@index-san/core/*": ["../core/*"],
17-
"@composables/*": [ "../app/composables/*" ],
18-
"@plugins/*": [ "../app/plugins/*" ],
19-
"@modules/*": [ "../app/modules/*" ],
20-
"@store/*": [ "../app/store/*"]
21-
}
22-
},
23-
2+
"files": [],
243
"references": [
25-
{ "path": "./tsconfig.config.json" }
4+
{ "path": "./tsconfig.node.json" },
5+
{ "path": "./tsconfig.app.json" }
266
]
277
}

packages/electron/tsconfig.config.json renamed to packages/electron/tsconfig.node.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"extends": "@vue/tsconfig/tsconfig.node.json",
3-
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
2+
"extends": "@tsconfig/node18/tsconfig.json",
3+
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*", "src-electron/*.ts"],
44
"compilerOptions": {
55
"composite": true,
66
"types": ["node"]

packages/electron/vite.config.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
import { defineConfig, mergeConfig } from 'vite'
1+
import { mergeConfig } from 'vite'
22
import electron from 'vite-plugin-electron'
33

4-
// eslint-disable-next-line
54
// @ts-ignore
6-
import viteConfig from '@index-san/app/vite.config'
5+
import baseConfig from '@index-san/app/vite.base.config'
76

8-
export default mergeConfig(
9-
viteConfig,
10-
defineConfig({
7+
export default mergeConfig(baseConfig, {
118
plugins: [
129
electron([
1310
{
@@ -21,5 +18,5 @@ export default mergeConfig(
2118
},
2219
]),
2320
],
24-
})
21+
}
2522
)

packages/tauri/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
"@tauri-apps/cli": "^1.2.3"
1616
},
1717
"devDependencies": {
18-
"@types/node": "^18.15.11",
19-
"@vue/tsconfig": "^0.1.3",
2018
"npm-run-all": "^4.1.5"
2119
}
2220
}

0 commit comments

Comments
 (0)