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-checkUsage
After installation, you can run the health check from your project root:
npx chOr 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:
linttestcspellts-chbuild
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
cspellandts-chscripts are enforced by this tool and cannot be renamed or customized. Other scripts likelint,test, andbuildare chosen for compatibility with industry standards.