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-8/

{
  "context": "This criteria evaluates how well the engineer understands and implements the generator integration pattern for Babel plugins, specifically focusing on indirect AST transformation by manipulating node metadata rather than direct node rewriting.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Plugin declaration",
      "description": "Uses @babel/helper-plugin-utils declare() function to properly declare the plugin, ensuring cross-version compatibility",
      "max_score": 10
    },
    {
      "name": "Visitor pattern implementation",
      "description": "Implements the visitor pattern correctly by returning an object with a visitor property containing NumericLiteral handler",
      "max_score": 15
    },
    {
      "name": "Hexadecimal detection",
      "description": "Correctly identifies hexadecimal literals by checking node.extra.raw or node.extra property for the 0x/0X prefix pattern (case-insensitive)",
      "max_score": 15
    },
    {
      "name": "Metadata manipulation",
      "description": "Uses indirect transformation by deleting or clearing the node.extra property rather than creating new nodes or directly modifying node.value",
      "max_score": 30
    },
    {
      "name": "Generator delegation",
      "description": "Allows Babel's code generator to handle the actual output formatting by relying on the generator to use node.value when node.extra is unavailable",
      "max_score": 20
    },
    {
      "name": "Member expression handling",
      "description": "Correctly handles hexadecimal literals used in member expressions without causing syntax errors or incorrect transformations",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

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

tile.json