CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-babel--runtime

Babel's modular runtime helpers that provide transpilation support for modern JavaScript features

94

1.18x
Overview
Eval results
Files

rubric.jsonevals/scenario-9/

{
  "context": "This evaluation assesses how well the engineer uses @babel/core's cloneInputAst option to safely preserve the original AST while performing transformations. The focus is on correct usage of Babel's AST cloning capability to prevent mutation of the input AST during the transformation process.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses cloneInputAst option",
      "description": "The implementation uses the cloneInputAst option set to true when calling a Babel transformation API (transformFromAst, transformFromAstSync, or transformFromAstAsync) to prevent mutation of the original AST",
      "max_score": 40
    },
    {
      "name": "Parses input correctly",
      "description": "Uses @babel/core's parse, parseSync, or parseAsync function to convert the source code string into an AST",
      "max_score": 15
    },
    {
      "name": "Transforms from AST",
      "description": "Uses transformFromAst, transformFromAstSync, or transformFromAstAsync to perform the transformation from the parsed AST",
      "max_score": 15
    },
    {
      "name": "Var-to-const transformation",
      "description": "Implements the var-to-const transformation correctly, either through a custom plugin or by using an appropriate Babel plugin",
      "max_score": 15
    },
    {
      "name": "Returns correct structure",
      "description": "Returns an object with the three required properties: original (the unmodified AST), transformed (the transformed code string), and wasModified (boolean indicating if changes were made)",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-babel--runtime

tile.json