Babel plugin that compiles ES2015 computed properties to ES5-compatible code
88
{
"context": "This evaluation assesses how well the engineer uses @babel/plugin-transform-computed-properties package capabilities to implement AST optimization through chunking for large objects with computed properties. The focus is on proper usage of Babel's visitor pattern, AST node creation, and the chunking strategy for objects with more than 10 computed properties.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Babel visitor pattern",
"description": "Correctly implements a Babel plugin using the visitor pattern with an ObjectExpression visitor method that processes nodes during AST traversal",
"max_score": 15
},
{
"name": "Computed property detection",
"description": "Properly identifies computed properties in ObjectExpression nodes by checking for properties where node.computed is true",
"max_score": 10
},
{
"name": "Chunking threshold logic",
"description": "Implements the 10-property threshold correctly: objects with ≤10 computed properties use single nested structure, >10 properties trigger chunking",
"max_score": 20
},
{
"name": "Chunk processing",
"description": "Correctly splits computed properties into chunks of maximum 10 properties each using array slicing or similar iteration logic",
"max_score": 15
},
{
"name": "Helper function usage",
"description": "Uses Babel helper functions (e.g., addHelper, addNamed) to reference or generate _defineProperty or similar helper that sets properties on objects",
"max_score": 15
},
{
"name": "AST node construction",
"description": "Creates appropriate AST nodes using Babel types (t.callExpression, t.identifier, t.variableDeclaration, etc.) to build the transformed output",
"max_score": 10
},
{
"name": "Temporary variable generation",
"description": "Generates unique temporary variable identifiers (using scope.generateUidIdentifier or similar) to hold the object between chunks for large objects",
"max_score": 10
},
{
"name": "Property order preservation",
"description": "Maintains the original order of properties during transformation, processing them sequentially through chunks",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-babel-plugin-transform-es2015-computed-propertiesdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10