Skip to content

chore(website): use Biome instead of ESLint #3457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions website/.eslintignore

This file was deleted.

130 changes: 0 additions & 130 deletions website/.eslintrc.json

This file was deleted.

69 changes: 69 additions & 0 deletions website/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"files": {
"include": ["**/**"],
"ignore": ["build", ".docusaurus", ".cache-loader"]
},
"organizeImports": {
"enabled": false
},
"linter": {
"enabled": true,
"rules": {
"all": true,
"a11y": {
"all": true
},
"complexity": {
"noExcessiveCognitiveComplexity": "off"
},
"correctness": {
"all": true,
"useImportExtensions": "error",
"noNodejsModules": "off",
"noUndeclaredDependencies": "off"
},
"nursery": {
"all": true,
"useImportRestrictions": "off",
"noProcessEnv": "off",
"noCommonJs": "off",
"noSecrets": "off",
"useExplicitType": "off"
},
"performance": {
"all": true,
"noAccumulatingSpread": "error",
"noBarrelFile": "error",
"noDelete": "error",
"noReExportAll": "error",
"useTopLevelRegex": "off"
},
"security": {
"all": true,
"noGlobalEval": "error"
},
"suspicious": {
"all": true,
"noAsyncPromiseExecutor": "error",
"useAwait": "error",
"useIsArray": "error",
"noEmptyBlockStatements": "off",
"noConsoleLog": "off",
"noMisplacedAssertion": "off",
"noConsole": "off",
"noReactSpecificProps": "off",
"noArrayIndexKey": "off"
},
"style": {
"all": true,
"noNonNullAssertion": "off",
"useNamingConvention": "off",
"useNodeAssertStrict": "off",
"noNamespaceImport": "off",
"useBlockStatements": "off",
"noDefaultExport": "off"
}
}
}
}
2 changes: 1 addition & 1 deletion website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const config: Config = {
label: 'MySQL2',
position: 'left',
className: 'navbar__brand navbar__manual--title text--truncate',
activeBaseRegex: `^/$`,
activeBaseRegex: '^/$',
},
{
to: '/docs/documentation',
Expand Down
8 changes: 4 additions & 4 deletions website/helpers/extract-method-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ export const extractMethodContent = (
const lines = text.split('\n');
const startPattern = `${type} ${methodName}`;

let insideSegment: boolean = false;
let depth: number = 0;
let extractedCode: string = '';
let insideSegment = false;
let depth = 0;
let extractedCode = '';

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

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

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

if (line.includes('}')) {
depth--;
Expand Down
Loading
Loading