CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-arg

Unopinionated, no-frills CLI argument parser for Node.js applications

Overall
score

99%

Overview
Eval results
Files

rubric.jsonevals/scenario-4/

{
  "context": "This evaluation assesses how well the engineer uses the arg package to parse command-line arguments, with particular focus on correctly working with the result object structure that includes named properties for options and the '_' property for positional arguments.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import arg function",
      "description": "Correctly imports the arg package's main parsing function (e.g., const arg = require('arg') or import arg from 'arg')",
      "max_score": 10
    },
    {
      "name": "Define specification object",
      "description": "Creates a specification object that defines the expected arguments with '--priority' (or longer name) mapped to Number type and '--completed' mapped to Boolean type",
      "max_score": 20
    },
    {
      "name": "Configure short aliases",
      "description": "Defines the '-p' short argument as an alias to the priority option using string value in the spec object (e.g., '-p': '--priority')",
      "max_score": 15
    },
    {
      "name": "Call arg function",
      "description": "Calls the arg function with the specification object and passes the custom argv array via options (e.g., arg(spec, { argv: args }))",
      "max_score": 20
    },
    {
      "name": "Access named properties",
      "description": "Correctly accesses named properties from the result object returned by arg (e.g., result.priority, result.completed or equivalent destructuring)",
      "max_score": 15
    },
    {
      "name": "Access positional arguments",
      "description": "Correctly accesses the '_' property from the result object to retrieve positional/extra arguments (e.g., result._, result['_'], or destructured)",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-arg

tile.json