|
| 1 | +# Linting Guide |
| 2 | + |
| 3 | +This project uses multiple linters to maintain code and documentation quality. |
| 4 | + |
| 5 | +## Available Linters |
| 6 | + |
| 7 | +### ESLint (JavaScript/TypeScript) |
| 8 | + |
| 9 | +Lints TypeScript source code in the `src/` directory. |
| 10 | + |
| 11 | +```bash |
| 12 | +npm run lint:js # Check for issues |
| 13 | +npm run lint:js:fix # Auto-fix issues |
| 14 | +``` |
| 15 | + |
| 16 | +### Markdownlint (Documentation) |
| 17 | + |
| 18 | +Validates all markdown files (`.md`) for consistency and best practices. |
| 19 | + |
| 20 | +```bash |
| 21 | +npm run lint:md # Check markdown files |
| 22 | +npm run lint:md:fix # Auto-fix markdown issues |
| 23 | +``` |
| 24 | + |
| 25 | +Configuration: [.markdownlint.json](../.markdownlint.json) |
| 26 | + |
| 27 | +### Actionlint (GitHub Actions) |
| 28 | + |
| 29 | +Validates GitHub Actions workflow files automatically on pull requests and pushes to main. |
| 30 | + |
| 31 | +This runs automatically in CI when workflow files are modified. |
| 32 | + |
| 33 | +## Run All Linters |
| 34 | + |
| 35 | +```bash |
| 36 | +npm run lint # Run all linters |
| 37 | +npm run lint:fix # Auto-fix all issues |
| 38 | +``` |
| 39 | + |
| 40 | +## CI/CD Integration |
| 41 | + |
| 42 | +- **Lint workflow** (`.github/workflows/lint.yml`) - Runs all linters after successful build |
| 43 | +- **Markdownlint workflow** (`.github/workflows/markdownlint.yml`) - Runs on markdown file changes |
| 44 | +- **Actionlint workflow** (`.github/workflows/actionlint.yml`) - Runs on workflow file changes |
| 45 | + |
| 46 | +## Configuration Files |
| 47 | + |
| 48 | +- [.eslintrc](../.eslintrc) - ESLint configuration (if exists) |
| 49 | +- [.markdownlint.json](../.markdownlint.json) - Markdownlint rules |
| 50 | +- [.markdownlintignore](../.markdownlintignore) - Files to exclude from markdown linting |
| 51 | + |
| 52 | +## Ignored Paths |
| 53 | + |
| 54 | +The following are automatically ignored by linters: |
| 55 | + |
| 56 | +- `node_modules/` - Dependencies |
| 57 | +- `dist/` - Build output |
| 58 | +- `.agentready/` - Agent reports |
| 59 | +- `CHANGELOG.md` - Auto-generated by semantic-release |
0 commit comments