CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-babel--helper-get-function-arity

Helper function to get function arity by analyzing parameter lists for assignment patterns and rest parameters

95

1.06x
Overview
Eval results
Files

rubric.jsonevals/scenario-10/

{
  "context": "This criteria evaluates how effectively an engineer uses @babel/helper-get-function-arity within a Babel plugin to analyze function parameter lists and determine required parameter counts.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import getFunctionArity",
      "description": "Correctly imports the getFunctionArity function from @babel/helper-get-function-arity package",
      "max_score": 15
    },
    {
      "name": "Babel plugin structure",
      "description": "Returns a valid Babel plugin object with a visitor property containing function node visitors",
      "max_score": 20
    },
    {
      "name": "Function node visiting",
      "description": "Implements visitor methods for function-type nodes (Function, FunctionDeclaration, FunctionExpression, or ArrowFunctionExpression) to traverse all functions in the code",
      "max_score": 20
    },
    {
      "name": "Call getFunctionArity",
      "description": "Calls getFunctionArity with the function node (path.node) to determine the required parameter count",
      "max_score": 25
    },
    {
      "name": "Add leading comment",
      "description": "Uses Babel's addComment method or similar API to add a leading comment to the function with the format indicating required parameter count",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-babel--helper-get-function-arity

tile.json