{
  "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
  "vcs": {
    "enabled": true,
    "clientKind": "git",
    "useIgnoreFile": true,
    "defaultBranch": "main"
  },
  "files": {
    "includes": [
      "apps/**/*.{js,jsx,ts,tsx,json,jsonc}",
      "packages/**/*.{js,jsx,ts,tsx,json,jsonc}",
      "src/**/*.{js,jsx,ts,tsx,json,jsonc}",
      "*.{js,jsx,ts,tsx,json,jsonc}"
    ],
    "ignoreUnknown": true
  },
  "formatter": {
    "enabled": true,
    "formatWithErrors": true,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineEnding": "lf",
    "lineWidth": 100,
    "attributePosition": "auto",
    "bracketSpacing": true
  },
  "assist": {
    "actions": {
      "source": {
        "organizeImports": {
          "level": "on",
          "options": {
            "groups": [
              [
                ":URL:",
                ":PACKAGE_WITH_PROTOCOL:",
                ":BUN:",
                ":NODE:",
                ":PACKAGE:",
                "!@workspace/**"
              ],
              ":BLANK_LINE:",
              "@workspace/**",
              ":BLANK_LINE:",
              ":ALIAS:",
              ":BLANK_LINE:",
              ":PATH:"
            ]
          }
        }
      }
    }
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true,
      "correctness": {
        "noUnusedVariables": {
          "level": "error",
          "options": {},
          "fix": "safe"
        },
        "useExhaustiveDependencies": "warn",
        "noNestedComponentDefinitions": "off"
      },
      "style": {
        "noNegationElse": "off",
        "useImportType": "error",
        "useNodejsImportProtocol": "error",
        "useNumberNamespace": "error",
        "useNamingConvention": "off",
        "useFilenamingConvention": "off"
      },
      "suspicious": {
        "noExplicitAny": "warn",
        "noArrayIndexKey": "warn",
        "noConsole": "off",
        "noUnknownAtRules": "off"
      },
      "a11y": {
        "useSemanticElements": "off"
      },
      "performance": {
        "noDelete": "error",
        "noNamespaceImport": "off"
      },
      "complexity": {
        "noForEach": "off",
        "useLiteralKeys": "off",
        "noExcessiveCognitiveComplexity": "off"
      },
      "nursery": {
        "useSortedClasses": {
          "level": "error",
          "options": {},
          "fix": "safe"
        }
      }
    }
  },
  "javascript": {
    "globals": ["Bun"],
    "formatter": {
      "jsxQuoteStyle": "single",
      "quoteProperties": "asNeeded",
      "trailingCommas": "es5",
      "semicolons": "asNeeded",
      "arrowParentheses": "asNeeded",
      "bracketSameLine": false,
      "quoteStyle": "single",
      "attributePosition": "auto"
    }
  },
  "json": {
    "formatter": {
      "trailingCommas": "none"
    }
  },
  "overrides": [
    {
      "includes": ["**/*.json", "**/*.jsonc"],
      "formatter": {
        "indentWidth": 2
      }
    },
    {
      "includes": [
        "**/src/generated/**",
        "**/generated/**",
        "apps/web/next-env.d.ts",
        ".husky/**",
        ".augment/**",
        "commitlint.config.{mjs,js}"
      ],
      "linter": {
        "enabled": false
      },
      "formatter": {
        "enabled": false
      }
    },
    {
      "includes": ["**/*skeleton.tsx", "**/*animation*.tsx"],
      "linter": {
        "rules": {
          "style": {
            "noMagicNumbers": "off"
          }
        }
      }
    },
    {
      "includes": ["**/commitlint.config.js"],
      "linter": {
        "rules": {
          "style": {
            "noMagicNumbers": "off"
          }
        }
      }
    }
  ],
  "extends": ["ultracite/core", "ultracite/next", "ultracite/react"]
}
