CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-cjs-module-lexer

High-performance CommonJS module lexer for detecting named exports and reexports from JavaScript source code

93

0.98x

Quality

Pending

Does it follow best practices?

Impact

93%

0.98x

Average score across 10 eval scenarios

Overview
Eval results
Files

rubric.jsonevals/scenario-10/

{
  "context": "This evaluation assesses how effectively the engineer uses the cjs-module-lexer package to detect and classify transpiler-generated star re-export patterns in CommonJS modules. The focus is on proper usage of the parse() function and understanding of transpiler pattern detection.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses parse function",
      "description": "Code correctly imports and uses the parse() function from cjs-module-lexer to analyze the source code",
      "max_score": 20
    },
    {
      "name": "Analyzes source code",
      "description": "Code passes the source parameter to parse() and retrieves the exports and/or reexports data",
      "max_score": 15
    },
    {
      "name": "Detects Babel patterns",
      "description": "Implementation correctly identifies Babel star re-export patterns by analyzing the source code for Object.keys().forEach() patterns or by examining parse results",
      "max_score": 25
    },
    {
      "name": "Detects TypeScript patterns",
      "description": "Implementation correctly identifies TypeScript star re-export patterns by analyzing the source code for __export() or __exportStar() function calls",
      "max_score": 25
    },
    {
      "name": "Returns correct format",
      "description": "Function returns an object with the correct structure: { detected: boolean, transpiler: string|null }",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-cjs-module-lexer

tile.json