Skip to content

Commit

Permalink
Merge pull request #21 from sgibson91/auto-formatting
Browse files Browse the repository at this point in the history
Add pre-commit and prettier config
  • Loading branch information
sgibson91 authored Sep 18, 2024
2 parents 1553d8b + 8125e28 commit 8a2409d
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# pre-commit is a tool to perform a predefined set of tasks manually and/or
# automatically before git commits are made.
#
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
#
# Common tasks
#
# - Run on all files: pre-commit run --all-files
# - Register git hooks: pre-commit install --install-hooks
#
repos:
# Autoformat: markdown, yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0 # Don't upgrade, v4 causes "No files matching [...]" issues
hooks:
- id: prettier

# Autoformat: Python code, syntax patterns are modernized
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args:
- --py36-plus

# Autoformat: Python code
- repo: https://github.com/pycqa/isort
rev: "5.13.2"
hooks:
- id: isort

# Autoformat: Python code
- repo: https://github.com/psf/black
rev: "24.8.0"
hooks:
- id: black

# Lint: Python code
- repo: https://github.com/pycqa/flake8
rev: "7.1.1"
hooks:
- id: flake8
args:
- --max-line-length=88

# Prevent known typos from being committed
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
# Autofix known typos
- --write-changes
additional_dependencies:
- tomli

# pre-commit.ci config reference: https://pre-commit.ci/#configuration
ci:
autoupdate_schedule: monthly
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Helm chart's templates aren't pure YAML files
**/templates/

0 comments on commit 8a2409d

Please sign in to comment.