forked from 2i2c-org/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pre-commit: setup pre-commit config to run prettier on YAML files
- Loading branch information
1 parent
a53ecff
commit 31a28e1
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 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: | ||
# FIXME: Consider adding more, for example by looking at those configured for | ||
# TLJH in https://github.com/jupyterhub/the-littlest-jupyterhub/blob/main/.pre-commit-config.yaml | ||
|
||
# Autoformat: markdown, yaml | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.4.1 | ||
hooks: | ||
- id: prettier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Helm chart's templates aren't pure YAML files | ||
**/templates/ | ||
|
||
# It would be trouble if we had two automatic formatters on the same files. This | ||
# could happen if we would auto-format the sops generated files with prettier. | ||
secrets/**/* | ||
**/secrets.yaml | ||
!secrets/config/hubs/schema.yaml | ||
|
||
# To create a minimal change suggestion, prettier was introduced to auto-format | ||
# the YAML files only. It is absolutely reasonable to auto-format markdown files | ||
# and json files as well, but for now, let's make prettier only auto-format | ||
# YAML. | ||
**/*.md | ||
**/*.json |