Claude/start learning thread 0195oy t ur jj nn4q j sw55tibq#3
Conversation
- Add markdownlint-cli for automated markdown linting - Create .markdownlint.json configuration with sensible defaults - Add npm scripts for checking and fixing markdown errors - Create shell scripts for markdown maintenance: - check-markdown.sh: Check for lint errors - fix-markdown.sh: Auto-fix lint errors - setup-pre-commit.sh: Optional pre-commit hook setup - Add MARKDOWN_MAINTENANCE.md documentation guide - Fix 32 auto-fixable markdown lint errors in existing files - Update .gitignore to exclude node_modules and npm logs This provides a complete workflow for maintaining clean, consistent markdown files across the repository.
- Add language specifiers to code blocks (text, markdown) - Fix ordered list numbering consistency in README.md - Adjust line length in MARKDOWN_MAINTENANCE.md - Disable MD001 (heading increment) rule for GitHub-style READMEs that use HTML details/summary sections with headers All markdown files now pass linting without errors.
There was a problem hiding this comment.
Pull request overview
This pull request adds markdown linting infrastructure to maintain consistent and high-quality markdown documentation across the repository.
- Introduces markdownlint-cli tooling with npm scripts and shell scripts for checking and auto-fixing markdown files
- Adds comprehensive documentation guide explaining markdown maintenance workflows and common lint errors
- Applies markdown formatting fixes to existing README.md and GIT_GUIDE.md files (trailing spaces, blank lines, code block language tags)
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/setup-pre-commit.sh |
Shell script to install a pre-commit hook that automatically checks staged markdown files |
scripts/fix-markdown.sh |
Shell script to auto-fix markdown lint errors across the repository |
scripts/check-markdown.sh |
Shell script to check markdown files for lint errors without modifying them |
package.json |
Adds markdownlint-cli dependency and npm scripts for markdown linting workflows |
.markdownlint.json |
Configuration file defining markdownlint rules and exceptions |
MARKDOWN_MAINTENANCE.md |
Comprehensive guide documenting markdown maintenance workflows, common errors, and best practices |
README.md |
Formatting fixes including trailing spaces removal, blank line additions, and code block language specification |
GIT_GUIDE.md |
Formatting improvements with consistent blank line spacing around sections |
.gitignore |
Adds Node.js-related exclusions for node_modules and log files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| If you'd like to make a profile README, use the simplified instructions below or follow the instructions in the [Managing your profile README](https://docs.github.com/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme) article. | ||
|
|
||
| 1. Make a new public repository with a name that matches your GitHub username. | ||
| 2. Create a file named `README.md` in it's root. The "root" means not inside any folder in your repository. |
There was a problem hiding this comment.
The spelling of "it's" should be "its" in this context. "Its" is the possessive form, while "it's" is a contraction of "it is". The sentence should read "Create a file named README.md in its root."
| 2. Create a file named `README.md` in it's root. The "root" means not inside any folder in your repository. | |
| 2. Create a file named `README.md` in its root. The "root" means not inside any folder in your repository. |
| ``` | ||
|
|
||
| <img alt="profile.md file screenshot" src="/images/my-profile-file.png"/> | ||
| 5. For commits, you can enter a short commit message that describes what you changes you made. This helps others know what's included in your commit. GitHub offers a simple default message, but let's change it slightly for practice. Enter `Add PROFILE.md` in the first text-entry field below **Commit new file**. Then, if you want to confirm what your screen should look like, expand the dropdown below. |
There was a problem hiding this comment.
The word "you" is missing between "what" and "changes". The sentence should read "describes what changes you made" instead of "describes what you changes you made".
| 5. For commits, you can enter a short commit message that describes what you changes you made. This helps others know what's included in your commit. GitHub offers a simple default message, but let's change it slightly for practice. Enter `Add PROFILE.md` in the first text-entry field below **Commit new file**. Then, if you want to confirm what your screen should look like, expand the dropdown below. | |
| 5. For commits, you can enter a short commit message that describes what changes you made. This helps others know what's included in your commit. GitHub offers a simple default message, but let's change it slightly for practice. Enter `Add PROFILE.md` in the first text-entry field below **Commit new file**. Then, if you want to confirm what your screen should look like, expand the dropdown below. |
| echo "$STAGED_MD_FILES" | sed 's/^/ - /' | ||
| echo "" | ||
|
|
||
| if echo "$STAGED_MD_FILES" | xargs markdownlint; then |
There was a problem hiding this comment.
Potential issue with word splitting when using xargs. If markdown filenames contain spaces, this command may fail. Consider using xargs -d '\n' to handle filenames with spaces properly, or use xargs -0 with git diff --cached --name-only -z.
| ```json | ||
| { | ||
| "default": true, | ||
| "MD013": { | ||
| "line_length": 120 | ||
| }, | ||
| "MD033": { | ||
| "allowed_elements": ["details", "summary", "img", "br", "h2"] | ||
| }, | ||
| "MD041": false, | ||
| "MD034": false, | ||
| "MD036": false | ||
| } | ||
| ``` |
There was a problem hiding this comment.
The markdownlint configuration in MARKDOWN_MAINTENANCE.md documentation (lines 189-202) doesn't match the actual configuration in .markdownlint.json.
The documentation shows MD013 configured with "line_length": 120, but the actual config has MD013 disabled (false). Also, MD001 is disabled in the actual config but not mentioned in the documentation.
| **What this means:** | ||
|
|
||
| - **default: true** - Enable all rules by default | ||
| - **MD013** - Line length limit set to 120 characters (relaxed from default 80) |
There was a problem hiding this comment.
Inconsistency between documentation and configuration. The documentation at line 207 states that the line length limit is "set to 120 characters (relaxed from default 80)", but the actual .markdownlint.json file has MD013 set to false (completely disabled), not configured to 120 characters.
| - **MD013** - Line length limit set to 120 characters (relaxed from default 80) | |
| - **MD013** - Line length limit is **not enforced** (rule disabled) |
No description provided.