or run

tessl search
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-1/

{
  "context": "This criteria evaluates how well the engineer uses nuqs for server-side URL parameter validation with strict mode. It focuses on proper use of createSearchParamsCache API, strict validation configuration, appropriate parser selection, and correct error handling.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses createSearchParamsCache",
      "description": "Creates a search params cache using createSearchParamsCache from nuqs/server to handle server-side parameter parsing",
      "max_score": 25
    },
    {
      "name": "Enables strict validation",
      "description": "Configures the cache or parsers with strict mode enabled to throw errors on invalid values instead of returning null",
      "max_score": 25
    },
    {
      "name": "Uses parseAsStringEnum",
      "description": "Uses parseAsStringEnum or parseAsStringLiteral for the category parameter to restrict values to the allowed set",
      "max_score": 15
    },
    {
      "name": "Uses parseAsInteger",
      "description": "Uses parseAsInteger for minPrice and maxPrice parameters to parse numeric values",
      "max_score": 10
    },
    {
      "name": "Uses parseAsBoolean",
      "description": "Uses parseAsBoolean for the inStock parameter to parse boolean values",
      "max_score": 10
    },
    {
      "name": "Configures default value",
      "description": "Uses .withDefault(1) on the page parameter parser to provide a default value",
      "max_score": 10
    },
    {
      "name": "Calls parse method",
      "description": "Calls the cache's parse() method with the searchParams prop to perform the actual parsing and validation",
      "max_score": 5
    }
  ]
}