From 624aeb0ecd3d737d3aee676224b829a4450db883 Mon Sep 17 00:00:00 2001 From: Leo Singer Date: Fri, 22 Nov 2024 13:28:10 -0500 Subject: [PATCH] Switch VS Code formatter to ruff --- .pre-commit-config.yaml | 3 +++ .vscode/extensions.json | 5 +++++ .vscode/settings.json | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .vscode/extensions.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 86297e3..d5e4f42 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,6 +28,9 @@ repos: - id: trailing-whitespace # Trims trailing whitespace. exclude_types: [python] # Covered by Ruff W291. + - id: pretty-format-json + args: ['--autofix'] + # Checks that all your JSON files are pretty. - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.7.4 diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..3ff560f --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "charliermarsh.ruff" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index f43854b..5ec6ac7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "editor.defaultFormatter": "ms-python.black-formatter" + "editor.defaultFormatter": "charliermarsh.ruff" }