Skip to content

Commit bc31be0

Browse files
committed
Makefile: format-md include MDX files
1 parent 72651fa commit bc31be0

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

CLAUDE.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,11 @@ project.
178178

179179
After making any code modifications, run the appropriate formatting commands:
180180

181-
#### Markdown Files
181+
#### Markdown and MDX Files
182182

183-
- **Format**: Run `make format-md` after modifying any markdown files
184-
- **Check**: Run `make check-md` to verify markdown files are formatted
183+
- **Format**: Run `make format-md` after modifying any markdown (.md) or MDX
184+
(.mdx) files
185+
- **Check**: Run `make check-md` to verify markdown and MDX files are formatted
185186
correctly
186187

187188
#### Rust and TOML Files

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ check-format: ## Check code formatting
8484
taplo format --check
8585

8686
.PHONY: check-md
87-
check-md: ## Check if markdown files are properly formatted
88-
@echo "Checking markdown formatting..."
89-
npx prettier --check "**/*.md"
90-
@echo "Markdown format check completed."
87+
check-md: ## Check if markdown and MDX files are properly formatted
88+
@echo "Checking markdown and MDX formatting..."
89+
npx prettier --check "**/*.md" "**/*.mdx"
90+
@echo "Markdown and MDX format check completed."
9191

9292
.PHONY: fix-trailing-whitespace
9393
fix-trailing-whitespace: ## Remove trailing whitespaces from all files
@@ -150,10 +150,10 @@ format: ## Format code using rustfmt and taplo
150150
taplo format
151151

152152
.PHONY: format-md
153-
format-md: ## Format all markdown files to wrap at 80 characters
154-
@echo "Formatting markdown files..."
155-
npx prettier --write "**/*.md"
156-
@echo "Markdown files have been formatted to 80 characters."
153+
format-md: ## Format all markdown and MDX files to wrap at 80 characters
154+
@echo "Formatting markdown and MDX files..."
155+
npx prettier --write "**/*.md" "**/*.mdx"
156+
@echo "Markdown and MDX files have been formatted to 80 characters."
157157

158158
.PHONY: lint
159159
lint: ## Run linter (clippy)

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "1.0.0",
44
"description": "Prettier configuration for markdown formatting",
55
"scripts": {
6-
"format:md": "prettier --write \"**/*.md\"",
7-
"check:md": "prettier --check \"**/*.md\""
6+
"format:md": "prettier --write \"**/*.md\" \"**/*.mdx\"",
7+
"check:md": "prettier --check \"**/*.md\" \"**/*.mdx\""
88
},
99
"devDependencies": {
1010
"prettier": "^3.0.0"

0 commit comments

Comments
 (0)