CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-babel-plugin-transform-es2015-computed-properties

Babel plugin that compiles ES2015 computed properties to ES5-compatible code

88

1.07x
Overview
Eval results
Files

rubric.jsonevals/scenario-6/

{
  "context": "This evaluation assesses how well the engineer uses Babel's AST transformation APIs to convert ObjectMethod nodes with computed keys into function expressions, preserving async/generator flags and properly handling the transformation within object expressions.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Visitor pattern usage",
      "description": "Uses Babel's visitor pattern to target ObjectExpression nodes and processes them appropriately",
      "max_score": 15
    },
    {
      "name": "ObjectMethod detection",
      "description": "Correctly identifies ObjectMethod nodes within object properties using t.isObjectMethod() or equivalent type checking",
      "max_score": 15
    },
    {
      "name": "Computed property check",
      "description": "Filters for computed properties using the 'computed' flag or property on ObjectMethod nodes",
      "max_score": 15
    },
    {
      "name": "Function expression conversion",
      "description": "Converts ObjectMethod to FunctionExpression using t.functionExpression() or t.toExpression() helper",
      "max_score": 20
    },
    {
      "name": "Async flag preservation",
      "description": "Preserves the 'async' flag when creating function expressions from async computed methods",
      "max_score": 15
    },
    {
      "name": "Generator flag preservation",
      "description": "Preserves the 'generator' flag when creating function expressions from generator computed methods",
      "max_score": 15
    },
    {
      "name": "Property replacement",
      "description": "Replaces the ObjectMethod with an ObjectProperty containing the function expression using appropriate node construction (t.objectProperty())",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-babel-plugin-transform-es2015-computed-properties

tile.json