Stop wasting time on code reviews discussing semicolons and spacing. Automate everything with PR CheckMate.
The Problem We All Face
Picture this: It's Monday morning. Your team just opened a pull request. Within minutes, review comments start rolling in:
"Please add a semicolon here"
"Run Prettier on this file"
"Did you check the spelling in the README?"
"ESLint is complaining about unused variables"
Sound familiar? 😅
Developers end up spending time on mechanical tasks instead of solving real problems. The review process slows down. People get frustrated. And the worst part? These issues are completely preventable.
The Real Cost of Manual Code Quality Checks
Consider what happens in a typical day:
- Developer writes a feature → pushes code
- Reviewer notices formatting issues → requests changes
- Developer runs Prettier manually → commits again
- Reviewer finds a typo in documentation → another round
- Developer fixes it → push again
- CI/CD pipeline finally runs ESLint → more failures
- Repeat 3-4 times before merge
That's not one PR anymore — that's chaos.
Introducing PR CheckMate
www.npmjs.com/package/pr-checkmate
PR CheckMate is an npm package that bundles all your code quality tools into one zero-config solution:
✅ ESLint — catches code issues and style violations
✅ Prettier — auto-formats your entire codebase
✅ Dependency Checks — alerts you to suspicious package.json changes
✅ cspell — catches spelling mistakes in code and docs
✅ Auto-commit — fixes issues and commits automatically
No more manual setup. No more forgetting to run formatters. Just install once and let it work.
Installation & Setup (2 minutes)
Step 1: Install PR CheckMate
npm install --save-dev pr-checkmate
That's it. You don't need to install ESLint, Prettier, or cspell separately. PR CheckMate includes them all.
Step 2: Initialize Configuration
npx pr-checkmate init
You'll be prompted to specify your source path:
? Where is your project source code? (Use arrow keys)
❯ src
app
Enter manually
This creates a pr-checkmate.json file:
{
"sourcePath": "src"
}
Step 3: (Optional) Customize Configuration
PR CheckMate ships with sensible defaults, but you can customize:
-
ESLint rules — add your
.eslintrc.jsoreslint.config.mjs -
Prettier config — add your
.prettierrc -
Spellcheck dictionary — add your
cspell.json
If you have local configs, PR CheckMate automatically detects and uses them. Otherwise, it uses bundled defaults.
Running Checks Locally
Before pushing, run checks locally to catch issues early:
# Run all checks
npx pr-checkmate all
# Run specific checks
npx pr-checkmate lint # ESLint only
npx pr-checkmate prettier # Format code
npx pr-checkmate deps # Check dependencies
npx pr-checkmate spellcheck # Spell check
Real Example Output
🚀 Running job: all
🔍 Running ESLint...
📋 Using local ESLint config
✅ ESLint passed
📦 Checking dependencies...
✅ Dependencies OK
🎨 Running Prettier...
📋 Using local Prettier config
✅ Prettier completed
🔤 Running spellcheck...
📦 Using pr-checkmate cspell config
✅ Spellcheck passed
Integrating with GitHub Actions
This is where the magic happens. Set up automated checks on every pull request:
Create .github/workflows/pr-quality.yml
name: 🔍 PR Quality Checks
on:
pull_request:
branches: [main, develop]
jobs:
quality-checks:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🔧 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: 📦 Install dependencies
run: npm ci
- name: 🔍 Run PR CheckMate
run: npx pr-checkmate all
What this does:
- Triggers on every pull request to
mainordevelop - Checks out your code
- Sets up Node.js with caching (faster builds!)
- Installs dependencies
- Runs all PR CheckMate checks
Result
Now every PR is automatically validated. No manual intervention needed:
✅ Lint check passed
✅ Dependency check passed
✅ Prettier formatting verified
✅ Spellcheck passed
If any check fails, the PR is blocked until issues are fixed. This happens before code review even begins.
Advanced: Auto-fix and Auto-commit
Want PR CheckMate to fix issues automatically? Create a more advanced workflow:
name: 🔧 Auto-fix Code Issues
on:
pull_request:
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
auto-fix:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: 🔧 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: 📦 Install dependencies
run: npm ci
- name: 🔍 Run PR CheckMate
run: npx pr-checkmate prettier
- name: 💾 Commit changes
run: |
git config user.name "PR CheckMate Bot"
git config user.email "bot@checkmate.dev"
git add -A
if ! git diff --cached --quiet; then
git commit -m "style: auto-format code with Prettier"
git push
fi
This workflow:
- Runs Prettier on every PR
- Auto-commits formatting fixes
- Pushes changes back to the PR
No more back-and-forth on formatting! 🎉
Real-World Example: Before and After
Before PR CheckMate
PR opened → 1st review → "add semicolons" → developer fixes → 2nd review
→ "run prettier" → developer fixes → 3rd review → "spellcheck readme"
→ developer fixes → 4th review → finally approved ❌ Takes 2-3 hours
After PR CheckMate
PR opened → Automated checks run → All issues fixed → ✅ Ready to review
→ Code review in 15 minutes → Merged
What Each Tool Does
🔍 ESLint (Linting)
Catches code issues before they cause bugs:
// ❌ ESLint catches these:
var x = 1; // Should use const/let
if (x == 1) {} // Should use ===
unused_var = 2; // Unused variable
🎨 Prettier (Formatting)
Enforces consistent style automatically:
// Before Prettier
const obj={a:1,b:2,c:3}
const fn=(x)=>x*2
// After Prettier
const obj = { a: 1, b: 2, c: 3 };
const fn = x => x * 2;
📦 Dependency Check
Alerts to suspicious package.json changes:
{
"name": "my-project",
"version": "1.0.0",
"dependencies": {
// Added 50 new packages? ⚠️ Flag for review
"random-package": "^1.0.0"
}
}
🔤 cspell (Spellcheck)
Catches typos in code, docs, and JSON:
❌ "Dependancies" → ✅ "Dependencies"
❌ "occured" → ✅ "Occurred"
❌ "seperate" → ✅ "Separate"
Configuration: Customizing Rules
Using Your Own ESLint Config
Just create an eslint.config.mjs in your project root. PR CheckMate will use it:
// eslint.config.mjs
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
export default [
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tsParser,
},
plugins: {
'@typescript-eslint': tsPlugin,
},
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'no-console': 'warn',
},
},
];
Custom Prettier Config
Create .prettierrc:
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2
}
Custom Spellcheck Dictionary
Create cspell.json:
{
"version": "0.2",
"language": "en",
"words": [
"mycompany",
"TypeScript",
"ESLint"
],
"ignorePaths": [
"**/node_modules/**",
"**/dist/**"
]
}
FAQ
Q: Do I need to install ESLint, Prettier, and cspell separately?
A: No! PR CheckMate bundles them all. Just install pr-checkmate and you're done.
Q: What if I already have ESLint configured?
A: PR CheckMate detects your local config and uses it automatically.
Q: Can I use this in monorepos?
A: Yes! Specify different source paths using pr-checkmate.json.
Q: Does it slow down my CI/CD pipeline?
A: No. Most checks complete in seconds. It's faster than manual reviews!
Q: Can I skip certain checks?
A: Yes, disable them in your workflow:
- name: Run only linting
run: npx pr-checkmate lint
Q: What Node versions are supported?
A: Node 18.0.0 and above.
Getting Started Today
-
Install:
npm install --save-dev pr-checkmate -
Initialize:
npx pr-checkmate init -
Test locally:
npx pr-checkmate all - Add to CI: Copy the GitHub Actions workflow above
- Push: Enjoy automatic code quality checks! 🎉
The Bottom Line
Code quality shouldn't require manual effort. ESLint, Prettier, and spellchecks should just work automatically, before code review even begins.
PR CheckMate eliminates the friction. Your team can focus on what matters: solving problems, not debating semicolons.
Try it today. Your pull request reviews will never be the same.
Top comments (0)