feat(ci): add markdownlint-cli2 for consistent markdown formatting#958
Merged
localden merged 2 commits intogithub:mainfrom Oct 21, 2025
Merged
feat(ci): add markdownlint-cli2 for consistent markdown formatting#958localden merged 2 commits intogithub:mainfrom
localden merged 2 commits intogithub:mainfrom
Conversation
Add automated markdown linting to ensure consistent formatting across all markdown files in the repository. Changes: - Add .markdownlint-cli2.jsonc configuration - Create .github/workflows/lint.yml for CI/CD integration - Fix all 908 existing markdown errors across 27 files - Enforce ATX-style headings and asterisk emphasis - Set consistent 2-space list indentation This prevents markdown errors after project initialization and maintains high documentation quality standards.
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds automated markdown linting to Spec Kit using markdownlint-cli2 to ensure consistent formatting across all markdown files. This prevents formatting errors in documentation and templates that users receive when initializing new projects.
- Configured markdownlint-cli2 with project-appropriate rules (allowing long lines, HTML elements, and YAML frontmatter)
- Added GitHub Actions workflow for automated linting on pushes and pull requests
- Fixed 908 existing markdown formatting errors across 27 files
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.markdownlint-cli2.jsonc |
Configuration file defining markdown linting rules tailored for technical documentation |
.github/workflows/lint.yml |
GitHub Actions workflow to automatically run markdown linting on all markdown files |
| Multiple template files | Fixed markdown formatting issues including missing blank lines, inconsistent list styles, and code block language specifiers |
| Documentation files | Corrected formatting in README, contributing guide, and other project documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
localden
approved these changes
Oct 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add markdownlint-cli2 for consistent markdown formatting
AI Assistance Disclosure
Summary
This PR adds automated markdown linting to Spec Kit using
markdownlint-cli2to ensure consistent formatting across all markdown files in the repository.Why this matters for Spec Kit:
/speckit.initto set up new projects, they receive clean, properly formatted markdown files without linting errorsPersonal note: After initializing spec-kit in my projects, I kept encountering markdown linting errors. This ensures that never happens again! 😄
How to Reproduce the Problem
Before this PR, cloning spec-kit and running markdownlint showed extensive errors:
Install markdownlint-cli2 globally:
Clone spec-kit main branch:
git clone https://github.com/specify-systems/spec-kit.git cd spec-kitRun the linter:
markdownlint-cli2 "**/*.md"Result - 908 errors across 27 files:
Common errors included:
After this PR, the same command produces:
Changes Made
1. Added
.markdownlint-cli2.jsoncconfigurationMD013) - technical docs often have long lines (URLs, code examples, tables)MD033) - necessary for advanced formatting like<div>,<details>,<summary>MD041) - template files use YAML frontmatter#instead of underline style)*italic*,**bold**)2. Created
.github/workflows/lint.ymlmainand all pull requestsDavidAnson/markdownlint-cli2-action@v193. Fixed all existing markdown errors
Ready for review! This ensures consistent, high-quality markdown formatting across the entire Spec Kit project. 🎉