Babel plugin to instrument React components with custom transforms
{
"context": "Evaluates whether the solution uses @babel/core with babel-plugin-react-transform to instrument React components and report the plugin-generated metadata for anonymous and nested components. The checks ensure reliance on the plugin's wrapper output and component map rather than custom parsing.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Plugin wiring",
"description": "Transforms source through @babel/core with babel-plugin-react-transform configured (including a valid transforms array) so the plugin runs and injects wrappers and metadata.",
"max_score": 20
},
{
"name": "Metadata source",
"description": "Collects component info directly from the plugin-generated _components map in the compiled output instead of hand-written component detection.",
"max_score": 25
},
{
"name": "Anonymous ids",
"description": "Uses the anonymous component ids emitted by the plugin (e.g., _component, _component2) in returned metadata without replacing them with custom names.",
"max_score": 20
},
{
"name": "Nested flag",
"description": "Reads the isInFunction flag set by babel-plugin-react-transform for components declared inside functions and passes it through unchanged.",
"max_score": 20
},
{
"name": "Display names",
"description": "Preserves displayName values that the plugin emits from class names or displayName properties while leaving anonymous entries without a displayName.",
"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