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

{
  "context": "This criteria evaluates how well the engineer uses @babel/core's PluginPass context and file-specific state management features to build a function call counter plugin. The focus is on correct usage of the visitor pattern, state storage mechanisms, and metadata manipulation.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Plugin structure",
      "description": "Plugin returns an object with a 'name' property and a 'visitor' object as per Babel plugin conventions",
      "max_score": 10
    },
    {
      "name": "Visitor implementation",
      "description": "Implements a visitor method for CallExpression nodes to detect and count function calls during AST traversal",
      "max_score": 25
    },
    {
      "name": "State initialization",
      "description": "Uses plugin lifecycle hooks (pre() or visitor enter method) to initialize the function call counter state, or initializes state on first access",
      "max_score": 15
    },
    {
      "name": "State storage",
      "description": "Uses the PluginPass context methods (this.file.set() or stores state on 'this' context) to maintain per-file state for the counter",
      "max_score": 20
    },
    {
      "name": "State retrieval",
      "description": "Correctly retrieves and updates the stored state (using this.file.get() or accessing 'this' context) when counting function calls",
      "max_score": 15
    },
    {
      "name": "Metadata assignment",
      "description": "Uses post() lifecycle hook or appropriate mechanism to add the final count to file metadata (this.file.metadata.functionCallCount)",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-babel--runtime

tile.json