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 format preset capabilities to generate both readable and minified JavaScript code from AST nodes. The focus is on proper utilization of FORMAT_DEFAULTS and FORMAT_MINIFY presets.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses escodegen.generate",
"description": "Correctly imports and uses escodegen's generate() function to convert AST nodes to JavaScript code",
"max_score": 20
},
{
"name": "Uses FORMAT_DEFAULTS",
"description": "Properly applies escodegen.FORMAT_DEFAULTS preset for readable code generation (either directly or by passing it as options)",
"max_score": 25
},
{
"name": "Uses FORMAT_MINIFY",
"description": "Properly applies escodegen.FORMAT_MINIFY preset for minified code generation (either directly or by passing it as options)",
"max_score": 25
},
{
"name": "Readable output quality",
"description": "The readable code generation produces properly formatted output with appropriate indentation, spacing, and readability features consistent with FORMAT_DEFAULTS behavior",
"max_score": 15
},
{
"name": "Minified output quality",
"description": "The minified code generation produces compact output with minimal whitespace consistent with FORMAT_MINIFY behavior",
"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