Skip to content

Commit ede7f24

Browse files
committed
build: replace eslint with biome for linting
1 parent da1e2e6 commit ede7f24

File tree

5 files changed

+204
-1
lines changed

5 files changed

+204
-1
lines changed

.changeset/shiny-moments-fold.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'create-mcp-kit': patch
3+
'@mcp-tool-kit/shared': patch
4+
---
5+
6+
build: replace eslint with biome for linting

biome.json

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.7/schema.json",
3+
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
4+
"files": { "ignoreUnknown": false },
5+
"formatter": {
6+
"enabled": true,
7+
"formatWithErrors": false,
8+
"indentStyle": "space",
9+
"indentWidth": 2,
10+
"lineEnding": "lf",
11+
"lineWidth": 120,
12+
"attributePosition": "auto",
13+
"bracketSameLine": false,
14+
"bracketSpacing": true,
15+
"expand": "auto",
16+
"useEditorconfig": true
17+
},
18+
"linter": {
19+
"enabled": true,
20+
"rules": {
21+
"recommended": false,
22+
"complexity": { "noUselessTypeConstraint": "error" },
23+
"correctness": { "noUnusedVariables": "error" },
24+
"style": {
25+
"noCommonJs": "error",
26+
"noNamespace": "error",
27+
"useArrayLiterals": "error",
28+
"useAsConstAssertion": "error"
29+
},
30+
"suspicious": {
31+
"noConsole": "off",
32+
"noExplicitAny": "error",
33+
"noExtraNonNullAssertion": "error",
34+
"noMisleadingInstantiator": "error",
35+
"noNonNullAssertedOptionalChain": "error",
36+
"noUnsafeDeclarationMerging": "error",
37+
"useNamespaceKeyword": "error"
38+
}
39+
},
40+
"includes": ["**", "!**/build", "!**/node_modules", "!**/.*", "!**/*.d.ts", "!.husky/"]
41+
},
42+
"javascript": {
43+
"formatter": {
44+
"jsxQuoteStyle": "double",
45+
"quoteProperties": "asNeeded",
46+
"trailingCommas": "all",
47+
"semicolons": "asNeeded",
48+
"arrowParentheses": "asNeeded",
49+
"bracketSameLine": false,
50+
"quoteStyle": "single",
51+
"attributePosition": "auto",
52+
"bracketSpacing": true
53+
},
54+
"globals": ["exports"]
55+
},
56+
"html": {
57+
"formatter": {
58+
"indentScriptAndStyle": false,
59+
"selfCloseVoidElements": "always"
60+
}
61+
},
62+
"overrides": [
63+
{
64+
"includes": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
65+
"linter": {
66+
"rules": {
67+
"complexity": { "noArguments": "error" },
68+
"correctness": {
69+
"noConstAssign": "off",
70+
"noGlobalObjectCalls": "off",
71+
"noInvalidBuiltinInstantiation": "off",
72+
"noInvalidConstructorSuper": "off",
73+
"noSetterReturn": "off",
74+
"noUndeclaredVariables": "off",
75+
"noUnreachable": "off",
76+
"noUnreachableSuper": "off"
77+
},
78+
"style": { "useConst": "error" },
79+
"suspicious": {
80+
"noClassAssign": "off",
81+
"noDuplicateClassMembers": "off",
82+
"noDuplicateObjectKeys": "off",
83+
"noDuplicateParameters": "off",
84+
"noFunctionAssign": "off",
85+
"noImportAssign": "off",
86+
"noRedeclare": "off",
87+
"noUnsafeNegation": "off",
88+
"noVar": "error",
89+
"noWith": "off",
90+
"useGetterReturn": "off"
91+
}
92+
}
93+
}
94+
},
95+
{ "includes": ["packages/**/*.{js,ts}"] }
96+
],
97+
"assist": {
98+
"enabled": true,
99+
"actions": { "source": { "organizeImports": "on" } }
100+
}
101+
}

lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export default {
2-
'packages/**/*.{ts,js}': ['npx eslint'],
2+
'packages/**/*.{ts,js}': ['biome check --write'],
33
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"typescript"
4242
],
4343
"devDependencies": {
44+
"@biomejs/biome": "2.3.7",
4445
"@changesets/changelog-github": "^0.5.1",
4546
"@changesets/cli": "^2.29.7",
4647
"@commitlint/cli": "^20.1.0",

pnpm-lock.yaml

Lines changed: 95 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)