Skip to content

Commit 0c0dbe4

Browse files
committed
build(frontend): migrate js to ts
1 parent bb45a08 commit 0c0dbe4

File tree

4 files changed

+56
-35
lines changed

4 files changed

+56
-35
lines changed

frontend/package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,48 +13,48 @@
1313
},
1414
"scripts": {
1515
"dev": "vite",
16-
"build": "vite build",
16+
"build": "vue-tsc --noEmit && vite build",
1717
"preview": "vite preview",
1818
"serve": "vite build && vite preview",
1919
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
2020
"format": "prettier --write src/"
2121
},
2222
"dependencies": {
23-
"@iconify/vue": "^4.1.1",
24-
"@vueuse/core": "^10.6.1",
25-
"build-url": "^6.0.1",
23+
"@iconify/vue": "^4.1.2",
24+
"@vueuse/core": "^10.11.1",
2625
"copy-to-clipboard": "^3.3.3",
2726
"normalize.css": "^8.0.1",
2827
"postcss-uncss": "^0.17.0",
29-
"query-string": "^8.1.0",
28+
"query-string": "^8.2.0",
3029
"set-interval-async": "^3.0.3",
31-
"typescript": "^5.7.2",
3230
"uncss": "^0.17.3",
31+
"unplugin-vue-router": "^0.10.9",
3332
"v-click-outside": "^3.2.0",
34-
"vue-i18n": "9",
35-
"vue-template-compiler": "^2.7.15"
33+
"vue-i18n": "^9.14.2",
34+
"vue-template-compiler": "^2.7.16"
3635
},
3736
"devDependencies": {
38-
"@intlify/unplugin-vue-i18n": "^1.5.0",
39-
"@plugin-web-update-notification/vite": "^1.6.6",
40-
"@rushstack/eslint-patch": "^1.3.3",
37+
"@intlify/unplugin-vue-i18n": "^1.6.0",
38+
"@plugin-web-update-notification/vite": "^1.7.1",
39+
"@rushstack/eslint-patch": "^1.10.4",
4140
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
4241
"@vitejs/plugin-vue": "^4.6.2",
4342
"@vue/eslint-config-prettier": "^8.0.0",
4443
"@vue/runtime-dom": "^3.5.13",
45-
"autoprefixer": "^10.4.16",
46-
"eslint": "^9.15.0",
47-
"eslint-config-prettier": "^9.0.0",
48-
"eslint-plugin-vue": "^9.17.0",
49-
"naive-ui": "^2.35.0",
50-
"pinia": "^2.1.7",
51-
"postcss": "^8.4.31",
52-
"prettier": "^3.0.3",
53-
"sass": "^1.69.5",
44+
"autoprefixer": "^10.4.20",
45+
"eslint": "^9.16.0",
46+
"eslint-config-prettier": "^9.1.0",
47+
"eslint-plugin-vue": "^9.32.0",
48+
"naive-ui": "^2.40.3",
49+
"pinia": "^2.3.0",
50+
"postcss": "^8.4.49",
51+
"prettier": "^3.4.2",
52+
"sass": "^1.82.0",
53+
"typescript": "5.6.2",
5454
"unplugin-vue-components": "^0.25.2",
55-
"vite": "^4.4.11",
56-
"vue": "^3.3.4",
57-
"vue-router": "^4.2.5",
58-
"vue-tsc": "^2.1.10"
55+
"vite": "^4.5.5",
56+
"vue": "^3.5.13",
57+
"vue-router": "^4.5.0",
58+
"vue-tsc": "2.0.29"
5959
}
6060
}

frontend/tsconfig.json

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
{
22
"compilerOptions": {
3-
"target": "ESNext",
3+
"target": "ES2022",
4+
"useDefineForClassFields": true,
45
"module": "ESNext",
5-
"strict": true,
6-
"jsx": "preserve",
7-
"moduleResolution": "node",
8-
"esModuleInterop": true,
6+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
97
"skipLibCheck": true,
10-
"forceConsistentCasingInFileNames": true,
11-
"baseUrl": ".",
8+
"moduleResolution": "node",
9+
"allowImportingTsExtensions": false,
10+
"allowSyntheticDefaultImports": true,
11+
"resolveJsonModule": true,
12+
"isolatedModules": true,
13+
"noEmit": true,
14+
"jsx": "preserve",
15+
"strict": true,
16+
"noUnusedLocals": true,
17+
"noUnusedParameters": true,
18+
"noFallthroughCasesInSwitch": true,
19+
"baseUrl": ".",
1220
"paths": {
13-
"@/*": ["src/*"]
14-
}
21+
"@/*": ["./src/*"]
22+
},
23+
"types": ["@intlify/unplugin-vue-i18n/messages"]
1524
},
16-
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
17-
}
25+
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "src/**/*.svg"],
26+
"references": [{ "path": "./tsconfig.node.json" }]
27+
}

frontend/tsconfig.node.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"compilerOptions": {
3+
"composite": true,
4+
"skipLibCheck": true,
5+
"module": "ESNext",
6+
"moduleResolution": "node",
7+
"allowSyntheticDefaultImports": true
8+
},
9+
"include": ["vite.config.ts"]
10+
}

frontend/vite-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

0 commit comments

Comments
 (0)