JSX parsing plugin for the Acorn JavaScript parser that enables fast parsing of React JSX syntax
76
{
"context": "This criteria evaluates how well the engineer uses acorn-jsx to parse JSX boolean attributes. Boolean attributes in JSX are attributes without explicit values (e.g., <input disabled />), and acorn-jsx represents these with a null value in the AST.",
"type": "weighted_checklist",
"checklist": [
{
"name": "acorn-jsx integration",
"description": "Uses acorn.Parser.extend(jsx()) to create a Parser with JSX support",
"max_score": 20
},
{
"name": "AST parsing",
"description": "Calls Parser.parse() to parse the JSX code string into an AST",
"max_score": 15
},
{
"name": "JSXElement traversal",
"description": "Traverses the AST to locate JSXElement nodes",
"max_score": 15
},
{
"name": "JSXOpeningElement access",
"description": "Accesses the openingElement property of JSXElement nodes to get attributes",
"max_score": 15
},
{
"name": "Attribute filtering",
"description": "Filters attributes array to identify JSXAttribute nodes where value is null (boolean attributes)",
"max_score": 20
},
{
"name": "Attribute name extraction",
"description": "Extracts the attribute name from JSXAttribute.name.name property",
"max_score": 10
},
{
"name": "Result structure",
"description": "Returns an array of objects with 'name' and 'value' properties, where value is null for boolean attributes",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-acorn-jsxdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10