JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q38003F
  • License MIT

A package to perform a series of code quality checks including linting, testing, spell checking, TypeScript checking, and building.

Package Exports

  • ui-code-health-check
  • ui-code-health-check/dist/index.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 (ui-code-health-check) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CH ✅

UI Code Health Check - a simple CLI helper tool that automates your project's key quality checks—linting, testing, TypeScript and spell checking, and building—with a single command. Instead of running each script separately, this tool executes your predefined scripts in order, saving you time and ensuring consistency across your workflow.

Features

  • Linting: Checks code style with ESLint.
  • Testing: Runs your test suite (e.g., Vitest).
  • Spell Checking: Finds typos with cspell.
  • Type Checking: Verifies types with TypeScript.
  • Build: Runs your build process (e.g., Vite).
  • Smart Skipping: Skips any missing scripts automatically.

Installation

Add this package as a dev dependency:

npm install --save-dev ui-code-health-check
# or
pnpm add -D ui-code-health-check
# or
yarn add -D ui-code-health-check

Usage

After installation, you can run the health check from your project root:

npx ch

Or add it as a script in your package.json (example):

{
  "scripts": {
    "your-script-name": "ch"
  }
}

How It Works

The tool checks your package.json for the following scripts and runs them in order if they exist:

  1. lint
  2. test
  3. cspell
  4. ts-ch
  5. build

If a script is missing, that step is skipped.

Then run:

npm run <your-script-name>

Example package.json

{
  "scripts": {
    "lint": "eslint .",
    "test": "vitest run",
    "cspell": "cspell \"src/**/*.{ts,tsx,md}\"",
    "ts-ch": "npx tsc --noemit",
    "build": "tsc && vite build"
  }
}

Note: The cspell and ts-ch scripts are enforced by this tool and cannot be renamed or customized. Other scripts like lint, test, and build are chosen for compatibility with industry standards.