From 5cb55da97a2aeaea046182932987e70d28388e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Paduszyn=CC=81ski?= Date: Fri, 3 Nov 2023 11:57:30 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Set=20u?= =?UTF-8?q?p=20the=20Markdown=20files=20linter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/lint-markdown-files.yml | 26 +++++++++++++++++++++++ .markdownlint.jsonc | 23 ++++++++++++++++++++ .pre-commit-config.yaml | 4 ++++ 3 files changed, 53 insertions(+) create mode 100644 .github/workflows/lint-markdown-files.yml create mode 100644 .markdownlint.jsonc diff --git a/.github/workflows/lint-markdown-files.yml b/.github/workflows/lint-markdown-files.yml new file mode 100644 index 0000000..ae4cab6 --- /dev/null +++ b/.github/workflows/lint-markdown-files.yml @@ -0,0 +1,26 @@ +name: Lint Markdown files + +on: + push: + branches: + - main + paths: + - '**.md' + pull_request: + branches: + - main + paths: + - '**.md' + +jobs: + lint: + name: Lint Markdown files + runs-on: ubuntu-latest + steps: + - name: Check out 🎉 + uses: actions/checkout@v4.1.1 + - name: Run `markdownlint` 🎨 + uses: DavidAnson/markdownlint-cli2-action@v13.0.0 + with: + config: .markdownlint.jsonc + globs: '**/*.md' diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc new file mode 100644 index 0000000..0b7c8d9 --- /dev/null +++ b/.markdownlint.jsonc @@ -0,0 +1,23 @@ +// Full list of rules and their options available at: +// https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.jsonc + +{ + // Default state for all rules + "default": true, + + // MD013/line-length - Line length + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md + "MD013": { + "line_length": 80, + "stern": true, + "tables": false + }, + + // MD014/commands-show-output - Dollar signs used before commands without showing output + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md014.md + "MD014": false, + + // MD043/required-headings/required-headers - Required heading structure + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md043.md + "MD043": false +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e895882..66a96e5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,6 +17,10 @@ repos: - --no-ensure-ascii - --no-sort-keys - id: trailing-whitespace + - repo: https://github.com/DavidAnson/markdownlint-cli2 + rev: 'v0.10.0' + hooks: + - id: markdownlint-cli2 - repo: https://github.com/psf/black rev: '23.10.1' hooks: From eef278a3a774e5167cfecd87e6b01849a696fe47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Paduszyn=CC=81ski?= Date: Fri, 3 Nov 2023 12:05:26 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=9A=A8=20Fix=20`markdownlint`=20error?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0ee229f..edc6c69 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,5 @@ + + ## Description