Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

3.3 KB
Raw Blame
{
  "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
  "vcs": {
    "enabled": true,
    "clientKind": "git",
    "useIgnoreFile": true
  },
  "files": {
    "includes": [
      "!apps/public/public",
      "!apps/start/src/routeTree.gen.ts",
      "!apps/api/scripts/mock-big.json",
      "!packages/db/src/generated",
      "!packages/core/src/clients/datacenter-asns.ts",
      "!packages/core/src/modules/import/src/providers/__fixtures__/*.json"
    ]
  },
  "assist": {
    "actions": {
      "source": {
        "organizeImports": {
          "level": "on",
          "options": {
            "groups": [
              ":BUN:",
              ":NODE:",
              ["npm:*", "npm:*/**"],
              ":PACKAGE_WITH_PROTOCOL:",
              ":URL:",
              ":PACKAGE:",
              ["/**"],
              ["#*", "#*/**"],
              ":PATH:"
            ]
          }
        }
      }
    }
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true,
      "a11y": {
        "noSvgWithoutTitle": "off",
        "useAltText": "off",
        "noLabelWithoutControl": "off",
        "useFocusableInteractive": "off",
        "useSemanticElements": "off"
      },
      "style": {
        "noNestedTernary": "off",
        "noNonNullAssertion": "off",
        "noParameterAssign": "error",
        "useAsConstAssertion": "error",
        "useDefaultParameterLast": "error",
        "useEnumInitializers": "error",
        "useSelfClosingElements": "error",
        "useSingleVarDeclarator": "error",
        "noUnusedTemplateLiteral": "error",
        "useNumberNamespace": "error",
        "noInferrableTypes": "error",
        "noUselessElse": "error",
        "useDefaultSwitchClause": "off",
        "noParameterProperties": "off",
        "useConsistentMemberAccessibility": "off"
      },
      "correctness": {
        "useExhaustiveDependencies": "off",
        "noUnreachable": "off",
        "noGlobalDirnameFilename": "off"
      },
      "performance": {
        "noDelete": "off",
        "noAccumulatingSpread": "off",
        "noBarrelFile": "off",
        "noNamespaceImport": "off",
        "useTopLevelRegex": "off",
        "noImgElement": "off"
      },
      "suspicious": {
        "noExplicitAny": "off",
        "noShadowRestrictedNames": "off",
        "useAwait": "off"
      },
      "security": {
        "noDangerouslySetInnerHtml": "off"
      },
      "complexity": {
        "noForEach": "off",
        "noExcessiveCognitiveComplexity": "off"
      }
    }
  },
  "formatter": {
    "indentStyle": "space",
    "indentWidth": 2
  },
  "javascript": {
    "globals": ["Bun"],
    "formatter": {
      "quoteStyle": "single"
    }
  },
  "extends": [
    "ultracite/biome/core",
    "ultracite/biome/react",
    "ultracite/biome/next",
    "ultracite/biome/remix"
  ],
  "overrides": [
    {
      "includes": ["apps/start/src/**"],
      "linter": {
        "rules": {
          "suspicious": {
            "noConsole": {
              "level": "error",
              "options": { "allow": ["error", "warn"] }
            }
          }
        }
      }
    },
    {
      "includes": ["packages/core/src/clients/datacenter-asns.ts"],
      "linter": {
        "rules": {
          "style": {
            "useNumericSeparators": "off"
          }
        }
      }
    }
  ]
}