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 source code and extract attribute information from the generated AST. The focus is on proper parser initialization, AST traversal, and identification of JSX-specific node types.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Parser initialization",
"description": "Uses acorn.Parser.extend() with the jsx plugin to create a JSX-enabled parser",
"max_score": 15
},
{
"name": "AST parsing",
"description": "Uses Parser.parse() or parser.parse() to generate an AST from the JSX source code",
"max_score": 15
},
{
"name": "JSXElement identification",
"description": "Correctly identifies and processes JSXElement nodes in the AST (node.type === 'JSXElement')",
"max_score": 10
},
{
"name": "Element name extraction",
"description": "Extracts element names from JSXIdentifier nodes in openingElement.name (e.g., node.openingElement.name.name)",
"max_score": 10
},
{
"name": "JSXAttribute handling",
"description": "Processes JSXAttribute nodes from openingElement.attributes array to extract regular attributes",
"max_score": 10
},
{
"name": "String literal detection",
"description": "Identifies string literal attribute values by checking if attribute.value.type === 'Literal' and value is a string",
"max_score": 10
},
{
"name": "Expression container detection",
"description": "Identifies expression attributes by checking if attribute.value.type === 'JSXExpressionContainer'",
"max_score": 10
},
{
"name": "JSXSpreadAttribute handling",
"description": "Processes JSXSpreadAttribute nodes from the attributes array to handle spread syntax",
"max_score": 10
},
{
"name": "Boolean attribute detection",
"description": "Identifies boolean attributes by checking if attribute.value is null or undefined",
"max_score": 5
},
{
"name": "JSX element values",
"description": "Identifies when attribute values are JSX elements by checking if attribute.value.type === 'JSXElement'",
"max_score": 5
}
]
}