tessl install tessl/npm-acorn-jsx@5.3.0JSX 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%
{
"context": "This criteria evaluates how well the engineer uses acorn-jsx to parse JSX code and extract information about different types of children (text, elements, and expressions) within JSX elements. The focus is on correct usage of the acorn-jsx parser and proper traversal of the resulting AST to identify JSXText, JSXElement, and JSXExpressionContainer nodes.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Parser initialization",
"description": "Uses acorn.Parser.extend() to create a parser with JSX support, passing the jsx plugin function",
"max_score": 15
},
{
"name": "Parse JSX code",
"description": "Calls Parser.parse() with appropriate options (ecmaVersion, sourceType) to parse the JSX code into an AST",
"max_score": 15
},
{
"name": "Navigate to children",
"description": "Correctly accesses the children array from the JSXElement node structure (openingElement, closingElement, children)",
"max_score": 15
},
{
"name": "Identify JSXText nodes",
"description": "Detects children with type 'JSXText' and extracts the text value from the appropriate property (value or raw)",
"max_score": 15
},
{
"name": "Identify JSXElement nodes",
"description": "Detects children with type 'JSXElement' and extracts element name from openingElement.name structure",
"max_score": 15
},
{
"name": "Identify JSXExpressionContainer nodes",
"description": "Detects children with type 'JSXExpressionContainer' to identify expression children",
"max_score": 15
},
{
"name": "Handle mixed children",
"description": "Correctly processes and categorizes all children when multiple types are present in the same parent element",
"max_score": 10
}
]
}