Babel plugin that transforms ECMAScript object rest and spread syntax into ES5-compatible code.
85
Quality
Pending
Does it follow best practices?
Impact
85%
1.06xAverage score across 10 eval scenarios
Pending
The risk profile of this skill
{
"context": "This criteria evaluates how well the engineer uses Babel's static expression evaluation capabilities, specifically the @babel/parser and @babel/traverse packages, to detect and evaluate constant expressions in JavaScript code.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses @babel/parser",
"description": "Code imports and uses @babel/parser (or the parse function from it) to parse JavaScript source code into an AST",
"max_score": 15
},
{
"name": "Uses @babel/traverse",
"description": "Code imports and uses @babel/traverse (or the traverse/default function) to traverse the AST",
"max_score": 15
},
{
"name": "Implements visitor pattern",
"description": "Code implements a visitor object with appropriate node type handlers (e.g., VariableDeclarator, AssignmentExpression, or BinaryExpression) to locate expressions that need evaluation",
"max_score": 20
},
{
"name": "Uses path.evaluate()",
"description": "Code calls the path.evaluate() method to perform static evaluation of expressions during traversal",
"max_score": 25
},
{
"name": "Checks evaluation confidence",
"description": "Code checks the 'confident' property returned by path.evaluate() to determine whether an expression is truly constant (evaluable with confidence)",
"max_score": 15
},
{
"name": "Extracts location information",
"description": "Code accesses node location information (e.g., node.loc.start.line or path.node.loc) to include line numbers in the results",
"max_score": 10
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10