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

{
  "context": "This criteria evaluates how well an engineer uses the cjs-module-lexer package to parse CommonJS module source code and extract export metadata, with focus on proper use of the parse() function and initialization methods.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Package import",
      "description": "Correctly imports the cjs-module-lexer package using require() or import statement",
      "max_score": 10
    },
    {
      "name": "parse() invocation",
      "description": "Calls the parse() function from cjs-module-lexer, passing the source code string as the first argument",
      "max_score": 35
    },
    {
      "name": "Exports array usage",
      "description": "Correctly accesses and uses the exports array from the parse() function's return object (e.g., const { exports } = parse(code))",
      "max_score": 25
    },
    {
      "name": "Reexports array usage",
      "description": "Correctly accesses and uses the reexports array from the parse() function's return object (e.g., const { reexports } = parse(code))",
      "max_score": 25
    },
    {
      "name": "Proper initialization",
      "description": "Calls init() or initSync() before using parse(), or correctly handles the Promise returned by init() if used",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

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

tile.json