chore: set prettier for pre-commit

chore: run pre-commit scans against all files and keep changes
chore: add CNAME, Gemfile and yaml/yml files to pre-commit exclude
This commit is contained in:
mauvehed 2023-07-31 18:27:09 -05:00
parent 7a2823768b
commit 744b7426f2
9 changed files with 466 additions and 366 deletions

View file

@ -1,28 +1,17 @@
# .pre-commit-config.yaml
exclude: 'CNAME'
exclude: '(CNAME|Gemfile|\..*\.y[a]?ml)'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0 # use `pre-commit autoupdate` to get the latest rev
hooks:
- id: no-commit-to-branch
args: ['--branch', 'main'] # prevent local commits to main branch
- id: check-yaml # check for proper yaml formatting
- id: check-json # check for proper json formatting
# - id: pretty-format-json
- id: end-of-file-fixer
- id: trailing-whitespace
#- repo: https://github.com/pre-commit/mirrors-csslint
# rev: v1.0.5 # use `pre-commit autoupdate` to get the latest rev
# hooks:
# - id: csslint
- repo: https://github.com/thibaudcolas/curlylint
rev: v0.13.1 # use `pre-commit autoupdate` to get the latest rev
hooks:
- id: curlylint
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
hooks:
- id: prettier
types: [json]
types_or: [json, html, css, javascript, yaml, markdown]
ci:
autofix_prs: true # set false to stop pull-request commits being added by pre-commit.ci