module.exports = {
  extends: ["eslint:recommended"],
  parserOptions: {
    ecmaVersion: 2020,
  },
  env: {
    browser: true,
    node: true,
  },
  rules: {
    "no-alert": "warn",
    "no-console": "warn",
    "no-empty": "warn",
    "no-ex-assign": "warn",
    "no-useless-escape": "warn",
    "no-constant-condition": "warn",
    "no-unused-vars": ["warn", { args: "after-used", argsIgnorePattern: "^_" }],
    "no-shadow": [
      "warn",
      {
        builtinGlobals: true,
        hoist: "all",
        // Some of those are here: https://www.w3schools.com/js/js_reserved.asp
        // But we will allow for productivity.
        allow: [
          "assert",
          "Cache",
          "close",
          "context",
          "crypto",
          "Document",
          "event",
          "Event",
          "expect",
          "external",
          "form",
          "history",
          "id",
          "Image",
          "length",
          "name",
          "Notification",
          "onerror",
          "onload",
          "open",
          "origin",
          "parent",
          "print",
          "Request",
          "Response",
          "server",
          "status",
          "test",
          "Text",
          "title",
          "type",
          "URL",
        ],
      },
    ],
  },
};