build: type checking during build

This commit is contained in:
2025-11-21 02:17:59 +02:00
parent a21dbb656b
commit 768c71b0d9
3 changed files with 92 additions and 2 deletions

View File

@@ -9,9 +9,9 @@
},
"scripts": {
"dev": "vite build --watch",
"build": "vue-tsc -b && vite build",
"build": "vite build",
"lint": "eslint src",
"format": "eslint --fix src && prettier --write {src/,README.md}",
"format": "eslint --fix src && prettier --write {vite.config.ts,src/,README.md}",
"prepare": "husky",
"gen": "simple-scaffold -c . -k"
},
@@ -46,6 +46,7 @@
"typescript": "5.9.2",
"typescript-eslint": "^8.47.0",
"vite": "^6.4.1",
"vite-plugin-checker": "^0.11.0",
"vue-router": "^4.6.3",
"vue-tsc": "^2.2.12"
}

85
pnpm-lock.yaml generated
View File

@@ -84,6 +84,9 @@ importers:
vite:
specifier: ^6.4.1
version: 6.4.1(@types/node@20.17.10)(sass-embedded@1.93.3)(sass@1.94.2)(yaml@2.8.1)
vite-plugin-checker:
specifier: ^0.11.0
version: 0.11.0(eslint@9.39.1)(meow@13.2.0)(optionator@0.9.4)(stylelint@16.11.0(typescript@5.9.2))(typescript@5.9.2)(vite@6.4.1(@types/node@20.17.10)(sass-embedded@1.93.3)(sass@1.94.2)(yaml@2.8.1))(vue-tsc@2.2.12(typescript@5.9.2))
vue-router:
specifier: ^4.6.3
version: 4.6.3(vue@3.5.24(typescript@5.9.2))
@@ -2797,6 +2800,10 @@ packages:
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
engines: {node: '>=0.10.0'}
npm-run-path@6.0.0:
resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==}
engines: {node: '>=18'}
nth-check@2.1.1:
resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}
@@ -2896,6 +2903,10 @@ packages:
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'}
path-key@4.0.0:
resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==}
engines: {node: '>=12'}
path-parse@1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
@@ -3615,6 +3626,9 @@ packages:
resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==}
engines: {node: '>=0.6.0'}
tiny-invariant@1.3.3:
resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==}
tinyglobby@0.2.15:
resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==}
engines: {node: '>=12.0.0'}
@@ -3715,6 +3729,10 @@ packages:
undici-types@6.19.8:
resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
unicorn-magic@0.3.0:
resolution: {integrity: sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==}
engines: {node: '>=18'}
unified@11.0.5:
resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==}
@@ -3778,6 +3796,43 @@ packages:
vfile@6.0.3:
resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==}
vite-plugin-checker@0.11.0:
resolution: {integrity: sha512-iUdO9Pl9UIBRPAragwi3as/BXXTtRu4G12L3CMrjx+WVTd9g/MsqNakreib9M/2YRVkhZYiTEwdH2j4Dm0w7lw==}
engines: {node: '>=16.11'}
peerDependencies:
'@biomejs/biome': '>=1.7'
eslint: '>=7'
meow: ^13.2.0
optionator: ^0.9.4
oxlint: '>=1'
stylelint: '>=16'
typescript: '*'
vite: '>=5.4.20'
vls: '*'
vti: '*'
vue-tsc: ~2.2.10 || ^3.0.0
peerDependenciesMeta:
'@biomejs/biome':
optional: true
eslint:
optional: true
meow:
optional: true
optionator:
optional: true
oxlint:
optional: true
stylelint:
optional: true
typescript:
optional: true
vls:
optional: true
vti:
optional: true
vue-tsc:
optional: true
vite-plugin-css-injected-by-js@3.5.2:
resolution: {integrity: sha512-2MpU/Y+SCZyWUB6ua3HbJCrgnF0KACAsmzOQt1UvRVJCGF6S8xdA3ZUhWcWdM9ivG4I5az8PnQmwwrkC2CAQrQ==}
peerDependencies:
@@ -7089,6 +7144,11 @@ snapshots:
normalize-path@3.0.0: {}
npm-run-path@6.0.0:
dependencies:
path-key: 4.0.0
unicorn-magic: 0.3.0
nth-check@2.1.1:
dependencies:
boolbase: 1.0.0
@@ -7212,6 +7272,8 @@ snapshots:
path-key@3.1.1: {}
path-key@4.0.0: {}
path-parse@1.0.7: {}
path-posix@1.0.0:
@@ -8043,6 +8105,8 @@ snapshots:
dependencies:
setimmediate: 1.0.5
tiny-invariant@1.3.3: {}
tinyglobby@0.2.15:
dependencies:
fdir: 6.5.0(picomatch@4.0.3)
@@ -8154,6 +8218,8 @@ snapshots:
undici-types@6.19.8:
optional: true
unicorn-magic@0.3.0: {}
unified@11.0.5:
dependencies:
'@types/unist': 3.0.3
@@ -8244,6 +8310,25 @@ snapshots:
'@types/unist': 3.0.3
vfile-message: 4.0.3
vite-plugin-checker@0.11.0(eslint@9.39.1)(meow@13.2.0)(optionator@0.9.4)(stylelint@16.11.0(typescript@5.9.2))(typescript@5.9.2)(vite@6.4.1(@types/node@20.17.10)(sass-embedded@1.93.3)(sass@1.94.2)(yaml@2.8.1))(vue-tsc@2.2.12(typescript@5.9.2)):
dependencies:
'@babel/code-frame': 7.27.1
chokidar: 4.0.3
npm-run-path: 6.0.0
picocolors: 1.1.1
picomatch: 4.0.3
tiny-invariant: 1.3.3
tinyglobby: 0.2.15
vite: 6.4.1(@types/node@20.17.10)(sass-embedded@1.93.3)(sass@1.94.2)(yaml@2.8.1)
vscode-uri: 3.1.0
optionalDependencies:
eslint: 9.39.1
meow: 13.2.0
optionator: 0.9.4
stylelint: 16.11.0(typescript@5.9.2)
typescript: 5.9.2
vue-tsc: 2.2.12(typescript@5.9.2)
vite-plugin-css-injected-by-js@3.5.2(vite@6.4.1(@types/node@20.17.10)(sass-embedded@1.93.3)(sass@1.94.2)(yaml@2.8.1)):
dependencies:
vite: 6.4.1(@types/node@20.17.10)(sass-embedded@1.93.3)(sass@1.94.2)(yaml@2.8.1)

View File

@@ -1,6 +1,7 @@
import { createAppConfig } from '@nextcloud/vite-config'
import path from 'path'
import { visualizer } from 'rollup-plugin-visualizer'
import checker from 'vite-plugin-checker'
const manualChunksList = [
'emoji-mart-vue-fast',
@@ -45,6 +46,9 @@ export default createAppConfig(
},
},
plugins: [
checker({
vueTsc: true,
}),
visualizer({
open: process.env.VITE_BUILD_ANALYZE === 'true',
filename: 'stats.html',