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

{
  "context": "This evaluation assesses how well the engineer uses escodegen's formatting options to control code output style. The focus is on proper usage of escodegen.generate() with format options for indentation, quotes, whitespace, and base indentation level.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses escodegen.generate()",
      "description": "All formatting functions call escodegen.generate() to convert AST to JavaScript code",
      "max_score": 15
    },
    {
      "name": "Indentation style control",
      "description": "Uses format.indent.style option to configure spaces vs tabs (e.g., '  ' for 2 spaces, '\\t' for tabs)",
      "max_score": 20
    },
    {
      "name": "Quote style control",
      "description": "Uses format.quotes option to configure single vs double quotes (e.g., 'single' or 'double')",
      "max_score": 20
    },
    {
      "name": "Compact formatting",
      "description": "Uses format.compact option set to true to produce minified output with minimal whitespace",
      "max_score": 15
    },
    {
      "name": "Base indentation control",
      "description": "Uses format.indent.base option to set the base indentation level as an integer",
      "max_score": 20
    },
    {
      "name": "Correct option structure",
      "description": "Properly nests formatting options under a 'format' object when calling escodegen.generate()",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-escodegen

tile.json