chore: use biome instead of prettier and eslint in hooks

This commit is contained in:
PalmDevs
2024-01-14 21:48:02 +07:00
parent 26ad4afc18
commit 7b00b5c2b8
2 changed files with 17 additions and 23 deletions

View File

@@ -27,6 +27,9 @@
"enabled": true, "enabled": true,
"indentStyle": "space", "indentStyle": "space",
"indentWidth": 2 "indentWidth": 2
},
"parser": {
"allowComments": true
} }
}, },
"javascript": { "javascript": {
@@ -44,12 +47,7 @@
}, },
"files": { "files": {
"ignoreUnknown": true, "ignoreUnknown": true,
"include": ["**/*.js", "**/*.json", "**/*.ts"], "include": ["*.js", "*.json", "*.ts"],
"ignore": [ "ignore": ["dist/**/*", "node_modules/**/*"]
"**/tsconfig.json",
"**/tsconfig.*.json",
"dist/**/*",
"node_modules/**/*"
]
} }
} }

View File

@@ -1,16 +1,12 @@
pre-commit: pre-commit:
parallel: true parallel: true
commands: commands:
format: check:
files: git diff --name-only --cached --diff-filter=AM @{push} files: git diff --name-only --cached --diff-filter=AM @{push}
glob: '*.{js,ts,json,yml,md}' glob: "*.{js,ts,json,yml,md}"
run: bunx prettier --ignore-path .gitignore --check {files} run: bunx biome check {files}
lint: commit-msg:
files: git diff --name-only --cached --diff-filter=AM @{push} parallel: false
glob: '*.{js,ts}' commands:
run: bunx eslint --cache {files} commitlint:
commit-msg: run: bunx commitlint --edit
parallel: false
commands:
commitlint:
run: bunx commitlint --edit