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

{
  "context": "This criteria evaluates how well the engineer uses the cjs-module-lexer package to build a module export analyzer, focusing on proper initialization, efficient parsing, and error handling.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Imports cjs-module-lexer",
      "description": "Correctly imports the cjs-module-lexer package using require() or import statement",
      "max_score": 10
    },
    {
      "name": "Calls init()",
      "description": "Calls the init() or initSync() function from cjs-module-lexer before parsing to initialize the parsing engine",
      "max_score": 20
    },
    {
      "name": "Uses parse() function",
      "description": "Uses the parse() function from cjs-module-lexer to analyze JavaScript source code and extract export information",
      "max_score": 25
    },
    {
      "name": "Extracts exports array",
      "description": "Correctly accesses and returns the exports array from the parse() function result",
      "max_score": 15
    },
    {
      "name": "Extracts reexports array",
      "description": "Correctly accesses and returns the reexports array from the parse() function result",
      "max_score": 15
    },
    {
      "name": "Handles parse errors",
      "description": "Implements try-catch or equivalent error handling around parse() calls to catch and return parsing errors with line and column information",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

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

tile.json