CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-acorn-jsx

tessl install tessl/npm-acorn-jsx@5.3.0

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

Agent Success

Agent success rate when using this tile

76%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.69x

Baseline

Agent success rate without this tile

45%

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how effectively an engineer uses the acorn-jsx package to parse JSX code and identify spread attributes. The focus is on proper usage of the parser's AST generation capabilities and correct identification of JSXSpreadAttribute nodes.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Parser integration",
      "description": "Correctly imports and integrates acorn-jsx with acorn using acorn.Parser.extend(jsx()) to create a JSX-capable parser instance",
      "max_score": 20
    },
    {
      "name": "AST generation",
      "description": "Uses Parser.parse() to generate an AST from the input JSX code string with appropriate options (sourceType and locations enabled)",
      "max_score": 15
    },
    {
      "name": "AST traversal",
      "description": "Implements proper tree traversal to visit all nodes in the AST, handling nested structures correctly",
      "max_score": 15
    },
    {
      "name": "JSXElement identification",
      "description": "Correctly identifies nodes with type 'JSXElement' in the AST",
      "max_score": 10
    },
    {
      "name": "JSXSpreadAttribute detection",
      "description": "Correctly identifies JSXSpreadAttribute nodes within the attributes array of JSXOpeningElement nodes",
      "max_score": 25
    },
    {
      "name": "Element name extraction",
      "description": "Extracts the element name from the JSXIdentifier node in the opening element's name property",
      "max_score": 10
    },
    {
      "name": "Spread expression extraction",
      "description": "Extracts the spread expression from the JSXSpreadAttribute's argument property, converting the expression node to source text",
      "max_score": 5
    }
  ]
}

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/acorn-jsx@5.3.x
tile.json