Repository navigation
.pre-commit-config.yaml → prek.toml
#648
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
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
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Configuration file for `prek`, a git hook framework written in Rust. | ||
| # See https://prek.j178.dev for more information. | ||
| # :schema https://www.schemastore.org/prek.json | ||
|
samcunliffe marked this conversation as resolved.
|
||
| # ^ Remove the space here when toml-sort/#105 is resolved. The directive should be: '#:schema' | ||
|
|
||
| exclude = "^{{cookiecutter.project_slug}}/|^tests/data/test_package_generation/" | ||
|
|
||
| [[repos]] | ||
|
Member
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. Such a shame it's this syntax, quite ugly I think. But not that surprising. I really like in a
Member
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. Also means |
||
| hooks = [ | ||
| {args = [ | ||
| "--config=pyproject.toml", | ||
| ], id = "ruff-check"}, | ||
| {args = [ | ||
| "--config=pyproject.toml", | ||
| ], id = "ruff-format"}, | ||
| ] | ||
| repo = "https://github.com/astral-sh/ruff-pre-commit" | ||
| rev = "v0.15.19" | ||
|
|
||
| [[repos]] | ||
| hooks = [{args = ["--dot"], id = "markdownlint-fix"}] | ||
| repo = "https://github.com/igorshubovych/markdownlint-cli" | ||
| rev = "v0.49.1" | ||
|
|
||
| [[repos]] | ||
| hooks = [{id = "forbid-tabs"}] | ||
| repo = "https://github.com/Lucas-C/pre-commit-hooks" | ||
| rev = "v1.5.6" | ||
|
|
||
| [[repos]] | ||
| hooks = [{id = "toml-sort-fix"}] | ||
| repo = "https://github.com/pappasam/toml-sort" | ||
| rev = "v0.24.4" | ||
|
|
||
| [[repos]] | ||
| hooks = [ | ||
| {args = [ | ||
| "--group=typechecking", | ||
| "--isolated", | ||
| "--no-default-groups", | ||
| ], id = "ty"}, | ||
| ] | ||
| repo = "https://github.com/astral-sh/ty-pre-commit" | ||
| rev = "v0.0.79" | ||
|
|
||
| [[repos]] | ||
| hooks = [{args = ["--quote-props=as-needed"], id = "prettier"}] | ||
| repo = "https://github.com/rbubley/mirrors-prettier" | ||
| rev = "v3.8.4" | ||
|
|
||
| [[repos]] | ||
| hooks = [ | ||
| {args = [ | ||
| "--fix=lf", | ||
| ], id = "mixed-line-ending"}, | ||
| {id = "check-case-conflict"}, | ||
| {id = "check-docstring-first"}, | ||
| {id = "check-merge-conflict"}, | ||
| {id = "end-of-file-fixer"}, | ||
| {id = "trailing-whitespace"}, | ||
| ] | ||
| repo = "https://github.com/pre-commit/pre-commit-hooks" | ||
| rev = "v6.0.0" | ||
|
|
||
| [[repos]] | ||
| hooks = [ | ||
| {args = [ | ||
| "--schemafile=.github/schemas/github-issue-forms.json", | ||
| "--verbose", | ||
| ], exclude = '^\.github/ISSUE_TEMPLATE/config\.yml$', files = '^\.github/ISSUE_TEMPLATE/.*\.yml$', id = "check-jsonschema", name = "Validate GitHub issue templates"}, | ||
| ] | ||
| repo = "https://github.com/python-jsonschema/check-jsonschema" | ||
| rev = "0.38.0" | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # :schema https://www.schemastore.org/prek.json | ||
|
|
||
| [[repos]] | ||
| hooks = [{id = "ruff-check"}, {id = "ruff-format"}] | ||
| repo = "https://github.com/astral-sh/ruff-pre-commit" | ||
| rev = "v0.15.19" | ||
|
|
||
| [[repos]] | ||
| hooks = [{args = ["--dot"], id = "markdownlint-fix"}] | ||
| repo = "https://github.com/igorshubovych/markdownlint-cli" | ||
| rev = "v0.49.1" | ||
|
|
||
| [[repos]] | ||
| hooks = [{id = "forbid-tabs"}] | ||
| repo = "https://github.com/Lucas-C/pre-commit-hooks" | ||
| rev = "v1.5.6" | ||
|
|
||
| [[repos]] | ||
| hooks = [{id = "toml-sort-fix"}] | ||
| repo = "https://github.com/pappasam/toml-sort" | ||
| rev = "v0.24.4" | ||
|
|
||
| [[repos]] | ||
| hooks = [ | ||
| {args = [ | ||
| "--group=typechecking", | ||
| "--isolated", | ||
| "--no-default-groups", | ||
| ], id = "ty"}, | ||
| ] | ||
| repo = "https://github.com/astral-sh/ty-pre-commit" | ||
| rev = "v0.0.79" | ||
|
|
||
| [[repos]] | ||
| hooks = [{args = ["--quote-props=as-needed"], id = "prettier"}] | ||
| repo = "https://github.com/rbubley/mirrors-prettier" | ||
| rev = "v3.8.4" | ||
|
|
||
| [[repos]] | ||
| hooks = [ | ||
| {args = [ | ||
| "--fix=lf", | ||
| ], id = "mixed-line-ending"}, | ||
| {id = "check-case-conflict"}, | ||
| {id = "check-docstring-first"}, | ||
| {id = "check-merge-conflict"}, | ||
| {id = "check-toml"}, | ||
| {id = "end-of-file-fixer"}, | ||
| {id = "trailing-whitespace"}, | ||
|
Comment on lines
+41
to
+49
Member
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. Like something about this format is odd. It's nicer than YAML, but quite as nice as it could be. |
||
| ] | ||
| repo = "https://github.com/pre-commit/pre-commit-hooks" | ||
| rev = "v6.0.0" | ||
|
|
||
| [[repos]] | ||
| hooks = [ | ||
| {args = [ | ||
| "--schemafile=.github/schemas/github-issue-forms.json", | ||
| "--verbose", | ||
| ], exclude = '^\.github/ISSUE_TEMPLATE/config\.yml$', files = '^\.github/ISSUE_TEMPLATE/.*\.yml$', id = "check-jsonschema", name = "Validate GitHub issue templates"}, | ||
|
Comment on lines
+56
to
+59
Member
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. Yeah this is the downside of TOML... Strings |
||
| ] | ||
| repo = "https://github.com/python-jsonschema/check-jsonschema" | ||
| rev = "0.38.0" | ||
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.
The link checker will fail until this PR is merged, because this file doesn't exist on
main.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.
That's okay, as an admin you should be able to bypass (pending review).