Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

4.4 KB
Raw Blame
{
  "$schema": "https://biomejs.dev/schemas/2.5.15/schema.json",
  "vcs": {
    "enabled": true,
    "clientKind": "git",
    "useIgnoreFile": true
  },
  "files": {
    "includes": [
      "apps/extension/src/**/*.ts",
      "apps/extension/src/**/*.tsx",
      "packages/core/src/**/*.ts",
      "packages/core/src/**/*.tsx",
      "packages/ui/src/**/*.ts",
      "packages/ui/src/**/*.tsx",
      "apps/desktop/src/**/*.ts",
      "apps/desktop/src/**/*.tsx",
      "scripts/**/*.mjs",
      "*.json"
    ]
  },
  "formatter": {
    "enabled": true,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineWidth": 120
  },
  "javascript": {
    "formatter": {
      "quoteStyle": "single",
      "jsxQuoteStyle": "double",
      "semicolons": "always",
      "trailingCommas": "all",
      "arrowParentheses": "always"
    }
  },
  "linter": {
    "enabled": true,
    "rules": {
      "preset": "recommended",
      "correctness": {
        "noUnusedImports": "error",
        "noUnusedVariables": "warn"
      },
      "style": {
        "noNonNullAssertion": "off",
        "useConst": "error"
      },
      "suspicious": {
        "noExplicitAny": "off",
        "noImportCycles": "error"
      },
      "a11y": {
        "useButtonType": "off",
        "noStaticElementInteractions": "off",
        "useKeyWithClickEvents": "off",
        "noSvgWithoutTitle": "off",
        "noLabelWithoutControl": "off"
      },
      "complexity": {
        "noExcessiveCognitiveComplexity": {
          "level": "warn",
          "options": {
            "maxAllowedComplexity": 25
          }
        }
      }
    }
  },
  "assist": {
    "enabled": true,
    "actions": {
      "source": {
        "organizeImports": "on"
      }
    }
  },
  "overrides": [
    {
      "includes": ["packages/**/*.ts", "packages/**/*.tsx"],
      "linter": {
        "rules": {
          "style": {
            "noRestrictedImports": {
              "level": "error",
              "options": {
                "patterns": [
                  {
                    "group": ["@/lib/*", "@/ui/*", "@/entrypoints/*", "#imports", "**/apps/**"],
                    "message": "Shared packages must not import from an app. Move the code into the app, or the dependency the other way."
                  },
                  {
                    "group": ["@mimik/ui/**"],
                    "message": "Import by relative path inside the ui package. Other packages never import it."
                  }
                ],
                "paths": {
                  "@mimik/ui": "Import by relative path inside the ui package. Other packages never import it."
                }
              }
            }
          }
        }
      }
    },
    {
      "includes": ["apps/extension/src/**/*.ts", "apps/extension/src/**/*.tsx", "apps/**/*.ts", "apps/**/*.tsx"],
      "linter": {
        "rules": {
          "style": {
            "noRestrictedImports": {
              "level": "error",
              "options": {
                "patterns": [
                  {
                    "group": [
                      "@mimik/ui/**",
                      "!@mimik/ui/env",
                      "!@mimik/ui/global.css",
                      "!@mimik/ui/common/lib/mascot-shapes"
                    ],
                    "message": "Import from '@mimik/ui'. Add the export to packages/ui/src/index.ts if it is missing."
                  }
                ]
              }
            }
          }
        }
      }
    },
    {
      "includes": [
        "packages/ui/src/**/*.ts",
        "packages/ui/src/**/*.tsx",
        "apps/extension/src/ui/**",
        "apps/extension/src/lib/**",
        "apps/desktop/src/renderer/**",
        "!packages/ui/src/components/ui/**"
      ],
      "linter": {
        "rules": {
          "performance": {
            "noBarrelFile": "error"
          },
          "style": {
            "useComponentExportOnlyModules": "error"
          }
        }
      }
    },
    {
      "includes": ["packages/ui/src/index.ts"],
      "linter": {
        "rules": {
          "performance": {
            "noBarrelFile": "off"
          }
        }
      }
    },
    {
      "includes": [
        "packages/ui/src/**",
        "apps/extension/src/ui/**",
        "apps/extension/src/lib/**",
        "apps/desktop/src/renderer/**"
      ],
      "linter": {
        "rules": {
          "style": {
            "noDefaultExport": "error"
          }
        }
      }
    }
  ]
}