CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-confusing-browser-globals

A curated list of browser globals that commonly cause confusion and are not recommended to use without an explicit window qualifier

Overall
score

97%

Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how well the engineer understands and implements Create React App's development server configuration patterns. It focuses on proper handling of environment variables, configuration validation, and the conventions used in react-scripts for managing dev server settings.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Port config implementation",
      "description": "The getPortConfig function correctly converts envPort string to number using parseInt() or Number(), and returns envPort when defined, otherwise returns defaultPort",
      "max_score": 25
    },
    {
      "name": "HTTPS detection logic",
      "description": "The shouldUseHttps function correctly checks if envHttps is 'true' (string comparison) and returns true when HTTPS=true is set, following Create React App's HTTPS environment variable convention",
      "max_score": 25
    },
    {
      "name": "Browser config handling",
      "description": "The getBrowserConfig function returns the envBrowser value when provided (including 'none' to disable), or returns a sensible default when undefined, matching Create React App's BROWSER environment variable behavior",
      "max_score": 25
    },
    {
      "name": "Proxy validation",
      "description": "The validateProxyConfig function correctly validates that proxyConfig is either a string (for simple proxy like 'http://localhost:5000') or an object (for advanced proxy with properties like 'target'), matching react-scripts proxy configuration formats, and returns false for invalid types including null, undefined, numbers, or boolean values",
      "max_score": 25
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-confusing-browser-globals

tile.json