cisagov / skeleton-generic

A generic skeleton project for quickly getting a new cisagov project started.
Creative Commons Zero v1.0 Universal
13 stars 11 forks source link

Add markdownlint Rules to Enforce Specific Formatting #89

Closed mcdonnnj closed 2 years ago

mcdonnnj commented 2 years ago

πŸ—£ Description

This PR adds new rules for MD035 and MD046 to our markdownlint pre-commit configuration.

πŸ’­ Motivation and context

These are the last two rules that default to consistent. We should prefer a specific style that is consistent across all of our projects instead of only ensuring that things are done consistently across a single project.

πŸ§ͺ Testing

Automatic testing passes. I confirmed that the rules are enforced with local testing:

# This is the main heading #

## This is a sub-heading with a horizontal rule ##

***

## This is a sub-heading with an indent style code block ##

    # #!/usr/bin/env bash
    # echo "Hello, World!"
$ pre-commit run markdownlint --files mdl_test.md
markdownlint.............................................................Failed
- hook id: markdownlint
- exit code: 1

mdl_test.md:5 MD035/hr-style Horizontal rule style [Expected: ---; Actual: ***]
mdl_test.md:9 MD046/code-block-style Code block style [Expected: fenced; Actual: indented]

βœ… Checklist