CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-slate-hyperscript

A hyperscript helper for creating Slate documents with JSX-like syntax.

90

1.15x
Overview
Eval results
Files

rubric.jsonevals/scenario-1/

{
  "context": "This criteria evaluates how well the engineer uses slate-hyperscript to create Slate editor documents with element and text attributes. The focus is on proper usage of JSX tags with attributes to specify element types, custom properties, and text formatting.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses jsx function",
      "description": "Imports and uses the jsx function from slate-hyperscript (or createHyperscript) as the JSX pragma for creating Slate structures",
      "max_score": 15
    },
    {
      "name": "Creates editor tag",
      "description": "Uses the <editor> JSX tag to create the top-level editor structure",
      "max_score": 10
    },
    {
      "name": "Element type attributes",
      "description": "Uses the type attribute on <element> tags to specify different element types (e.g., <element type=\"paragraph\">, <element type=\"heading\">)",
      "max_score": 20
    },
    {
      "name": "Custom element properties",
      "description": "Applies custom properties to elements by passing additional attributes (e.g., level, id, or other properties from the config)",
      "max_score": 20
    },
    {
      "name": "Text formatting attributes",
      "description": "Uses the <text> tag with formatting attributes (bold, italic, etc.) to create formatted text nodes when formatting is specified in the config",
      "max_score": 20
    },
    {
      "name": "Plain string handling",
      "description": "Correctly handles plain strings in content by allowing them to be auto-converted to text nodes (not wrapping them in <text> tags unnecessarily)",
      "max_score": 10
    },
    {
      "name": "Dynamic attribute spreading",
      "description": "Dynamically applies attributes from the config object to JSX tags (either through spreading or programmatic assignment)",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-slate-hyperscript

tile.json