CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-babel--plugin-transform-parameters

Babel plugin that compiles ES2015 default and rest parameters to ES5-compatible code

91

1.02x
Overview
Eval results
Files

rubric.jsonevals/scenario-6/

{
  "context": "This evaluation assesses how well the engineer uses Babel's plugin development APIs to build a custom import path transformation plugin. The focus is on proper use of Babel's visitor pattern, AST node manipulation with @babel/types, and plugin declaration utilities.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Plugin declaration",
      "description": "Uses @babel/helper-plugin-utils (declare function) or returns a proper plugin object with 'name' and 'visitor' properties following Babel's plugin API structure",
      "max_score": 15
    },
    {
      "name": "Visitor pattern implementation",
      "description": "Implements a visitor method for ImportDeclaration nodes to intercept and process import statements during AST traversal",
      "max_score": 20
    },
    {
      "name": "Path validation",
      "description": "Uses @babel/types validators (e.g., isStringLiteral, isImportDeclaration) to verify node types before manipulation",
      "max_score": 10
    },
    {
      "name": "Node property access",
      "description": "Correctly accesses the 'source.value' property of ImportDeclaration nodes to retrieve the import path string",
      "max_score": 15
    },
    {
      "name": "AST node creation",
      "description": "Uses @babel/types builders (e.g., t.stringLiteral) to create new AST nodes for the transformed import paths",
      "max_score": 15
    },
    {
      "name": "Path replacement",
      "description": "Uses the NodePath API (path.node or path.replaceWith) to update the import source with the transformed path while preserving import structure",
      "max_score": 15
    },
    {
      "name": "Plugin options access",
      "description": "Accesses plugin configuration through the plugin API's options/state mechanism (api.opts, state.opts, or plugin options parameter) to retrieve pathMappings",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-babel--plugin-transform-parameters

tile.json