feat: 添加 vite-plugin-checker 插件,配置 ESLint 和 Vue 类型检查
This commit is contained in:
@ -138,6 +138,7 @@
|
||||
"unplugin-vue-markdown": "^28.3.1",
|
||||
"unplugin-vue-router": "^0.12.0",
|
||||
"vite": "^6.2.4",
|
||||
"vite-plugin-checker": "^0.9.1",
|
||||
"vite-plugin-fake-server": "^2.2.0",
|
||||
"vite-plugin-purgecss-updated-v5": "^1.2.4",
|
||||
"vite-plugin-singlefile": "^2.2.0",
|
||||
|
60
pnpm-lock.yaml
generated
60
pnpm-lock.yaml
generated
@ -296,6 +296,9 @@ importers:
|
||||
vite:
|
||||
specifier: ^6.2.4
|
||||
version: 6.2.4(@types/node@22.13.14)(jiti@2.4.2)(less@4.2.2)(sass-embedded@1.86.0)(terser@5.39.0)(yaml@2.7.1)
|
||||
vite-plugin-checker:
|
||||
specifier: ^0.9.1
|
||||
version: 0.9.1(eslint@9.23.0(jiti@2.4.2))(optionator@0.9.4)(typescript@5.8.2)(vite@6.2.4(@types/node@22.13.14)(jiti@2.4.2)(less@4.2.2)(sass-embedded@1.86.0)(terser@5.39.0)(yaml@2.7.1))(vue-tsc@2.2.8(typescript@5.8.2))
|
||||
vite-plugin-fake-server:
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0
|
||||
@ -4262,6 +4265,9 @@ packages:
|
||||
resolution: {integrity: sha512-B71/4oyj61iNH0KeCamLuE2rmKuTO5byTOSVwECM5FA7TiAiAW+UqTKZ9ERueC4qvgSttUhdmq1mXC3kJqGX7A==}
|
||||
engines: {node: '>=12.22'}
|
||||
|
||||
tiny-invariant@1.3.3:
|
||||
resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==}
|
||||
|
||||
tinyexec@0.3.2:
|
||||
resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==}
|
||||
|
||||
@ -4562,6 +4568,40 @@ packages:
|
||||
peerDependencies:
|
||||
vite: ^6.2.4
|
||||
|
||||
vite-plugin-checker@0.9.1:
|
||||
resolution: {integrity: sha512-neH3CSNWdkZ+zi+WPt/0y5+IO2I0UAI0NX6MaXqU/KxN1Lz6np/7IooRB6VVAMBa4nigqm1GRF6qNa4+EL5jDQ==}
|
||||
engines: {node: '>=14.16'}
|
||||
peerDependencies:
|
||||
'@biomejs/biome': '>=1.7'
|
||||
eslint: '>=7'
|
||||
meow: ^13.2.0
|
||||
optionator: ^0.9.4
|
||||
stylelint: '>=16'
|
||||
typescript: '*'
|
||||
vite: ^6.2.4
|
||||
vls: '*'
|
||||
vti: '*'
|
||||
vue-tsc: ^2.2.8
|
||||
peerDependenciesMeta:
|
||||
'@biomejs/biome':
|
||||
optional: true
|
||||
eslint:
|
||||
optional: true
|
||||
meow:
|
||||
optional: true
|
||||
optionator:
|
||||
optional: true
|
||||
stylelint:
|
||||
optional: true
|
||||
typescript:
|
||||
optional: true
|
||||
vls:
|
||||
optional: true
|
||||
vti:
|
||||
optional: true
|
||||
vue-tsc:
|
||||
optional: true
|
||||
|
||||
vite-plugin-fake-server@2.2.0:
|
||||
resolution: {integrity: sha512-RP691997Q207nenNMhg7cvYyBXZyjqXwApTBa+a9kHmILgcAU2w4TMRDiAhIU0HPLAAR5MHlWTEpxA9Tbf+v8g==}
|
||||
|
||||
@ -8910,6 +8950,8 @@ snapshots:
|
||||
|
||||
throttle-debounce@5.0.2: {}
|
||||
|
||||
tiny-invariant@1.3.3: {}
|
||||
|
||||
tinyexec@0.3.2: {}
|
||||
|
||||
tinyglobby@0.2.12:
|
||||
@ -9273,6 +9315,24 @@ snapshots:
|
||||
dependencies:
|
||||
vite: 6.2.4(@types/node@22.13.14)(jiti@2.4.2)(less@4.2.2)(sass-embedded@1.86.0)(terser@5.39.0)(yaml@2.7.1)
|
||||
|
||||
vite-plugin-checker@0.9.1(eslint@9.23.0(jiti@2.4.2))(optionator@0.9.4)(typescript@5.8.2)(vite@6.2.4(@types/node@22.13.14)(jiti@2.4.2)(less@4.2.2)(sass-embedded@1.86.0)(terser@5.39.0)(yaml@2.7.1))(vue-tsc@2.2.8(typescript@5.8.2)):
|
||||
dependencies:
|
||||
'@babel/code-frame': 7.26.2
|
||||
chokidar: 4.0.3
|
||||
npm-run-path: 6.0.0
|
||||
picocolors: 1.1.1
|
||||
picomatch: 4.0.2
|
||||
strip-ansi: 7.1.0
|
||||
tiny-invariant: 1.3.3
|
||||
tinyglobby: 0.2.12
|
||||
vite: 6.2.4(@types/node@22.13.14)(jiti@2.4.2)(less@4.2.2)(sass-embedded@1.86.0)(terser@5.39.0)(yaml@2.7.1)
|
||||
vscode-uri: 3.1.0
|
||||
optionalDependencies:
|
||||
eslint: 9.23.0(jiti@2.4.2)
|
||||
optionator: 0.9.4
|
||||
typescript: 5.8.2
|
||||
vue-tsc: 2.2.8(typescript@5.8.2)
|
||||
|
||||
vite-plugin-fake-server@2.2.0:
|
||||
dependencies:
|
||||
bundle-import: 0.0.2
|
||||
|
@ -23,6 +23,7 @@ import { getPascalCaseRouteName, VueRouterAutoImports } from 'unplugin-vue-route
|
||||
import VueRouter from 'unplugin-vue-router/vite';
|
||||
import { createUtils4uAutoImports } from 'utils4u/auto-imports';
|
||||
import { PluginOption } from 'vite';
|
||||
import checker from 'vite-plugin-checker';
|
||||
import { vitePluginFakeServer } from 'vite-plugin-fake-server';
|
||||
import pluginPurgeCss from 'vite-plugin-purgecss-updated-v5';
|
||||
import { viteSingleFile } from 'vite-plugin-singlefile';
|
||||
@ -165,6 +166,21 @@ export function Plugins() {
|
||||
include: 'fake',
|
||||
}),
|
||||
|
||||
// https://vite-plugin-checker.netlify.app/introduction/introduction.html
|
||||
// XXX: 配置更多的检查项
|
||||
checker({
|
||||
eslint: {
|
||||
lintCommand: 'eslint ./src',
|
||||
useFlatConfig: true,
|
||||
},
|
||||
vueTsc: true,
|
||||
overlay: {
|
||||
initialIsOpen: false,
|
||||
},
|
||||
terminal: true,
|
||||
enableBuild: true,
|
||||
}),
|
||||
|
||||
viteStaticCopy({
|
||||
targets: [
|
||||
// globalThis.CESIUM_BASE_URL = 'https://digitalarsenal.io/';
|
||||
|
Reference in New Issue
Block a user