Skip to content

Commit

Permalink
Add simple Biome setup for lint
Browse files Browse the repository at this point in the history
  • Loading branch information
stscoundrel committed Sep 21, 2024
1 parent d638187 commit 06874b6
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
29 changes: 29 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
Binary file modified bun.lockb
Binary file not shown.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ 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)) {
result += dictionary.get(partKey);
} else {
result += part;
}
});
}

return result;
};
Expand Down

0 comments on commit 06874b6

Please sign in to comment.