Skip to content

Commit 5f4a4db

Browse files
committed
chore: lint fix
1 parent 5bc13f1 commit 5f4a4db

File tree

23 files changed

+966
-1115
lines changed

23 files changed

+966
-1115
lines changed

build/plugins/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import vue from '@vitejs/plugin-vue'
22
import vueJsx from '@vitejs/plugin-vue-jsx'
33
import unocss from 'unocss/vite'
44
import vueDevTools from 'vite-plugin-vue-devtools'
5+
import type { PluginOption } from 'vite'
56
import { configCompressPlugin } from './compress'
67
import { configHtmlPlugin } from './html'
78
import { viteBuildInfo } from './info'
89
import unplugin from './unplugin'
9-
import type { PluginOption } from 'vite'
1010

1111
interface Options {
1212
isBuild: boolean

build/plugins/info.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import dayjs from 'dayjs'
22
import duration from 'dayjs/plugin/duration'
33
import pico from 'picocolors'
4-
import { getPackageSize } from '../utils'
5-
import type { Plugin } from 'vite'
64
import type { Dayjs } from 'dayjs'
5+
import type { Plugin } from 'vite'
6+
import { getPackageSize } from '../utils'
77

88
dayjs.extend(duration)
99

build/utils/index.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function formatBytes(bytes: number, decimals = 2) {
2222

2323
export function getPackageSize(
2424
folder: string,
25+
// eslint-disable-next-line ts/no-unsafe-function-type
2526
callback: Function,
2627
fileListTotal: number[] = [],
2728
): void {
@@ -30,10 +31,12 @@ export function getPackageSize(
3031
throw err
3132
let count = 0
3233
const checkEnd = () => {
33-
++count === files.length && callback(formatBytes(sum(fileListTotal)))
34+
if (++count === files.length) {
35+
callback(formatBytes(sum(fileListTotal)))
36+
}
3437
}
3538
files.forEach((item: string) => {
36-
stat(`${folder}/${item}`, async (err, stats) => {
39+
stat(`${folder}/${item}`, (err, stats) => {
3740
if (err)
3841
throw err
3942
if (stats.isFile()) {
@@ -45,7 +48,9 @@ export function getPackageSize(
4548
}
4649
})
4750
})
48-
files.length === 0 && callback()
51+
if (files.length === 0) {
52+
callback()
53+
}
4954
})
5055
}
5156

package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vue-starter",
33
"type": "module",
44
"version": "1.0.0",
5-
"packageManager": "pnpm@9.7.1",
5+
"packageManager": "pnpm@9.10.0",
66
"scripts": {
77
"bootstrap": "npm install",
88
"start": "npm run dev",
@@ -19,44 +19,44 @@
1919
"postinstall": "simple-git-hooks"
2020
},
2121
"dependencies": {
22-
"@vueuse/core": "^11.0.1",
23-
"axios": "^1.7.4",
22+
"@vueuse/core": "^11.0.3",
23+
"axios": "^1.7.7",
2424
"dayjs": "^1.11.13",
2525
"lodash-es": "^4.17.21",
2626
"pinia": "^2.2.2",
2727
"qs": "^6.13.0",
28-
"vue": "^3.4.38",
29-
"vue-router": "^4.4.3"
28+
"vue": "^3.5.4",
29+
"vue-router": "^4.4.4"
3030
},
3131
"devDependencies": {
32-
"@coderwyd/eslint-config": "^2.6.4",
32+
"@coderwyd/eslint-config": "^2.7.2",
3333
"@types/fs-extra": "^11.0.4",
3434
"@types/lodash-es": "^4.17.12",
35-
"@types/node": "^22.5.0",
35+
"@types/node": "^22.5.4",
3636
"@types/qs": "^6.9.15",
37-
"@unocss/eslint-plugin": "^0.62.2",
38-
"@vitejs/plugin-vue": "^5.1.2",
37+
"@unocss/eslint-plugin": "^0.62.3",
38+
"@vitejs/plugin-vue": "^5.1.3",
3939
"@vitejs/plugin-vue-jsx": "^4.0.1",
4040
"cross-env": "^7.0.3",
41-
"cssnano": "^7.0.5",
41+
"cssnano": "^7.0.6",
4242
"dotenv": "^16.4.5",
43-
"eslint": "^9.9.0",
43+
"eslint": "^9.10.0",
4444
"fs-extra": "^11.2.0",
45-
"lint-staged": "^15.2.9",
46-
"picocolors": "^1.0.1",
47-
"sass": "^1.77.8",
45+
"lint-staged": "^15.2.10",
46+
"picocolors": "^1.1.0",
47+
"sass": "^1.78.0",
4848
"simple-git-hooks": "^2.11.1",
49-
"terser": "^5.31.6",
49+
"terser": "^5.32.0",
5050
"typescript": "~5.5.4",
51-
"unocss": "^0.62.2",
52-
"unplugin-auto-import": "^0.18.2",
53-
"unplugin-icons": "^0.19.2",
51+
"unocss": "^0.62.3",
52+
"unplugin-auto-import": "^0.18.3",
53+
"unplugin-icons": "^0.19.3",
5454
"unplugin-vue-components": "^0.27.4",
55-
"vite": "^5.4.2",
55+
"vite": "^5.4.4",
5656
"vite-plugin-compression": "^0.5.1",
5757
"vite-plugin-html": "^3.2.2",
58-
"vite-plugin-vue-devtools": "^7.3.8",
59-
"vue-tsc": "^2.0.29"
58+
"vite-plugin-vue-devtools": "^7.4.5",
59+
"vue-tsc": "^2.1.6"
6060
},
6161
"simple-git-hooks": {
6262
"pre-commit": "npx lint-staged"

0 commit comments

Comments
 (0)