diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml index 66b3ac68..b7475f6d 100644 --- a/.github/linters/.markdown-lint.yml +++ b/.github/linters/.markdown-lint.yml @@ -1,29 +1,7 @@ # https://github.com/DavidAnson/markdownlint#rules--aliases -# markdownlint -c .github/linters/.markdown-lint.yml . - -# MD001/heading-increment/header-increment Heading levels should only increment by one level at a time -MD001: false # MD013/line-length Line length MD013: false -# MD024/no-duplicate-heading/no-duplicate-header -MD024: false - -# MD026/no-trailing-punctuation Trailing punctuation in heading -MD026: false - -# MD029/ol-prefix Ordered list item prefix -MD029: false - -# MD033/no-inline-html Inline HTML -MD033: false - -# MD040 fenced-code-language - Fenced code blocks should have a language specified -MD040: false - -# MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading -MD041: false - -# MD059/descriptive-link-text Link text should be descriptive -MD059: false +# MD036/no-emphasis-as-heading Emphasis used instead of a heading +MD036: false diff --git a/.markdownlint.yaml b/.markdownlint.yaml deleted file mode 100644 index f1d751b6..00000000 --- a/.markdownlint.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# Markdownlint configuration -# Disable line length rule for long URLs and badges -MD013: false -# Allow emphasis for styled section labels -MD036: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index de2e1097..c2ce1e4a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,16 @@ exclude: | repos: # Standard pre-commit hooks for basic file checks + - repo: local + hooks: + - id: check-zip-file-is-not-committed + name: check no zip files are committed + description: Zip files are not allowed in the repository + language: fail + entry: | + Zip files are not allowed in the repository as they are hard to + track and have security implications. Please remove the zip file from the repository. + files: (?i)\.zip$ - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: @@ -29,6 +39,7 @@ repos: rev: v4.0.0-alpha.8 hooks: - id: prettier + name: run prettier types_or: [css, html, javascript, json, markdown, yaml] additional_dependencies: ["prettier@3.8.1"] @@ -36,3 +47,18 @@ repos: rev: v0.47.0 hooks: - id: markdownlint + name: run markdownlint + description: check Markdown files with markdownlint + args: [--config=.github/linters/.markdown-lint.yml] + types: [markdown] + files: \.md$ + + - repo: https://github.com/adrienverge/yamllint + rev: v1.38.0 + hooks: + - id: yamllint + name: run yamllint + description: check YAML files with yamllint + args: [--strict, -c=.github/linters/.yaml-lint.yml] + types: [yaml] + files: \.ya?ml$