CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-acorn-jsx

JSX parsing plugin for the Acorn JavaScript parser that enables fast parsing of React JSX syntax

76

1.68x
Overview
Eval results
Files

rubric.jsonevals/scenario-9/

{
  "context": "This criteria evaluates how well the engineer uses the acorn-jsx package to detect and validate empty expression containers in JSX attributes. The focus is on proper integration of acorn-jsx as a parser plugin and leveraging its built-in validation capabilities.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Parser initialization",
      "description": "Uses acorn.Parser.extend(jsx()) to create a JSX-enabled parser, correctly importing both acorn and acorn-jsx packages",
      "max_score": 25
    },
    {
      "name": "Parse invocation",
      "description": "Calls the Parser.parse() method with the JSX source code string to trigger parsing and validation",
      "max_score": 20
    },
    {
      "name": "Error handling",
      "description": "Uses try-catch to capture parsing errors thrown by acorn-jsx when empty expressions are encountered in attributes",
      "max_score": 25
    },
    {
      "name": "Error detection",
      "description": "Correctly identifies the specific error for empty attribute expressions (error message contains 'JSX attributes must only be assigned a non-empty expression' or similar validation error)",
      "max_score": 20
    },
    {
      "name": "Parser options",
      "description": "Provides appropriate parser options to Parser.parse() such as ecmaVersion and sourceType to ensure proper JSX parsing",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-acorn-jsx

tile.json