Babel helper functions for inserting module loads
Overall
score
99%
{
"context": "This criteria evaluates how well the engineer uses Babel's decorator transformation capabilities to build a transpiler. The focus is on proper usage of @babel/core APIs and @babel/plugin-proposal-decorators plugin to transform decorator syntax.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses @babel/core",
"description": "Imports and uses the @babel/core package for code transformation (e.g., transform, transformSync, or transformAsync functions)",
"max_score": 25
},
{
"name": "Configures decorator plugin",
"description": "Uses @babel/plugin-proposal-decorators in the Babel configuration with appropriate options (e.g., specifying the decorator version like '2023-11' or 'legacy')",
"max_score": 30
},
{
"name": "Handles transformation result",
"description": "Correctly extracts and returns the transformed code from Babel's transformation result object (typically accessing the .code property)",
"max_score": 20
},
{
"name": "Proper API structure",
"description": "Implements the transpile function that accepts code string and options object, returning a result object containing the transformed code",
"max_score": 15
},
{
"name": "Handles options",
"description": "Passes transformation options to Babel's transform API (e.g., plugins array, presets, or other Babel configuration options)",
"max_score": 10
}
]
}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