Babel helper functions for inserting module loads
Overall
score
99%
{
"context": "This criteria evaluates how well the engineer uses Babel's core packages (@babel/parser, @babel/traverse, @babel/types) to analyze JavaScript code and detect Babel helper functions. The focus is on proper usage of Babel's AST manipulation APIs to build a practical helper analysis tool.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses @babel/parser",
"description": "Code uses @babel/parser's parse() function to parse JavaScript source code into an AST for analysis",
"max_score": 20
},
{
"name": "Uses @babel/traverse",
"description": "Code uses @babel/traverse to walk the AST and visit nodes to find helper function calls or definitions",
"max_score": 25
},
{
"name": "Helper detection logic",
"description": "Code correctly identifies Babel helper functions by recognizing function calls or function declarations with Babel helper naming patterns (typically starting with underscore like _classCallCheck, _asyncToGenerator, etc.) using @babel/types node type checking methods",
"max_score": 25
},
{
"name": "AST node type checking",
"description": "Code uses @babel/types utility functions for node type validation (e.g., isIdentifier, isCallExpression, isFunctionDeclaration) to properly identify helper patterns in the AST",
"max_score": 15
},
{
"name": "Multi-file analysis",
"description": "Implementation correctly handles analysis across multiple files, parsing each file separately and aggregating results",
"max_score": 10
},
{
"name": "Helper usage reporting",
"description": "Code produces a report containing helper names, their frequencies, and optimization recommendations as specified in the requirements",
"max_score": 5
}
]
}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