JSX parsing plugin for the Acorn JavaScript parser that enables fast parsing of React JSX syntax
76
{
"context": "This criteria evaluates how effectively the engineer uses acorn-jsx to parse and analyze JSX fragments in JavaScript code. The focus is on using the appropriate acorn-jsx parser extension and correctly identifying and traversing JSX fragment AST nodes.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Parser extension",
"description": "Uses acorn.Parser.extend() with the acorn-jsx plugin to create a JSX-capable parser",
"max_score": 20
},
{
"name": "Fragment detection",
"description": "Correctly identifies JSXFragment nodes in the AST (not JSXElement nodes) when traversing parsed code",
"max_score": 25
},
{
"name": "Children traversal",
"description": "Accesses the children property of JSXFragment nodes to examine fragment contents",
"max_score": 20
},
{
"name": "Child type identification",
"description": "Identifies different child node types (JSXElement, JSXText, JSXExpressionContainer) by checking the type property",
"max_score": 20
},
{
"name": "Nested fragments",
"description": "Handles nested JSXFragment nodes correctly by recursively traversing or using AST walker utilities",
"max_score": 15
}
]
}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