From 5e67fa510dbea5f1b0c1f357dfcfef95efe4cc4b Mon Sep 17 00:00:00 2001 From: AIFlow_ML Date: Fri, 31 Jan 2025 17:00:06 +0700 Subject: [PATCH] Great code i just added the Biome --- packages/plugin-asterai/biome.json | 41 ++++++++++++++++++++++++++++ packages/plugin-asterai/package.json | 9 ++++-- 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 packages/plugin-asterai/biome.json diff --git a/packages/plugin-asterai/biome.json b/packages/plugin-asterai/biome.json new file mode 100644 index 00000000000..818716a6219 --- /dev/null +++ b/packages/plugin-asterai/biome.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.5.3/schema.json", + "organizeImports": { + "enabled": false + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "correctness": { + "noUnusedVariables": "error" + }, + "suspicious": { + "noExplicitAny": "error" + }, + "style": { + "useConst": "error", + "useImportType": "off" + } + } + }, + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 4, + "lineWidth": 100 + }, + "javascript": { + "formatter": { + "quoteStyle": "single", + "trailingCommas": "es5" + } + }, + "files": { + "ignore": [ + "dist/**/*", + "extra/**/*", + "node_modules/**/*" + ] + } +} \ No newline at end of file diff --git a/packages/plugin-asterai/package.json b/packages/plugin-asterai/package.json index 9e8af0e1ab1..d96043d3a6a 100644 --- a/packages/plugin-asterai/package.json +++ b/packages/plugin-asterai/package.json @@ -33,14 +33,19 @@ "@types/elliptic": "6.4.18", "@types/uuid": "10.0.0", "tsup": "8.3.5", - "vitest": "^1.2.1" + "vitest": "^1.2.1", + "@biomejs/biome": "1.9.4" }, "scripts": { "lines": "find . \\( -name '*.cdc' -o -name '*.ts' \\) -not -path '*/node_modules/*' -not -path '*/tests/*' -not -path '*/deps/*' -not -path '*/dist/*' -not -path '*/imports*' | xargs wc -l", "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", "test": "vitest run", - "test:watch": "vitest" + "test:watch": "vitest", + "lint": "biome lint .", + "lint:fix": "biome check --apply .", + "format": "biome format .", + "format:fix": "biome format --write ." }, "peerDependencies": { "whatwg-url": "7.1.0"