Skip to content

Commit

Permalink
📝 Configure linting for .md
Browse files Browse the repository at this point in the history
  • Loading branch information
Searge committed Mar 3, 2024
1 parent 6e2e71f commit 16ceecc
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/lint-md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ on:
push:
branches-ignore:
- main
paths:
- "docs/**"
- "/README.md"
# paths:
# - "docs/**"
# - "/README.md"

permissions:
contents: read
Expand All @@ -23,6 +23,6 @@ jobs:
- name: Perform lint with markdownlint-cli
uses: nosborn/github-action-markdown-cli@v3.3.0
with:
files: docs/
files: ./
config_file: .markdownlint.yaml
dot: false
48 changes: 48 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Specify the rules for linting GitHub Markdown files
rules:
MD001: true # Heading levels should only increment by one level at a time
MD002: true # First heading should be a top-level heading
MD003: true # Heading style should be consistent
MD004: true # Unordered list style should be consistent
MD005: true # Inconsistent indentation for list items at the same level
MD006: true # Consider starting bulleted lists at the beginning of the line
MD007: true # Unordered list indentation should be consistent
MD009: true # Trailing spaces should be removed
MD010: true # Hard tabs should be replaced with spaces
MD011: true # Reversed link syntax
MD012: true # Multiple consecutive blank lines
MD013: false # Line length should be less than or equal to 80 characters
MD014: true # Dollar signs used before commands without showing output
MD018: true # No space after hash on atx style heading
MD019: true # Multiple spaces after hash on atx style heading
MD020: true # No space inside hashes on closed atx style heading
MD021: true # Multiple spaces inside hashes on closed atx style heading
MD022: true # Headers should be surrounded by blank lines
MD023: true # Headers must start at the beginning of the line
MD024: true # Multiple headers with the same content
MD025: true # Multiple top-level headers in the same document
MD026: true # Trailing punctuation in header
MD027: true # Multiple spaces after blockquote symbol
MD028: true # Blank line inside blockquote
MD029: true # Ordered list item prefix
MD030: true # Spaces after list markers
MD031: true # Fenced code blocks should be surrounded by blank lines
MD032: true # Lists should be surrounded by blank lines
MD033: true # Inline HTML
MD034: true # Bare URL used
MD035: true # Horizontal rule style
MD036: true # Emphasis used instead of a header
MD037: true # Spaces inside emphasis markers
MD038: true # Spaces inside code span elements
MD039: true # Spaces inside link text
MD040: true # Fenced code blocks should have a language specified
MD041: true # First line in file should be a top-level heading
MD042: true # No empty links
MD043: true # Required heading structure
MD044: true # Proper names should have the correct capitalization
MD045: true # Images should have alternate text (alt text)
MD046: true # Code block style
MD047: true # Files should end with a single newline character
MD048: true # Code fence style
MD049: true # Inconsistent ordered list delimiter
MD050: true # Level 1 headers should be followed by a blank line
4 changes: 4 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.github/*
application
terraform
!terraform/**/*.md

0 comments on commit 16ceecc

Please sign in to comment.