-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
59 lines (56 loc) · 2.21 KB
/
.pre-commit-config.yaml
File metadata and controls
59 lines (56 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# See pre-commit.com for documentation.
#
# Some helpful commands:
# - `pre-commit install` to install the hooks.
# - `pre-commit run --all-files --verbose` to run the hooks manually.
# - `git commit -n/--no-verify` to skip the hooks.
# - `pre-commit autoupdate` to update the hooks to the latest version.
# - `pre-commit clean` to clean out cached files.
# - In hooks configurations below with `files` & `exclude` options set: to
# enumerate all files that will be processed by the hook, run:
# `git ls-files | grep -E '{files}' | grep -v -E '{exclude}'`
# where {files} is the regex of files to process, & {exclude} is the regex of
# files to exclude.
# https://pre-commit.ci/ configuration
ci:
autofix_prs: false
autoupdate_schedule: monthly
repos:
# Pre-commit's built-in collection
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
exclude: "^images/.*$"
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: no-commit-to-branch
- id: trailing-whitespace
# Prettier setup — will run for all files. See prettier.config.js for
# configuration.
#
# Using this particular mirror repo because the official one [1] was
# deprecated for... what appears to be a holy war — here's a ton of threads
# with more context [2][3]. For my purposes, what's important is that this
# setup is working as long as I use this mirror repo [4], which is also the
# recommendation from conversations in those threads.
#
# [1] https://github.com/pre-commit/mirrors-prettier
# [2] https://github.com/pre-commit/pre-commit.com/pull/957
# [3] https://github.com/prettier/prettier/issues/15742
# [4] https://github.com/rbubley/mirrors-prettier
- repo: https://github.com/rbubley/mirrors-prettier
rev: "v3.8.1"
hooks:
- id: prettier
additional_dependencies:
- prettier@3.7.4
# used for formatting HTML as Liquid files
- "@shopify/prettier-plugin-liquid@1.7.0"
exclude: "^js/jquery.min.js$"