JSPM

  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q111032F
  • License LicenseRef-Proprietary

Automated PR quality checks: linting, formatting, dependency analysis, and spellcheck

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 a public npm package for automating Pull Request checks. It helps teams maintain code quality by validating linting, formatting, dependency changes, and spelling before merging to the main branch.


⚡ Why PR CheckMate?

When a PR is opened, it's essential that the code follows project standards. PR CheckMate automatically checks:

  • Linting — TypeScript/JavaScript code compliance with ESLint rules
  • Prettier Auto-Format — automatically formats code and commits changes if needed
  • Dependency Changes — checks for updates in package.json/package-lock.json and warns about potential risks
  • Spellcheck — checks spelling in code, documentation, and JSON files using cspell

🛠 How It Works

1. Install via npm

npm install --save-dev pr_checkmate

2. Run as a CLI command

npx pr-checks <job>

<job> options:

Job Description
lint Lint code using ESLint
prettier Format code with Prettier and push changes
deps Check for dependency changes
spellcheck Run spellcheck on source and documentation

3. Use in GitHub Actions

Automatically check PRs by adding to your workflow:

jobs:
  pr-checks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v3
        with:
          node-version: 20
      - run: npm ci
      - run: npx pr-checks lint
      - run: npx pr-checks prettier
      - run: npx pr-checks deps
      - run: npx pr-checks spellcheck

🧰 Tech Stack

  • Node.js 20 — executes scripts
  • TypeScript — fully typed code
  • ESLint + @typescript-eslint — code linting
  • Prettier — auto-formatting
  • cspell — spellchecking
  • execa — running CLI commands from Node.js

📦 Features

  • ✅ Works locally and in CI/CD pipelines (GitHub Actions, GitLab CI, etc.)
  • ✅ Uses a built-in logger for console output
  • ✅ Automatically detects the current Git branch and pushes commits after auto-formatting
  • ✅ Self-contained package — no external environment variables required

💻 Example Usage in Node.js

import { 
  runLint, 
  runDependencyCheck,
  runPrettier,
  runSpellcheck
} from 'pr_checkmate';

async function runAllChecks() {
  await runLint();
  await runPrettier();
  await runDependencyCheck();
  await runSpellcheck();
}

runAllChecks();

📜 License

LicenseRef Proprietary © 2025