Automated PR quality checks: linting, formatting, dependency analysis, and spellcheck
npm install pr-checkmatemain.package.json / package-lock.json for dependency changes.
> ⚠️ Note: Currently, PR CheckMate only supports Node.js projects.
- PR CheckMate – Zero-config CLI that automates ESLint, Prettier, spellcheck, dependency checks, and npm audit for pull requests.
> Everything works out of the box.
User configuration is stored in:
```
json
{
"sourcePath": "src",
"commands": {
"npx pr-checkmate init": "Update pr-checkmate.json",
"npx pr-checkmate all": "Run all checks",
"npx pr-checkmate lint": "Lint code using ESLint",
"npx pr-checkmate prettier": "Format code using Prettier",
"npx pr-checkmate deps": "Check project dependencies",
"npx pr-checkmate npm-audit": "Run package vulnerabilities check",
"npx pr-checkmate security": "Security scan",
"npx pr-checkmate spellcheck": "Run spellcheck via cspell"
},
"eslint": {
"rules": {},
"ignorePatterns": []
},
"prettier": {
"rules": {}
},
"cspell": {
"words": [],
"ignorePaths": [],
"ignoreRegExpList": []
},
"documentation": {
"eslint": "https://eslint.org/docs/latest/rules/",
"typescriptEslint": "https://typescript-eslint.io/rules/",
"prettier": "https://prettier.io/docs/en/options.html",
"cspell": "https://cspell.org/configuration/"
}
}`
🛠 How It Works
$3
`bash
npm install --save-dev pr-checkmate
`$3
`bash
npx pr-checkmate init
`
> This creates:
> - pr-checkmate.json - Configuration file where you can specify the source code path and customize rules
> - .github/workflows/pr-checkmate.yml - GitHub Actions workflow for automated PR checks with auto-commit support$3
`bash
npx pr-checkmate
`#### ⚡ Jobs
| Job | Description |
|------------|-------------|
|
all | Run all checks: ESLint, dependency check, Prettier, spellcheck, security scan |
| lint | Lint code using ESLint |
| prettier | Format code using Prettier |
| deps | Check project dependencies |
| security | Run security scan for secrets |
| spellcheck | Run spellcheck via cspell (supports EN, RU, UK, HE, FR) |
| audit | Run npm audit --audit-level=moderate to check for vulnerable packages |
🤖 GitHub Actions Workflow (Auto-Generated)
When you run
npx pr-checkmate init, it automatically creates .github/workflows/pr-checkmate.yml:`yaml
name: PR Checkmate Quality Checkson:
pull_request:
branches: [main, master, develop]
types: [opened, synchronize, reopened]
permissions:
contents: write
pull-requests: write
jobs:
pr-checkmate-all:
name: PR Checkmate All Checks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Run PR Checkmate All Checks
run: npx pr-checkmate all
continue-on-error: true
- name: Auto-commit formatting changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
if ! git diff --cached --quiet; then
git commit -m "style: auto-format code with Prettier"
git push origin HEAD:${{ github.head_ref }}
echo "Formatting changes committed and pushed"
else
echo "No formatting changes needed"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
`$3
For the auto-commit feature to work, ensure your repository has the correct permissions:
1. Go to Settings → Actions → General → Workflow permissions
2. Select "Read and write permissions"
3. Save changes
> The workflow will automatically commit Prettier formatting fixes directly to your PR branch.
🌍 Multilingual Spellcheck Support
PR CheckMate includes built-in dictionaries for:
- 🇬🇧 English (en)
- 🇪🇸 Spanish (es)
- 🇫🇷 French (fr)
- 🇷🇺 Russian (ru)
- 🇺🇦 Ukrainian (uk)
- 🇮🇱 Hebrew (he)
No additional configuration needed - just use
npx pr-checkmate spellcheck and it will check spelling in all supported languages!
📌 Benefits
* ✅ Self-contained — the package handles all checks internally
* ✅ Works locally and in CI/CD (GitHub Actions, GitLab CI, etc.)
* ✅ Enforces a unified code style across repositories
* ✅ Automatic formatting and commits when needed
* ✅ Multilingual spellcheck support out of the box
* ✅ Minimal setup — just
init and npx pr-checkmate all`