CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-babel-plugin-transform-react-display-name

Babel plugin that automatically adds displayName properties to React class components created with createClass

Overall
score

96%

Overview
Eval results
Files

rubric.jsonevals/scenario-6/

{
  "context": "Evaluates whether the solution wires @babel/plugin-transform-react-display-name into a @babel/core transform to add displayName only when missing. Checks that the plugin is invoked correctly so existing displayName definitions are preserved and nested createClass calls are covered.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Plugin wired",
      "description": "Invokes @babel/core transform/transformSync with @babel/plugin-transform-react-display-name included in the plugins list so it actually runs on the provided source.",
      "max_score": 30
    },
    {
      "name": "Preserves existing",
      "description": "Relies on the plugin's default behavior (no custom overrides) to leave any existing displayName property intact without rewriting or duplicating it.",
      "max_score": 25
    },
    {
      "name": "Adds when missing",
      "description": "Allows the plugin to infer and inject displayName values for createClass/createReactClass calls that lack one, producing output where new displayName entries match the surrounding identifier.",
      "max_score": 25
    },
    {
      "name": "Nested coverage",
      "description": "Runs the plugin across the whole file/module so nested or property-assigned createClass calls also receive displayName only when absent, without extra injections where already present.",
      "max_score": 10
    },
    {
      "name": "Babel options passed",
      "description": "Passes through filename/parser options to @babel/core when available so the plugin can safely parse the input and apply displayName logic in context.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-babel-plugin-transform-react-display-name

tile.json