TypeScript rules
70 rules across 16 categories, enforced by chisel-js.
Bundle
Section titled “Bundle”bundle · 1 rule
bundle:oversized-app-chunk
Section titled “bundle:oversized-app-chunk”A client chunk containing application code exceeds the size budget
Fix. Split the route or import the heavy part dynamically. Vendor-only chunks are tolerated as a known cost; a chunk mixing application code is a regression. Requires a production build — run chisel-js bundle after building.
Coherence
Section titled “Coherence”coherence · 2 rules
coherence:empty-test-glob
Section titled “coherence:empty-test-glob”A test-runner include pattern matches no files
Fix. Fix the pattern or delete it. A glob matching nothing means part of the suite stopped running and CI stayed green — the one failure mode the test suite cannot report itself.
coherence:broken-doc-path
Section titled “coherence:broken-doc-path”Maintained documentation cites a path that does not exist
Fix. Update the reference or remove it. Checked in root and docs/ markdown; generated API references and build output are excluded.
Colour Enforcement
Section titled “Colour Enforcement”colour-enforcement · 4 rules
colour:arbitrary-value-banned
Section titled “colour:arbitrary-value-banned”Arbitrary Tailwind colour value syntax (bg-[…], text-[#…], border-[…], etc.)
Fix. Add the colour as a CSS custom property in app.css first, then reference it as a Tailwind token (e.g. bg-primary).
colour:palette-class-banned
Section titled “colour:palette-class-banned”Hardcoded Tailwind palette colour (text-red-500, bg-slate-800, from-blue-500)
Fix. Use a semantic token from app.css (bg-background, text-muted-foreground, text-destructive). A palette class pins one appearance and cannot follow the theme, so it looks wrong in whichever mode it was not written for.
colour:dynamic-class-banned
Section titled “colour:dynamic-class-banned”Dynamic class construction (class={bg-${variable}})
Fix. Use a lookup object of pre-approved token names instead: const colourMap = { primary: ‘bg-primary’ }.
colour:modifier-on-semantic
Section titled “colour:modifier-on-semantic”Experimental modifier class on semantic HTML
Fix. Modifier classes (.glass, .neumorphic) restricted to Hero components and Overlay widgets.
Component Enforcement
Section titled “Component Enforcement”component-enforcement · 24 rules
component-enforcement:html-button-banned
Section titled “component-enforcement:html-button-banned”Raw
Fix. Use <Button, Toggle> from shadcn.
component-enforcement:html-textarea-banned
Section titled “component-enforcement:html-textarea-banned”Raw
Fix. Use
component-enforcement:html-select-banned
Section titled “component-enforcement:html-select-banned”Raw
Fix. Use <Select, NativeSelect, Combobox> from shadcn.
component-enforcement:html-label-banned
Section titled “component-enforcement:html-label-banned”Raw
Fix. Use
component-enforcement:html-progress-banned
Section titled “component-enforcement:html-progress-banned”Raw
Fix. Use
component-enforcement:html-dialog-banned
Section titled “component-enforcement:html-dialog-banned”Raw
Fix. Use <Dialog, AlertDialog, Drawer, Sheet> from shadcn.
component-enforcement:html-nav-banned
Section titled “component-enforcement:html-nav-banned”Raw
Fix. Use <NavigationMenu, Breadcrumb, Menubar, Sidebar, Pagination> from shadcn.
component-enforcement:html-kbd-banned
Section titled “component-enforcement:html-kbd-banned”Raw element
Fix. Use from shadcn.
component-enforcement:html-hr-banned
Section titled “component-enforcement:html-hr-banned”Raw
element
Fix. Use
component-enforcement:html-form-banned
Section titled “component-enforcement:html-form-banned”Raw