/CLAUDE.md
CLAUDE.md at /CLAUDE.md
Path: CLAUDE.md
@takazudo/mdx-formatter
AST-based markdown and MDX formatter powered by a Rust engine (via napi-rs). Published as a scoped npm package (ESM-only).
Tech Stack
- Language: TypeScript (strict mode, ES2022 target, Node16 module resolution)
- Runtime: Node.js >= 18
- Package manager: pnpm
- Test framework: vitest
- Linting: ESLint (flat config) + Prettier + lefthook (pre-commit hooks)
- Build:
tsc(output todist/) - Doc site: zudo-doc / Astro (workspace in
doc/) - Rust implementation: Production-ready Rust engine in
crates/(markdown-rs + napi-rs + WASM)
Commands
pnpm build # Compile TypeScript to dist/
pnpm test # Run tests (vitest run)
pnpm test:watch # Watch mode
pnpm test:coverage # Coverage report
pnpm lint # ESLint check
pnpm lint:fix # ESLint autofix
pnpm check # Prettier + ESLint check
pnpm check:fix # Prettier + ESLint autofix
Conventions
- Commits: Start with a scope prefix, then a short description:
[formatter]- main formatter script (src/, test/, build, CLI)[doc]- documentation site related updates (doc/)[claude]- Claude Code related tweaks (.claude/, CLAUDE.md)[misc]- other things (CI, dependencies, config, etc.)
- Unused vars: Prefix with
_(enforced by ESLintargsIgnorePattern: '^_') - Imports: Always use
.jsextension in TypeScript imports (required for ESM with Node16 resolution) - Console:
no-consoleiswarneverywhere exceptsrc/cli.tsandformat-stdin.js
Package Publishing
- Scoped package:
@takazudo/mdx-formatter filesfield limits published content to:dist/,format-stdin.js,README.md,LICENSEprepublishOnlyrunstsc && vitest runautomatically- Use
/l-version-incrementfor stable releases - Use
/l-version-nextfor prerelease (@nextdist-tag) - Use
/l-version-promoteto promote a next version to stable