Skip to content

Commit

Permalink
prettier -> biome
Browse files Browse the repository at this point in the history
  • Loading branch information
uzmoi committed Jan 12, 2024
1 parent ac41565 commit fd3ab75
Show file tree
Hide file tree
Showing 6 changed files with 209 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
cache: npm

- run: npm ci
- run: npm run fmt:check
- run: npm run check
- run: npm run coverage

- name: Upload coverage to Codecov
Expand Down
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["biomejs.biome"]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"quickfix.biome": "always",
"source.organizeImports.biome": "always",
},
}
37 changes: 37 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.1/schema.json",
"javascript": {
"formatter": {
"indentWidth": 4,
"lineWidth": 90,
"arrowParentheses": "asNeeded"
}
},
"json": {
"parser": {
"allowComments": true,
"allowTrailingCommas": true
}
},
"formatter": {
"enabled": true,
"ignore": ["**/dist/**", "**/target/**"],
"indentStyle": "space",
"formatWithErrors": true
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"ignore": ["**/dist/**", "**/target/**"],
"rules": {
"recommended": true
}
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
}
}
172 changes: 156 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
"build": "tsup",
"test": "jest",
"coverage": "jest --coverage",
"fmt:check": "prettier **/*.ts -c",
"fmt": "prettier **/*.ts -w"
"format": "biome format .",
"lint": "biome lint .",
"check": "biome check ."
},
"repository": {
"type": "git",
Expand All @@ -47,9 +48,9 @@
"emnorst": "^1.0.0-next.2"
},
"devDependencies": {
"@biomejs/biome": "^1.5.1",
"@swc/jest": "^0.2.26",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"tsup": "^6.7.0",
"typescript": "^5.0.4"
}
Expand Down

0 comments on commit fd3ab75

Please sign in to comment.