From 2087faacb3ab5ac04337bb9630846ece6c4555a9 Mon Sep 17 00:00:00 2001 From: pengqun Date: Thu, 15 Feb 2024 23:48:59 +0800 Subject: [PATCH] Add pre-commit config to run awesome-lint --- .github/workflows/action.yml | 2 +- .markdownlint.json | 2 +- .pre-commit-config.yaml | 13 +++++++++++++ README.md | 2 +- README_zh.md | 5 +++++ 5 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 7e2e677..ad85d40 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -4,7 +4,7 @@ on: pull_request: push: branches: [main] - + jobs: Awesome_Lint: runs-on: ubuntu-latest diff --git a/.markdownlint.json b/.markdownlint.json index 8cfe24b..307f3aa 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -2,4 +2,4 @@ "default": true, "MD013": false, "MD024": false -} \ No newline at end of file +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..5535d90 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,13 @@ +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - repo: https://github.com/pengqun/pre-commit-hooks + rev: v1.1.0 + hooks: + - id: awesome-lint diff --git a/README.md b/README.md index 3798dcb..3f0d3de 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Awesome Documentation [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) [![Lint](https://github.com/pengqun/awesome-documentation/actions/workflows/action.yml/badge.svg)](https://github.com/pengqun/awesome-documentation/actions/workflows/action.yml) diff --git a/README_zh.md b/README_zh.md index ba9de3e..3c366d5 100644 --- a/README_zh.md +++ b/README_zh.md @@ -1,3 +1,8 @@ + + # Awesome Documentation [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) [![Lint](https://github.com/pengqun/awesome-documentation/actions/workflows/action.yml/badge.svg)](https://github.com/pengqun/awesome-documentation/actions/workflows/action.yml) > 一份关于软件文档模板、工具、指南和示例的精选资源列表(持续更新中)。