Skip to content

thedaviddias/Front-End-Checklist / packages/cli

frontendchecklist

Verified

Review 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.

FileKindSize
.gitignoreother6 B
README.mdmarkdown2.4 KB
SKILL.mdskill md2.7 KB
package.jsonmanifest1.5 KB
scripts/build.tsscript1.9 KB
src/args.tsscript5.5 KB
src/commands/audit.tsscript2.8 KB
src/commands/lookup.tsscript5.0 KB
src/commands/review.tsscript3.9 KB
src/content.tsscript1.5 KB
src/index.tsscript2.9 KB
src/output.tsscript3.3 KB
src/spec.tsscript5.1 KB
tests/cli.test.mjsscript4.6 KB
tsconfig.jsonconfig202 B

scripts/build.ts

View on GitHub
/**
 * Build the publishable CLI:
 * - dist/index.js: single-file ESM bundle (workspace packages inlined, so the
 *   published package has no private dependencies),
 * - dist/content.json: rules + checklists snapshot, so the CLI works offline
 *   and matches the installed version.
 */
import { chmodSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'
import { createRequire } from 'node:module'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { build } from 'esbuild'

const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
const repoRoot = path.resolve(packageRoot, '../..')
const distDir = path.join(packageRoot, 'dist')
const pkg: unknown = JSON.parse(readFileSync(path.join(packageRoot, 'package.json'), 'utf-8'))
const version = String(Reflect.get(Object(pkg), 'version'))

// The content loaders are TypeScript CommonJS modules; tsx makes them requireable.
const require = createRequire(import.meta.url)
const { loadLocalChecklists, loadLocalRules } = require('@repo/mcp/content-loader')

mkdirSync(distDir, { recursive: true })

const content = { rules: loadLocalRules(), checklists: loadLocalChecklists(repoRoot) }
writeFileSync(path.join(distDir, 'content.json'), JSON.stringify(content))

await build({
  entryPoints: [path.join(packageRoot, 'src/index.ts')],
  outfile: path.join(distDir, 'index.js'),
  bundle: true,
  platform: 'node',
  format: 'esm',
  target: 'node20',
  external: ['undici'],
  define: { __CLI_VERSION__: JSON.stringify(version) },
  banner: {
    js: [
      '#!/usr/bin/env node',
      "import { createRequire as __fecCreateRequire } from 'node:module';",
      'const require = __fecCreateRequire(import.meta.url);'
    ].join('\n')
  },
  legalComments: 'none',
  logLevel: 'warning'
})
chmodSync(path.join(distDir, 'index.js'), 0o755)

process.stdout.write(
  `Built @frontendchecklist/cli ${version}: ${content.rules.length} rules, ${content.checklists.length} checklists\n`
)
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: 471kUpdated Claude CodeCodexVerifiedInstall
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: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall