Add Ruff as a formatter
It's complimented by `add-trailing-comma` for better readability and uses a double run to settle one the final format seamlessly.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
---
|
||||
|
||||
ci:
|
||||
autoupdate_schedule: quarterly # low frequency to reduce maintenance noise
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit.git
|
||||
rev: v0.12.4
|
||||
hooks:
|
||||
- id: ruff-format
|
||||
alias: ruff-format-first-pass
|
||||
name: ruff-format (first pass)
|
||||
|
||||
- repo: https://github.com/asottile/add-trailing-comma.git
|
||||
rev: v3.2.0
|
||||
hooks:
|
||||
- id: add-trailing-comma
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit.git
|
||||
rev: v0.12.4
|
||||
hooks:
|
||||
- id: ruff-format
|
||||
alias: ruff-format-second-pass
|
||||
name: ruff-format (second pass)
|
||||
|
||||
...
|
||||
@@ -0,0 +1,4 @@
|
||||
line-length = 79 # Accessibility-friendly
|
||||
|
||||
[format]
|
||||
quote-style = "single"
|
||||
Reference in New Issue
Block a user