Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit c0f8a85

Browse files
committed
build(linter): 用 Biome 替代 ESLint 进行代码格式和规范检查
1 parent d1ab6c7 commit c0f8a85

File tree

4 files changed

+71
-115
lines changed

4 files changed

+71
-115
lines changed

biome.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
3+
"vcs": {
4+
"enabled": false,
5+
"clientKind": "git",
6+
"useIgnoreFile": false
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"includes": ["src/**/*.ts"]
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "tab"
15+
},
16+
"linter": {
17+
"enabled": true,
18+
"rules": {
19+
"recommended": true,
20+
"a11y": {
21+
"useGenericFontNames": "error"
22+
},
23+
"suspicious": {
24+
"noDoubleEquals": "error",
25+
"noDuplicateCase": "error",
26+
"noDuplicateClassMembers": "error",
27+
"noDuplicateParameters": "error",
28+
"noSparseArray": "error",
29+
"noTemplateCurlyInString": "error",
30+
"noVar": "error",
31+
"useAwait": "error",
32+
"useIsArray": "error"
33+
},
34+
"style": {
35+
"useCollapsedIf": "error",
36+
"useNodejsImportProtocol": "error",
37+
"useTemplate": "error",
38+
"useShorthandAssign": "error",
39+
"useConsistentArrayType": "error",
40+
"useConst": "error",
41+
"useArrayLiterals": "error",
42+
"noExportedImports": "error"
43+
},
44+
"correctness": {
45+
"noUnusedVariables": "error",
46+
"noUnusedImports": "error",
47+
"noEmptyPattern": "error"
48+
},
49+
"nursery": {
50+
"useExplicitType": "error"
51+
}
52+
}
53+
},
54+
"javascript": {
55+
"formatter": {
56+
"quoteStyle": "single",
57+
"semicolons": "asNeeded"
58+
}
59+
},
60+
"assist": {
61+
"enabled": true,
62+
"actions": {
63+
"source": {
64+
"organizeImports": "on"
65+
}
66+
}
67+
}
68+
}

eslint.config.js

Lines changed: 0 additions & 105 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
"uuid": "^11.1.0"
9595
},
9696
"devDependencies": {
97+
"@biomejs/biome": "2.1.3",
9798
"@types/color": "^4.2.0",
9899
"@types/git-url-parse": "^9.0.3",
99100
"@types/jsonwebtoken": "^9.0.9",
@@ -103,11 +104,6 @@
103104
"@typescript-eslint/eslint-plugin": "^8.28.0",
104105
"@typescript-eslint/parser": "^8.28.0",
105106
"@vuepress/bundler-vite": "2.0.0-rc.20",
106-
"eslint": "^9.26.0",
107-
"eslint-plugin-simple-import-sort": "^12.1.1",
108-
"eslint-plugin-tsdoc": "^0.4.0",
109-
"globals": "^16.0.0",
110-
"neostandard": "^0.12.1",
111107
"tsc-alias": "^1.8.11",
112108
"tsdown": "^0.12.9",
113109
"tsx": "^4.19.3",
@@ -116,7 +112,6 @@
116112
"typedoc-plugin-missing-exports": "^4.0.0",
117113
"typedoc-vitepress-theme": "^1.1.2",
118114
"typescript": "^5.8.2",
119-
"typescript-eslint": "^8.28.0",
120115
"vue": "^3.5.13",
121116
"vuepress": "2.0.0-rc.20",
122117
"vuepress-theme-plume": "1.0.0-rc.140"

src/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ class Client {
2626
}
2727
}
2828

29+
/** 客户端模块 */
2930
export {
30-
Client
31-
}
32-
/** GitHub 模块 */
33-
export {
31+
Client,
3432
GitHubClient
3533
}
3634
export * as github from '@/models/platform/github'

0 commit comments

Comments
 (0)