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-10/

{
  "context": "This criteria evaluates how effectively the engineer uses Babel's throw expressions plugin (@babel/plugin-proposal-throw-expressions) to implement inline error handling in the validateConfig function. The focus is on using throw expressions within conditional/ternary operators rather than traditional if-statement error handling.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Babel configuration",
      "description": "Uses @babel/plugin-proposal-throw-expressions in Babel configuration (e.g., .babelrc, babel.config.js, or inline configuration)",
      "max_score": 15
    },
    {
      "name": "Port validation",
      "description": "Uses throw expression syntax (e.g., ternary with throw) to validate port field - checking if undefined or applying validation with inline throw for out-of-range values",
      "max_score": 20
    },
    {
      "name": "Host validation",
      "description": "Uses throw expression syntax to validate host field - checking if undefined or applying validation with inline throw for empty string",
      "max_score": 20
    },
    {
      "name": "Timeout validation",
      "description": "Uses throw expression syntax to validate timeout field - checking if undefined or applying validation with inline throw for negative values",
      "max_score": 20
    },
    {
      "name": "MaxConnections validation",
      "description": "Uses throw expression syntax to validate maxConnections field - checking if undefined or applying validation with inline throw for non-integer values",
      "max_score": 20
    },
    {
      "name": "Descriptive error messages",
      "description": "All thrown errors include descriptive messages that clearly identify which field failed validation and why",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

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

tile.json