Skip to content

Commit

Permalink
ci(pre-commit): Add "prettier" hook for YAML formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Sep 6, 2022
1 parent 87d6906 commit 584d0cc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
# disable these checks for now when pushing directly (but still run these
# on Pull Requests!).
env:
SKIP: end-of-file-fixer,trailing-whitespace,clang-format,eslint,no-commit-to-branch
SKIP: end-of-file-fixer,trailing-whitespace,clang-format,eslint,no-commit-to-branch,prettier

- name: "Detect code style issues (pull_request)"
uses: pre-commit/[email protected]
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ repos:
rev: 0.14.1
hooks:
- id: check-github-workflows
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
types: [yaml]
- repo: local
hooks:
- id: qsscheck
Expand Down
2 changes: 2 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tabWidth: 2
singleQuote: false

0 comments on commit 584d0cc

Please sign in to comment.