Babel plugin that transforms eval() calls containing string literals by parsing and compiling the string content at transform time
Overall
score
98%
{
"context": "This criteria evaluates how well the engineer uses Babel's schema-based option validation system to create a plugin with proper type checking and required option enforcement. The focus is on correctly using Babel's validation APIs rather than implementing custom validation logic.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Schema definition usage",
"description": "Uses Babel's schema validation system (e.g., declare() from @babel/helper-plugin-utils or similar validation mechanism) to define option types rather than manual validation",
"max_score": 30
},
{
"name": "String type validation",
"description": "Properly validates that the 'prefix' option is a string type using the schema system",
"max_score": 15
},
{
"name": "Array type validation",
"description": "Properly validates that the 'methods' option is an array type using the schema system",
"max_score": 15
},
{
"name": "Array item validation",
"description": "Validates that items within the 'methods' array are strings using the schema system (e.g., arrayOf or items validator)",
"max_score": 15
},
{
"name": "Required option enforcement",
"description": "Uses the schema system to mark 'prefix' as a required option that must be provided",
"max_score": 15
},
{
"name": "Optional field handling",
"description": "Correctly marks 'methods' as optional in the schema while 'prefix' is required",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-babel-plugin-transform-evaldocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10