Skip to content

Commit 5173f0c

Browse files
authored
Update pre-commit add more hooks (#259)
1 parent 155be37 commit 5173f0c

File tree

3 files changed

+28
-29
lines changed

3 files changed

+28
-29
lines changed

.github/linters/.markdown-lint.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,7 @@
11
# https://github.com/DavidAnson/markdownlint#rules--aliases
2-
# markdownlint -c .github/linters/.markdown-lint.yml .
3-
4-
# MD001/heading-increment/header-increment Heading levels should only increment by one level at a time
5-
MD001: false
62

73
# MD013/line-length Line length
84
MD013: false
95

10-
# MD024/no-duplicate-heading/no-duplicate-header
11-
MD024: false
12-
13-
# MD026/no-trailing-punctuation Trailing punctuation in heading
14-
MD026: false
15-
16-
# MD029/ol-prefix Ordered list item prefix
17-
MD029: false
18-
19-
# MD033/no-inline-html Inline HTML
20-
MD033: false
21-
22-
# MD040 fenced-code-language - Fenced code blocks should have a language specified
23-
MD040: false
24-
25-
# MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading
26-
MD041: false
27-
28-
# MD059/descriptive-link-text Link text should be descriptive
29-
MD059: false
6+
# MD036/no-emphasis-as-heading Emphasis used instead of a heading
7+
MD036: false

.markdownlint.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ exclude: |
1313
1414
repos:
1515
# Standard pre-commit hooks for basic file checks
16+
- repo: local
17+
hooks:
18+
- id: check-zip-file-is-not-committed
19+
name: check no zip files are committed
20+
description: Zip files are not allowed in the repository
21+
language: fail
22+
entry: |
23+
Zip files are not allowed in the repository as they are hard to
24+
track and have security implications. Please remove the zip file from the repository.
25+
files: (?i)\.zip$
1626
- repo: https://github.com/pre-commit/pre-commit-hooks
1727
rev: v6.0.0
1828
hooks:
@@ -29,10 +39,26 @@ repos:
2939
rev: v4.0.0-alpha.8
3040
hooks:
3141
- id: prettier
42+
name: run prettier
3243
types_or: [css, html, javascript, json, markdown, yaml]
3344
additional_dependencies: ["prettier@3.8.1"]
3445

3546
- repo: https://github.com/igorshubovych/markdownlint-cli
3647
rev: v0.47.0
3748
hooks:
3849
- id: markdownlint
50+
name: run markdownlint
51+
description: check Markdown files with markdownlint
52+
args: [--config=.github/linters/.markdown-lint.yml]
53+
types: [markdown]
54+
files: \.md$
55+
56+
- repo: https://github.com/adrienverge/yamllint
57+
rev: v1.38.0
58+
hooks:
59+
- id: yamllint
60+
name: run yamllint
61+
description: check YAML files with yamllint
62+
args: [--strict, -c=.github/linters/.yaml-lint.yml]
63+
types: [yaml]
64+
files: \.ya?ml$

0 commit comments

Comments
 (0)