or run

tessl search
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-4/

{
  "context": "This evaluation assesses the engineer's understanding and correct usage of nuqs parsers to create nullable and non-nullable state types. The focus is on properly using .withDefault() to create non-nullable types and understanding the difference between nullable and non-nullable parser behavior.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "useQueryState imports",
      "description": "Correctly imports useQueryState (or useQueryStates) from the nuqs package",
      "max_score": 5
    },
    {
      "name": "Parser imports",
      "description": "Imports appropriate built-in parsers from nuqs (e.g., parseAsString, parseAsInteger, parseAsBoolean, parseAsStringLiteral)",
      "max_score": 10
    },
    {
      "name": "Nullable search state",
      "description": "Uses parseAsString (without .withDefault()) for the search parameter to create a nullable string | null type",
      "max_score": 20
    },
    {
      "name": "Non-nullable category",
      "description": "Uses a parser with .withDefault() for the category parameter to ensure it returns a non-nullable Category type (either parseAsStringLiteral or parseAsStringEnum with .withDefault('electronics'))",
      "max_score": 25
    },
    {
      "name": "Non-nullable minPrice",
      "description": "Uses parseAsInteger with .withDefault(0) for the minPrice parameter to ensure it returns a non-nullable number type",
      "max_score": 20
    },
    {
      "name": "Non-nullable inStock",
      "description": "Uses parseAsBoolean with .withDefault(false) for the inStock parameter to ensure it returns a non-nullable boolean type",
      "max_score": 20
    }
  ]
}