kinetograph.

Lint rules

What kinetograph lint checks, what triggers each rule, and how to fix it.

npx kinetograph lint src/index.tsx

npx kinetograph lint <entry> draws a few frames (8 spread over the composition, or --frames 0,30,60) and reports problems. Each finding names its rule, the layer and the frames. An error makes the exit code 1, and a warning doesn't.

Rules

RuleLevelTriggers whenFix
text-overflow-boxerrorA text layer is wider than its maxWidth because one word is too long to wrapMake the box wider, the text smaller, or break the word
text-overflow-canvaserrorDrawn text runs past an edge of the canvas. It is a warning if the text is inside the canvas in other frames, because it is moving in or outMove or shrink the text, or fit it to a width with fitText
text-overlapwarningSettled text, at full opacity and in the normal blend mode, covers a quarter or more of other textMove one of them. Text that fades, blends, or repeats the same words is left alone
off-canvaswarningA layer is completely outside the canvasMove it in, or remove it
missing-fonterrorA text layer names a font that isn't registered, or a registered font file isn't thereRegister the font: see Fonts
missing-asseterrorAn image, video, GIF, Lottie, LUT or audio file the project names isn't therePut the file at that path, usually under public/
compatwarningThe frame holds something the engine can't draw, so it is drawn without it or approximatedSee What works and the doctor output
project-notewarningThe project reports a problem outside any frame, such as a stylesheet that couldn't be built or a font that didn't downloadRead the message. The text that needed a missing font is already a missing-font error

In a TypeScript project, lint also reports TypeScript errors as type-error, and inspect-failed when it couldn't read a frame, usually because of a missing font or file listed above.

Lint, check and doctor

  • lint looks at the drawn frames: layout, missing files and fonts. Run it after every change to a scene.
  • check runs the TypeScript compiler, so it catches a misspelled prop that renders without an error. Run it after editing code. It needs a TypeScript project, so an HTML page has none.
  • doctor goes through every frame without the GPU and lists what the engine can't draw, and in which frames. Run it before a long render, especially for a project that uses HTML or CSS.

lint also repeats the type errors and a summary of doctor, but only for the frames it checks.

On this page