Babel's modular runtime helpers that provide transpilation support for modern JavaScript features
94
{
"context": "This criteria evaluates how well an engineer uses @babel/core's plugin lifecycle hooks (pre, post, manipulateOptions) to implement a Babel plugin that tracks transformation statistics and modifies parser configuration.",
"type": "weighted_checklist",
"checklist": [
{
"name": "pre() hook implementation",
"description": "Uses the pre() lifecycle hook to initialize the statistics tracking object before AST traversal begins. The statistics object should be stored in a way accessible to the visitor methods.",
"max_score": 25
},
{
"name": "post() hook implementation",
"description": "Uses the post() lifecycle hook to attach statistics to file.metadata.transformStats after AST traversal completes. Should properly check the trackStats option before attaching metadata.",
"max_score": 25
},
{
"name": "manipulateOptions() hook implementation",
"description": "Uses the manipulateOptions(opts, parserOpts) lifecycle hook to modify parserOpts.plugins to include 'jsx' for enabling JSX parsing. This should be done before parsing begins.",
"max_score": 25
},
{
"name": "Visitor pattern usage",
"description": "Implements visitor methods (FunctionDeclaration and ArrowFunctionExpression) to count occurrences during AST traversal. Properly increments counters in the statistics object initialized in pre().",
"max_score": 20
},
{
"name": "Plugin structure",
"description": "Returns a proper plugin object from the plugin function with the correct structure containing visitor object and lifecycle hook methods (pre, post, manipulateOptions).",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-babel--runtimedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10