Package Exports
- pr-checkmate
- pr-checkmate/dist/cli.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pr-checkmate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
♟️ PR CheckMate
PR CheckMate is an npm package for automating Pull Request checks. It helps teams maintain code quality by automatically validating linting, formatting, dependencies, and spelling before merging to
main.
🔍 Why PR CheckMate?
- ✅ Automatic checks on every PR without extra setup.
- ✅ No need to install ESLint, Prettier, or cspell in your project — all included.
- ✅ Enforces a unified code style across repositories.
- ✅ Checks
package.json/package-lock.jsonfor dependency changes. - ✅ Spellcheck for code, documentation, and JSON files with multilingual support (EN, RU, UK, HE, FR).
- ✅ Package Vulnerabilities Check
- ✅ Scans for secrets using gitleaks
> ⚠️ **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.
🚀 Zero-Config by Default
You don't need to install or configure:
- ESLint
- Prettier
- cspell (with multilingual dictionaries)
- Security scanning tools
Everything works out of the box.
🧩 Fully Customizable
Users can override:
- ESLint rules and ignore patterns
- Prettier rules
- CSpell dictionary and ignore lists
- Which checks run
- Source code path
User configuration is stored in:
<project-root>/pr-checkmate.json⚙️ Example: pr-checkmate.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
1. Install
npm install --save-dev pr-checkmate2. Initialize
npx pr-checkmate initThis 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. Run Checks
npx pr-checkmate <job>⚡ 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:
name: PR Checkmate Quality Checks
on:
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 }}⚙️ GitHub Actions Permissions
For the auto-commit feature to work, ensure your repository has the correct permissions:
- Go to Settings → Actions → General → Workflow permissions
- Select "Read and write permissions"
- 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
initandnpx pr-checkmate all
🧰 Tech Stack
- Node.js 20 — executes CLI scripts
- TypeScript — fully typed code
- ESLint + @typescript-eslint — code linting
- Prettier — auto-formatting
- cspell — spellchecking with multilingual dictionaries
- execa — running CLI commands from Node.js
- gitleaks — secret scanning
📜 License
LicenseRef Proprietary © 2025