CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-babel-plugin-transform-es2015-literals

Babel plugin that compiles ES2015 unicode string and number literals to ES5

86

0.97x
Overview
Eval results
Files

rubric.jsonevals/scenario-5/

{
  "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-literals

tile.json