Skip to content

Commit fd947ce

Browse files
committed
From prettier to biome
1 parent 8d2b860 commit fd947ce

File tree

2 files changed

+64
-12
lines changed

2 files changed

+64
-12
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@ repos:
1818
hooks:
1919
- id: django-upgrade
2020
args: [--target-version, "3.2"]
21-
- repo: https://github.com/MarcoGorelli/absolufy-imports
22-
rev: v0.3.1
23-
hooks:
24-
- id: absolufy-imports
2521
- repo: https://github.com/astral-sh/ruff-pre-commit
2622
rev: "v0.13.0"
2723
hooks:
2824
- id: ruff
2925
args: [--unsafe-fixes]
3026
- id: ruff-format
27+
- repo: https://github.com/biomejs/pre-commit
28+
rev: "v2.2.4"
29+
hooks:
30+
- id: biome-check
31+
args: [--unsafe]
32+
verbose: true
3133
- repo: https://github.com/tox-dev/pyproject-fmt
3234
rev: v2.6.0
3335
hooks:
@@ -36,11 +38,3 @@ repos:
3638
rev: v0.24.1
3739
hooks:
3840
- id: validate-pyproject
39-
- repo: local
40-
hooks:
41-
- id: prettier
42-
name: prettier
43-
entry: npx [email protected] --no-semi --write
44-
language: system
45-
types_or: [markdown, css, javascript]
46-
require_serial: true

biome.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
3+
"assist": { "actions": { "source": { "organizeImports": "off" } } },
4+
"formatter": {
5+
"enabled": true,
6+
"indentStyle": "space",
7+
"indentWidth": 2
8+
},
9+
"linter": {
10+
"enabled": true,
11+
"rules": {
12+
"recommended": true,
13+
"a11y": {
14+
"noSvgWithoutTitle": "off"
15+
},
16+
"complexity": {
17+
"noImportantStyles": "off"
18+
},
19+
"correctness": {
20+
"noUndeclaredVariables": "error",
21+
"noUnusedImports": "error",
22+
"noUnusedVariables": "error",
23+
"useHookAtTopLevel": "error"
24+
},
25+
"security": {
26+
"noDangerouslySetInnerHtml": "warn"
27+
},
28+
"style": {
29+
"noParameterAssign": "off",
30+
"useForOf": "warn",
31+
"useArrayLiterals": "error"
32+
},
33+
"suspicious": {
34+
"noArrayIndexKey": "warn",
35+
"noAssignInExpressions": "off"
36+
}
37+
}
38+
},
39+
"javascript": {
40+
"formatter": {
41+
"semicolons": "asNeeded"
42+
},
43+
"globals": ["django", "CKEDITOR"]
44+
},
45+
"css": {
46+
"formatter": {
47+
"enabled": true
48+
},
49+
"linter": {
50+
"enabled": true
51+
}
52+
},
53+
"json": {
54+
"formatter": {
55+
"enabled": false
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)