or run

npx @tessl/cli init
Log in

Version

Files

docs

index.md
tile.json

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how effectively the engineer uses the cjs-module-lexer package to detect basic CommonJS export patterns, including the parse() function and proper handling of its return values.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import package",
      "description": "The solution correctly imports or requires the cjs-module-lexer package (e.g., const { parse } = require('cjs-module-lexer') or const parser = require('cjs-module-lexer'))",
      "max_score": 10
    },
    {
      "name": "Call parse function",
      "description": "The solution calls the parse() function from cjs-module-lexer with the source code string as the first argument",
      "max_score": 25
    },
    {
      "name": "Handle initialization",
      "description": "The solution properly handles cjs-module-lexer initialization if needed (calls init() or initSync() before parse(), or wraps in async function if using init())",
      "max_score": 15
    },
    {
      "name": "Extract exports array",
      "description": "The solution correctly extracts the exports array from the parse() return value and uses it for the namedExports property",
      "max_score": 20
    },
    {
      "name": "Extract reexports array",
      "description": "The solution correctly extracts the reexports array from the parse() return value and uses it to determine hasReexport (checking if reexports array length > 0 or similar logic)",
      "max_score": 20
    },
    {
      "name": "Return correct format",
      "description": "The solution returns an object with the correct structure: { namedExports: array, hasReexport: boolean }",
      "max_score": 10
    }
  ]
}