-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maint: Add prettier pre-commit hook #3663
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
title: Bot failure | ||
--- | ||
|
||
There was a problem with the **{{ workflow }}** workflow, please investigate. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,23 +5,20 @@ repos: | |
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: fix-encoding-pragma | ||
args: [--remove] | ||
- id: check-yaml | ||
exclude: ^.+(/tests/|/recipe/).+$ | ||
- id: check-toml | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: pretty-format-json | ||
args: [--autofix] | ||
Comment on lines
-10
to
-16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These checks (except |
||
- id: debug-statements | ||
language_version: python3 | ||
# Autoformat: YAML, JSON, Markdown, etc. | ||
- repo: https://github.com/rbubley/mirrors-prettier | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using a fork, since official prettier pre-commit hook has been archived: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hum, I'm kind of reluctant here. As I'm in favor of general improvements, using something that just has been archived (even if a mirror is available) doesn't seem a good idea to me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is an important gotcha: the https://github.com/rbubley/mirrors-prettier is not a mirror/fork of Even in the worst case scenario, this fork will stop updating, we will have some prettier version in this repo. And the sooner we add prettier, the less diff this PR will generate. |
||
rev: v3.4.2 | ||
hooks: | ||
- id: prettier | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: rst-backticks | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
- id: rst-backticks | ||
Comment on lines
18
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This an example when existing hooks allow different styles (even in the same file) |
||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.19.0 | ||
hooks: | ||
|
@@ -31,7 +28,7 @@ repos: | |
rev: v0.8.2 | ||
hooks: | ||
- id: ruff | ||
args: [ --fix ] | ||
args: [--fix] | ||
- id: ruff-format | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: 1.19.1 | ||
|
@@ -55,4 +52,4 @@ repos: | |
exclude: (CHANGELOG.md) | ||
# In case of ambiguity (multiple possible corrections), `typos` will just report it to the user and move on without applying/writing any changes. | ||
# cf. https://github.com/crate-ci/typos | ||
args: [ --write-changes ] | ||
args: [--write-changes] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is deprecated