Skip to content

Commit 4c4458a

Browse files
Update instance repo from cookiecutter template
1 parent 8fd3e64 commit 4c4458a

File tree

7 files changed

+30
-22
lines changed

7 files changed

+30
-22
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ default_stages:
66
- pre-push
77
minimum_pre_commit_version: 2.16.0
88
repos:
9-
- repo: https://github.com/pre-commit/mirrors-prettier
10-
rev: v4.0.0-alpha.8
9+
- repo: https://github.com/biomejs/pre-commit
10+
rev: v1.9.4
1111
hooks:
12-
- id: prettier
12+
- id: biome-format
1313
- repo: https://github.com/tox-dev/pyproject-fmt
1414
rev: v2.5.0
1515
hooks:

.prettierrc.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
// Linting and formatting
1414
"editorconfig.editorconfig",
1515
"charliermarsh.ruff",
16-
"esbenp.prettier-vscode",
16+
"biomejs.biome",
1717
],
1818
}

.vscode/settings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"[python][jsonc][yaml]": {
2+
"[python][json][jsonc]": {
33
"editor.formatOnSave": true,
44
},
55
"[python]": {
@@ -9,8 +9,8 @@
99
"source.organizeImports": "always",
1010
},
1111
},
12-
"[jsonc][yaml]": {
13-
"editor.defaultFormatter": "esbenp.prettier-vscode",
12+
"[json][jsonc]": {
13+
"editor.defaultFormatter": "biomejs.biome",
1414
},
1515
"python.analysis.typeCheckingMode": "basic",
1616
"python.testing.pytestEnabled": true,

biome.jsonc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"formatter": { "useEditorconfig": true },
4+
"overrides": [
5+
{
6+
"include": ["./.vscode/*.json", "**/*.jsonc"],
7+
"json": {
8+
"formatter": { "trailingCommas": "all" },
9+
"parser": {
10+
"allowComments": true,
11+
"allowTrailingCommas": true,
12+
},
13+
},
14+
},
15+
],
16+
}

docs/contributing.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,12 @@ to integrate the changes into yours.
6868
While the [pre-commit.ci][] is useful, we strongly encourage installing and running pre-commit locally first to understand its usage.
6969

7070
Finally, most editors have an _autoformat on save_ feature.
71-
Consider enabling this option for [ruff][ruff-editors] and [prettier][prettier-editors].
71+
Consider enabling this option for [ruff][ruff-editors] and [biome][biome-editors].
7272

7373
[pre-commit]: https://pre-commit.com/
7474
[pre-commit.ci]: https://pre-commit.ci/
7575
[ruff-editors]: https://docs.astral.sh/ruff/integrations/
76-
77-
[prettier-editors]: https://prettier.io/docs/en/editors.html
76+
[biome-editors]: https://biomejs.dev/guides/integrate-in-editor/
7877

7978
(writing-tests)=
8079

docs/template_usage.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ You'll notice that the command `git commit` installed a bunch of packages and tr
5353
To read more about what they are and what they do, you can go to the related section [Pre-commit checks](#pre-commit-checks) in this document.
5454

5555
:::{note}
56-
There is a chance that `git commit -m "first commit"` fails due to the `prettier` pre-commit formatting the file `.cruft.json`.
56+
There is a chance that `git commit -m "first commit"` fails due to the `biome` pre-commit formatting of the file `.cruft.json`.
5757
No problem, you have just experienced what pre-commit checks do in action. Just go ahead and re-add the modified file and try to commit again:
5858

5959
```bash
@@ -259,8 +259,8 @@ Once authorized, pre-commit.ci should automatically be activated.
259259

260260
The following pre-commit hooks are for code style and format:
261261

262-
- [prettier](https://prettier.io/docs/en/index.html):
263-
standard code formatter for non-Python files (e.g. YAML).
262+
- [biome](https://biomejs.dev/):
263+
code formatter for non-Python files (e.g. JSON).
264264
- [ruff][] formatting (`ruff-format`)
265265
- [ruff][] based checks:
266266
- [isort](https://beta.ruff.rs/docs/rules/#isort-i) (rule category: `I`):
@@ -307,8 +307,8 @@ This section shows you where these checks are defined, and how to enable/ disabl
307307
##### pre-commit
308308

309309
You can add or remove pre-commit checks by simply deleting relevant lines in the `.pre-commit-config.yaml` file under the repository root.
310-
Some pre-commit checks have additional options that can be specified either in the `pyproject.toml` (for `ruff`) or tool-specific config files,
311-
such as `.prettierrc.yml` for **prettier**.
310+
Some pre-commit checks have additional options that can be specified either in the `pyproject.toml` (for [ruff][]) or tool-specific config files,
311+
such as `biome.jsonc` for [biome][].
312312

313313
##### Ruff
314314

0 commit comments

Comments
 (0)