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's token context management features to access and report on the three custom token contexts (tc_oTag, tc_cTag, tc_expr) that the parser uses to track JSX parsing state.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Parser Extension",
"description": "Correctly extends the Acorn parser with acorn-jsx using acorn.Parser.extend(jsx()) to create a JSX-capable parser instance",
"max_score": 20
},
{
"name": "Access tokContexts",
"description": "Accesses the custom token contexts through Parser.acornJsx.tokContexts property after extending the parser",
"max_score": 30
},
{
"name": "Extract Context Properties",
"description": "Extracts and uses properties from the token context objects (tc_oTag, tc_cTag, tc_expr) to build the output",
"max_score": 25
},
{
"name": "Return All Three Contexts",
"description": "Returns information about all three JSX-specific token contexts: tc_oTag (opening tag context), tc_cTag (closing tag context), and tc_expr (expression/content context)",
"max_score": 20
},
{
"name": "Correct Output Format",
"description": "Returns an array of objects where each object has 'name' and 'description' properties as specified",
"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