CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-escodegen

ECMAScript code generator that transforms Mozilla's Parser API ASTs back into executable JavaScript code

95

1.07x
Overview
Eval results
Files

rubric.jsonevals/scenario-4/

{
  "context": "This criteria evaluates how well the engineer uses escodegen's advanced comment preservation features to format AST into JavaScript code while maintaining proper comment indentation, spacing, and blank line preservation.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses escodegen.generate()",
      "description": "Uses escodegen.generate() function to transform the AST into JavaScript code",
      "max_score": 15
    },
    {
      "name": "Uses escodegen.attachComments()",
      "description": "Uses escodegen.attachComments() to attach comments and tokens to the AST before generation",
      "max_score": 20
    },
    {
      "name": "Enables comment option",
      "description": "Passes { comment: true } in options to escodegen.generate() to enable comment preservation",
      "max_score": 15
    },
    {
      "name": "Multiline comment adjustment",
      "description": "Uses { format: { adjustMultilineComment: true } } option to enable intelligent multiline comment indentation",
      "max_score": 20
    },
    {
      "name": "Blank line preservation",
      "description": "Uses { preserveBlankLines: true } option to maintain vertical spacing from the original source",
      "max_score": 15
    },
    {
      "name": "Provides sourceCode",
      "description": "Passes { sourceCode: originalSource } option to enable accurate spacing and blank line preservation",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-escodegen

tile.json