Skip to content

Commit

Permalink
use biome
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Mar 30, 2024
1 parent 6cca4aa commit 0c83865
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 1 deletion.
25 changes: 25 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"ignore": ["dist/", "package.json"]
},
"formatter": {
"indentWidth": 2,
"indentStyle": "space"
},
"javascript": {
"formatter": {
"semicolons": "asNeeded",
"lineWidth": 120,
"quoteStyle": "single",
"trailingComma": "none"
}
},
"linter": {
"enabled": false
},
"vcs": {
"enabled": true,
"clientKind": "git"
}
}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"clean": "git clean -Xdf",
"reset": "pnpm run clean && pnpm install && pnpm run build",
"========= Formatting": "",
"prettier": "git ls-files | egrep '\\.(json|js|jsx|css|ts|tsx|vue|mjs|cjs)$' | grep --invert-match package.json | xargs pnpm exec prettier --write",
"format": "pnpm run format:biome",
"format:prettier": "git ls-files | egrep '\\.(json|js|jsx|css|ts|tsx|vue|mjs|cjs)$' | grep --invert-match package.json | xargs pnpm exec prettier --write",
"format:biome": "biome format --write .",
"format:check": "biome format . || (echo 'Fix formatting by running `$ pnpm run -w format`.' && exit 1)",
"========= Only allow pnpm; forbid yarn & npm": "",
"preinstall": "npx only-allow pnpm"
},
Expand All @@ -25,6 +28,7 @@
},
"packageManager": "[email protected]",
"devDependencies": {
"@biomejs/biome": "^1.5.3",
"prettier": "^3.2.5"
}
}
91 changes: 91 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 0c83865

Please sign in to comment.