CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-babel--helper-module-imports

Babel helper functions for inserting module loads

Overall
score

99%

Overview
Eval results
Files

rubric.jsonevals/scenario-4/

{
  "context": "This criteria evaluates how well the engineer uses @babel/helper-module-imports to handle different target environments (ES6 vs CommonJS) with appropriate module system settings. The focus is on proper use of module detection, import injection functions, and environment-specific configuration options.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Module detection",
      "description": "Uses isModule() function from @babel/helper-module-imports to detect whether the file is an ES6 module or CommonJS",
      "max_score": 25
    },
    {
      "name": "Named import injection",
      "description": "Uses addNamed() function to inject the 'safeStringify' named import from 'safe-json-utils' package",
      "max_score": 25
    },
    {
      "name": "ES6 configuration",
      "description": "For ES6 modules, passes importedType: 'es6' in the options parameter to addNamed()",
      "max_score": 20
    },
    {
      "name": "CommonJS configuration",
      "description": "For CommonJS files, passes importedType: 'commonjs' in the options parameter to addNamed()",
      "max_score": 20
    },
    {
      "name": "Deduplication handling",
      "description": "The implementation correctly handles deduplication by calling addNamed() which automatically prevents duplicate imports without additional code",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-babel--helper-module-imports

tile.json