thedaviddias/Front-End-Checklist / packages/cli
frontendchecklist
VerifiedReview frontend code and live pages against the Front-End Checklist (380+ rules for accessibility, performance, SEO, security, HTML, CSS, JavaScript, images, i18n, privacy, testing) using the `frontendchecklist` CLI. Use when writing, reviewing, or shipping HTML/CSS/JS/JSX/TSX/Vue/Svelte/Astro code, before a commit or PR, or when asked to audit a public URL.
| File | Kind | Size |
|---|---|---|
| .gitignore | other | 6 B |
| README.md | markdown | 2.4 KB |
| SKILL.md | skill md | 2.7 KB |
| package.json | manifest | 1.5 KB |
| scripts/build.ts | script | 1.9 KB |
| src/args.ts | script | 5.5 KB |
| src/commands/audit.ts | script | 2.8 KB |
| src/commands/lookup.ts | script | 5.0 KB |
| src/commands/review.ts | script | 3.9 KB |
| src/content.ts | script | 1.5 KB |
| src/index.ts | script | 2.9 KB |
| src/output.ts | script | 3.3 KB |
| src/spec.ts | script | 5.1 KB |
| tests/cli.test.mjs | script | 4.6 KB |
| tsconfig.json | config | 202 B |
src/content.ts
View on GitHubimport { existsSync, readFileSync } from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { loadLocalChecklists, loadLocalRules } from '@repo/mcp/content-loader'
import type { CuratedChecklist, Rule } from '@repo/types'
export interface Content {
rules: Rule[]
checklists: CuratedChecklist[]
}
const HERE = path.dirname(fileURLToPath(import.meta.url))
/**
* Check whether parsed JSON has the bundled content shape.
*
* @param value - Parsed JSON.
* @returns True when it has rule and checklist arrays.
*/
function isContent(value: unknown): value is Content {
return (
typeof value === 'object' &&
value !== null &&
Array.isArray(Reflect.get(value, 'rules')) &&
Array.isArray(Reflect.get(value, 'checklists'))
)
}
/**
* Load the rule corpus and checklists.
*
* Published builds ship a `content.json` snapshot next to the bundle, so the
* CLI works offline and matches the version you installed. Inside the
* monorepo (no snapshot), it reads the canonical MDX content directly.
*
* @returns Rules and checklists.
*/
export function loadContent(): Content {
const bundled = path.join(HERE, 'content.json')
if (existsSync(bundled)) {
const parsed: unknown = JSON.parse(readFileSync(bundled, 'utf-8'))
if (isContent(parsed)) return parsed
throw new Error(`Corrupt content snapshot: ${bundled}`)
}
const repoRoot = path.resolve(HERE, '../../..')
return { rules: loadLocalRules(), checklists: loadLocalChecklists(repoRoot) }
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |