ECMAScript code generator that transforms Mozilla's Parser API ASTs back into executable JavaScript code
95
{
"context": "This criteria evaluates how well the engineer uses escodegen's advanced comment preservation features to format AST into JavaScript code while maintaining proper comment indentation, spacing, and blank line preservation.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses escodegen.generate()",
"description": "Uses escodegen.generate() function to transform the AST into JavaScript code",
"max_score": 15
},
{
"name": "Uses escodegen.attachComments()",
"description": "Uses escodegen.attachComments() to attach comments and tokens to the AST before generation",
"max_score": 20
},
{
"name": "Enables comment option",
"description": "Passes { comment: true } in options to escodegen.generate() to enable comment preservation",
"max_score": 15
},
{
"name": "Multiline comment adjustment",
"description": "Uses { format: { adjustMultilineComment: true } } option to enable intelligent multiline comment indentation",
"max_score": 20
},
{
"name": "Blank line preservation",
"description": "Uses { preserveBlankLines: true } option to maintain vertical spacing from the original source",
"max_score": 15
},
{
"name": "Provides sourceCode",
"description": "Passes { sourceCode: originalSource } option to enable accurate spacing and blank line preservation",
"max_score": 15
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-escodegendocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10