Babel plugin to instrument React components with custom transforms
{
"context": "Evaluates whether the solution uses babel-plugin-react-transform to compile React components while surfacing the plugin's per-file `_components` metadata map. Focuses on correct plugin configuration, emitted metadata structure, and use of the provided map instead of custom logic.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Plugin enabled",
"description": "Babel configuration applies `babel-plugin-react-transform` with a `transforms` array rather than manual AST handling.",
"max_score": 20
},
{
"name": "Transforms configured",
"description": "Each transform entry passes through the plugin-required fields (`transform`, `imports`, `locals`) and allows the plugin to inject `components` metadata into transform options.",
"max_score": 20
},
{
"name": "Components map emitted",
"description": "Compiled output contains the plugin-generated `_components` object and it includes every detected component id with `displayName` and `isInFunction` flags populated from the source.",
"max_score": 25
},
{
"name": "Metadata used in transform",
"description": "Custom transform function reads `options.components[uniqueId]` provided by babel-plugin-react-transform and uses those fields rather than recomputing metadata.",
"max_score": 20
},
{
"name": "Anonymous handling",
"description": "Solution preserves the plugin-generated `_components` entry for anonymous/default-exported components (keeps plugin-chosen id, leaves `displayName` undefined, retains `isInFunction`).",
"max_score": 15
}
]
}tessl i tessl/npm-babel-plugin-react-transform@3.0.0evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9