Babel helper functions for inserting module loads
Overall
score
99%
{
"context": "This criteria evaluates how effectively the engineer uses @babel/types AST node builder functions to construct JavaScript AST nodes. The focus is on proper usage of builder functions like variableDeclaration(), identifier(), literal constructors, callExpression(), memberExpression(), ifStatement(), binaryExpression(), blockStatement(), and returnStatement() from the @babel/types package.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Variable declaration builders",
"description": "Uses @babel/types builder functions (variableDeclaration, variableDeclarator, identifier) to create variable declarations. Should use appropriate literal builders (numericLiteral, stringLiteral, booleanLiteral) for initialization values.",
"max_score": 25
},
{
"name": "Member call builders",
"description": "Uses @babel/types callExpression() and memberExpression() builders to create function calls on objects (e.g., console.log, Math.max). Should properly construct member expressions with object and property identifiers, and pass arguments using appropriate literal builders.",
"max_score": 25
},
{
"name": "Conditional statement builders",
"description": "Uses @babel/types ifStatement() builder with proper condition using binaryExpression() for comparisons. Should correctly construct the consequent using blockStatement() and returnStatement() builders with appropriate node structures.",
"max_score": 25
},
{
"name": "Code generation",
"description": "Uses @babel/generator (or its default export) to convert AST nodes into JavaScript source code. Should properly import and call the generator function with an AST node to produce code strings.",
"max_score": 25
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-babel--helper-module-importsevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10