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

96

1.10x
Quality

Pending

Does it follow best practices?

Impact

96%

1.10x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

criteria.jsonevals/scenario-5/

{
  "context": "This criteria evaluates how well the engineer uses http-proxy-middleware to configure development proxies in Create React App. It focuses on proper usage of the createProxyMiddleware function and its configuration options for HTTP and WebSocket proxying.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import createProxyMiddleware",
      "description": "Correctly imports the createProxyMiddleware function from the http-proxy-middleware package using require() with destructuring: const { createProxyMiddleware } = require('http-proxy-middleware');",
      "max_score": 15
    },
    {
      "name": "Export configuration function",
      "description": "Exports a module.exports function that accepts an 'app' parameter, which is the standard setupProxy.js pattern for Create React App",
      "max_score": 10
    },
    {
      "name": "Register API proxy",
      "description": "Uses app.use() to register the '/api' path with createProxyMiddleware, specifying the correct target 'http://localhost:5000'",
      "max_score": 15
    },
    {
      "name": "Configure path rewriting",
      "description": "Uses the pathRewrite option with the pattern { '^/api': '' } to remove the /api prefix before forwarding requests",
      "max_score": 20
    },
    {
      "name": "Enable changeOrigin",
      "description": "Sets the changeOrigin option to true for the API proxy to properly handle the Host header",
      "max_score": 15
    },
    {
      "name": "Register WebSocket proxy",
      "description": "Uses app.use() to register the '/ws' path with createProxyMiddleware, specifying the correct target 'ws://localhost:5001'",
      "max_score": 10
    },
    {
      "name": "Enable WebSocket support",
      "description": "Sets the ws option to true in the WebSocket proxy configuration to enable WebSocket proxying",
      "max_score": 10
    },
    {
      "name": "Configure debug logging",
      "description": "Sets the logLevel option to 'debug' in at least one (preferably both) proxy configuration(s) to enable detailed logging",
      "max_score": 5
    }
  ]
}

tile.json