CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-babel-plugin-transform-eval

Babel plugin that transforms eval() calls containing string literals by parsing and compiling the string content at transform time

Overall
score

98%

Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how effectively the engineer uses Babel's preset system to transpile different file types. It focuses on proper configuration of @babel/preset-env, @babel/preset-react, and @babel/preset-typescript, along with the core transformation API from @babel/core.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Babel core usage",
      "description": "Uses @babel/core's transformation API (transformAsync, transformSync, or transformFileAsync/transformFileSync) to transpile source code",
      "max_score": 20
    },
    {
      "name": "Preset-env configuration",
      "description": "Configures and uses @babel/preset-env with appropriate target environment settings (targets option specifying IE 11, Node 8, Chrome 60, Firefox 55 or equivalent)",
      "max_score": 20
    },
    {
      "name": "Preset-typescript usage",
      "description": "Uses @babel/preset-typescript to handle TypeScript files (.ts), enabling type stripping without using a separate TypeScript compiler",
      "max_score": 20
    },
    {
      "name": "Preset-react usage",
      "description": "Uses @babel/preset-react to transform JSX syntax in React files (.jsx)",
      "max_score": 20
    },
    {
      "name": "Conditional preset loading",
      "description": "Dynamically selects and applies appropriate presets based on file type/extension (e.g., applying preset-typescript only for .ts files, preset-react only for .jsx files)",
      "max_score": 15
    },
    {
      "name": "File reading integration",
      "description": "Properly reads the source file content and passes it to Babel's transformation API (either via file-based or string-based transform methods)",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-babel-plugin-transform-eval

tile.json