doom lint
Lint documentation files using ESLint with built-in rules for Markdown, MDX, and spell checking.Usage
Arguments
Root directory of the documentation. Defaults to current working directory.
Options
Glob patterns of source directories or files to lintExample:
Disable spell checkingExample:
Show debug logsExample:
Ignore internal routes defined in configExample:
Features
Built-in Rules
Doom includes ESLint rules for:- Markdown/MDX - Formatting and structure
- Spell Checking - Via cspell (optional)
- Links - Broken link detection
- Code Blocks - Syntax validation
- Frontmatter - Required fields and format
Spell Checking
By default, cspell is enabled and checks:- Document content
- Code comments
- Using configurable dictionaries
--no-cspell flag.
Internal Routes
When--ignore flag is used, files matching internalRoutes config patterns are excluded from linting.
Examples
Lint all documentation
Lint specific files
Lint without spell checking
Lint ignoring internal routes
Lint with debug output
Lint specific directory
Lint multiple patterns
Configuration
cspell Options
Customize spell checking indoom.config.yaml:
Internal Routes
Exclude internal/draft content:--ignore flag to skip these during linting.
Output
Successful lint
With errors
Exit Code
- 0 - No errors (warnings are ok)
- 1 - Errors found
Common Issues
Misspelled Words
Error:-
Add to cspell config:
-
Add inline comment:
-
Disable for block:
Missing Frontmatter
Error:Broken Links
Error:- Fix the link path
- Ensure target file exists
- Check for typos
Ignore Patterns
Inline Ignore
File-level Ignore
Specific Rules
CI/CD Integration
GitHub Actions
GitLab CI
Pre-commit Hook
Best Practices
- Lint Often - Run before commits
- Fix Errors - Don’t commit with errors
- Review Warnings - Address warnings when possible
- Custom Dictionary - Maintain project-specific terms
- CI Integration - Automate linting in CI/CD
Performance
Slow Linting
If linting is slow:-
Narrow glob patterns:
-
Disable cspell for faster linting:
- Ignore node_modules (automatically handled)
-
Use —ignore to skip internal routes:
Related Commands
- doom build - Build after linting
- doom translate - Translate after linting