Skip to content

Commit be52c57

Browse files
authored
chore(website): use Biome instead of ESLint (#3457)
1 parent e70160b commit be52c57

15 files changed

+1847
-4037
lines changed

website/.eslintignore

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

website/.eslintrc.json

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

website/biome.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"files": {
4+
"include": ["**/**"],
5+
"ignore": ["build", ".docusaurus", ".cache-loader"]
6+
},
7+
"organizeImports": {
8+
"enabled": false
9+
},
10+
"linter": {
11+
"enabled": true,
12+
"rules": {
13+
"all": true,
14+
"a11y": {
15+
"all": true
16+
},
17+
"complexity": {
18+
"noExcessiveCognitiveComplexity": "off"
19+
},
20+
"correctness": {
21+
"all": true,
22+
"useImportExtensions": "error",
23+
"noNodejsModules": "off",
24+
"noUndeclaredDependencies": "off"
25+
},
26+
"nursery": {
27+
"all": true,
28+
"useImportRestrictions": "off",
29+
"noProcessEnv": "off",
30+
"noCommonJs": "off",
31+
"noSecrets": "off",
32+
"useExplicitType": "off"
33+
},
34+
"performance": {
35+
"all": true,
36+
"noAccumulatingSpread": "error",
37+
"noBarrelFile": "error",
38+
"noDelete": "error",
39+
"noReExportAll": "error",
40+
"useTopLevelRegex": "off"
41+
},
42+
"security": {
43+
"all": true,
44+
"noGlobalEval": "error"
45+
},
46+
"suspicious": {
47+
"all": true,
48+
"noAsyncPromiseExecutor": "error",
49+
"useAwait": "error",
50+
"useIsArray": "error",
51+
"noEmptyBlockStatements": "off",
52+
"noConsoleLog": "off",
53+
"noMisplacedAssertion": "off",
54+
"noConsole": "off",
55+
"noReactSpecificProps": "off",
56+
"noArrayIndexKey": "off"
57+
},
58+
"style": {
59+
"all": true,
60+
"noNonNullAssertion": "off",
61+
"useNamingConvention": "off",
62+
"useNodeAssertStrict": "off",
63+
"noNamespaceImport": "off",
64+
"useBlockStatements": "off",
65+
"noDefaultExport": "off"
66+
}
67+
}
68+
}
69+
}

website/docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const config: Config = {
6262
label: 'MySQL2',
6363
position: 'left',
6464
className: 'navbar__brand navbar__manual--title text--truncate',
65-
activeBaseRegex: `^/$`,
65+
activeBaseRegex: '^/$',
6666
},
6767
{
6868
to: '/docs/documentation',

website/helpers/extract-method-content.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ export const extractMethodContent = (
88
const lines = text.split('\n');
99
const startPattern = `${type} ${methodName}`;
1010

11-
let insideSegment: boolean = false;
12-
let depth: number = 0;
13-
let extractedCode: string = '';
11+
let insideSegment = false;
12+
let depth = 0;
13+
let extractedCode = '';
1414

1515
for (const line of lines) {
1616
if (line.includes(startPattern)) insideSegment = true;
1717

1818
if (insideSegment) {
1919
if (line.includes('{')) depth++;
2020

21-
extractedCode += line + '\n';
21+
extractedCode += `${line}\n`;
2222

2323
if (line.includes('}')) {
2424
depth--;

0 commit comments

Comments
 (0)