diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..60e3408 --- /dev/null +++ b/biome.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.9.2/schema.json", + "vcs": { + "enabled": false, + "clientKind": "git", + "useIgnoreFile": false + }, + "files": { + "ignoreUnknown": false, + "ignore": [] + }, + "formatter": { + "enabled": false + }, + "organizeImports": { + "enabled": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + }, + "javascript": { + "formatter": { + "quoteStyle": "single" + } + } +} diff --git a/bun.lockb b/bun.lockb index 84b95a4..31f89ee 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 49708c2..ef50f8e 100644 --- a/package.json +++ b/package.json @@ -16,15 +16,18 @@ }, "dependencies": {}, "devDependencies": { + "@biomejs/biome": "1.9.2", "@types/bun": "latest", "@types/node": "^20.8.0", "prettier": "^3.3.3", "typescript": "^5.2.2" }, "scripts": { - "prettier": "prettier src tests --write", + "prettier:fix": "prettier src tests --write", "prettier:check": "prettier src tests --check", - "lint": "bun run prettier", + "biome:check": "bunx biome lint src tests", + "biome:fix": "bunx biome lint --write src tests", + "lint": "bun run prettier:check && bun run biome:check", "build": "bun tsc", "prepublishOnly": "npm run build", "test:coverage": "bun run test --coverage" diff --git a/src/transform.ts b/src/transform.ts index 2225282..c2f73ee 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -5,7 +5,7 @@ export const transform = ( let result = ""; const parts: string[] = content.split(""); - parts.forEach((part) => { + for (const part of parts) { const partKey = part.toLocaleLowerCase(); if (dictionary.has(partKey)) { @@ -13,7 +13,7 @@ export const transform = ( } else { result += part; } - }); + } return result; };