Babel plugin that compiles ES2015 unicode string and number literals to ES5
86
{
"context": "This criteria evaluates the engineer's ability to use @babel/core and @babel/plugin-transform-literals to transform ES2015 binary and octal numeric literals in member expressions to ES5-compatible code. The focus is on proper Babel API usage and plugin integration.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Babel core import",
"description": "Uses @babel/core module (imports transformSync, transform, or similar transformation function from @babel/core)",
"max_score": 15
},
{
"name": "Plugin import",
"description": "Uses @babel/plugin-transform-literals plugin (imports or requires the plugin module)",
"max_score": 15
},
{
"name": "Plugin registration",
"description": "Registers the transform-literals plugin in Babel's plugins array or configuration",
"max_score": 20
},
{
"name": "Source code reading",
"description": "Reads the input file specified in command-line arguments (uses fs.readFileSync or similar to read the file from process.argv[2])",
"max_score": 10
},
{
"name": "Babel transformation",
"description": "Calls a Babel transformation function (transformSync, transform, or similar) with the source code and plugin configuration",
"max_score": 20
},
{
"name": "Output generation",
"description": "Outputs the transformed code to stdout (uses console.log or process.stdout.write with the transformed code property, typically result.code)",
"max_score": 10
},
{
"name": "Binary literal transformation",
"description": "Successfully transforms binary literals with member expressions (test case with 0b1111.toString() passes)",
"max_score": 5
},
{
"name": "Octal literal transformation",
"description": "Successfully transforms octal literals with member expressions (test case with 0o10.toFixed(2) passes)",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-babel-plugin-transform-es2015-literalsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10