Babel plugin that automatically adds displayName properties to React class components created with createClass
Overall
score
96%
{
"context": "Evaluates whether the solution configures Babel to inject display names while compiling JSX in both classic and automatic runtimes. Checks focus on correct use of babel-plugin-transform-react-display-name alongside the appropriate React JSX transform settings and filename handling for name inference.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Plugin included",
"description": "Babel transform includes babel-plugin-transform-react-display-name in the plugins list for all runs, not conditionally skipped.",
"max_score": 25
},
{
"name": "Classic JSX runtime",
"description": "Classic-mode requests use @babel/plugin-transform-react-jsx (or @babel/preset-react) configured with runtime: 'classic' so output relies on React.createElement rather than jsx-runtime helpers.",
"max_score": 20
},
{
"name": "Automatic JSX runtime",
"description": "Automatic-mode requests configure @babel/plugin-transform-react-jsx (or @babel/preset-react) with runtime: 'automatic', producing imports from react/jsx-runtime instead of React.",
"max_score": 20
},
{
"name": "Filename inference",
"description": "Babel options pass the provided filename/basename so babel-plugin-transform-react-display-name can derive displayName values, including using the parent directory when the basename is index.*.",
"max_score": 15
},
{
"name": "DisplayName injection",
"description": "Transformed output shows displayName properties inserted into createReactClass/React.createClass object literals without overwriting existing values or leaving them out.",
"max_score": 20
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-babel-plugin-transform-react-display-name