Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

3.9 KB
Raw Blame
id: tsx-feature-components-presentational
language: tsx
# Twin of ts-feature-components-presentational — ast-grep rules are
# single-language, and `typescript` only scans .ts files.
severity: warning
message: Feature components take resolved values and return JSX. Data, reactivity wiring, and navigation belong to primitives/ and views/.
note: |-
  Rule FE-33 in docs/development/style-guide.md. `components/` never imports
  `queries/`, `primitives/`, `views/`, `@queries/*`, urql, or the split
  navigation helpers. It renders what views hand it: domain values from
  `core/`, resolved display (typed in `context/`), and event handlers. The
  one sanctioned `queries/` import is `property-value`, which parses
  untyped wire JSON for property-changed rows. In block-agent, `ui/` is
  the presentation layer and `component/` is the composition layer.
files:
  - apps/web/src/features/notifications-inbox/components/**
  - apps/web/src/features/command/components/**
  - apps/web/src/features/document-composer/components/**
  - apps/web/src/features/task-composer/components/**
  - apps/web/src/features/universal-input/components/**
  - apps/web/src/features/saved-views/components/**
  - apps/web/src/features/access-requests/components/**
  - apps/web/src/features/agent-activity/components/**
  - apps/web/src/features/agent-dms/components/**
  - apps/web/src/features/agent-conversations/components/**
  - apps/web/src/features/local-runtime/components/**
  - apps/web/src/features/agent-interactions/components/**
  - apps/web/src/features/billing-lab/components/**
  - apps/web/src/features/paywall/components/ai-usage-limit-dialog*
  - apps/web/src/features/calendar-team/components/**
  - apps/web/src/features/tasks-view/components/task-board*
  - apps/web/src/features/routines/components/**
  - apps/web/src/features/scheduling/components/**
  - apps/web/src/features/usage/components/**
  - apps/web/src/features/crm/components/**
  - apps/web/src/features/slack-import/components/**
  - apps/web/src/features/channels-view/components/ChannelDetailView*
  - apps/web/src/features/channel/components/channel-invite*
  - apps/web/src/features/projects/components/**
  - apps/web/src/features/channel/Call/chat/components/**
  - apps/web/src/features/block-agent/ui/**
  - apps/web/src/features/block-ai/components/**
  - apps/web/src/features/block-psd/components/**
  - apps/web/src/features/meetings/components/**
  - apps/web/src/features/block-spreadsheet/components/**
  - apps/web/src/features/property/tags/components/**
  - apps/web/src/features/activity/components/**
  - apps/web/src/features/drive-view/components/**
  - apps/web/src/features/email-message/components/**
  - apps/web/src/features/email-thread/components/**
  - apps/web/src/features/email-compose/components/**
  - apps/web/src/features/changes/components/**
  - apps/web/src/features/block-write/components/**
  - apps/web/src/features/onboarding/components/**
  - apps/web/src/features/auth/components/**
  - apps/web/src/features/block-form/components/**
rule:
  any:
    - kind: string
      regex: ^['"](@queries/|@urql|urql|@app/lib/urql|@core/util/useSplitNavigationHandler|(\.\./)+(primitives|views|component)(/|['"]))
      any:
        - inside:
            kind: import_statement
            field: source
        - inside:
            kind: export_statement
            field: source
        - inside:
            kind: arguments
            inside:
              kind: call_expression
              has:
                field: function
                kind: import
    - kind: string
      regex: ^['"](\.\./)+queries/
      not:
        regex: property-value
      any:
        - inside:
            kind: import_statement
            field: source
        - inside:
            kind: export_statement
            field: source
        - inside:
            kind: arguments
            inside:
              kind: call_expression
              has:
                field: function
                kind: import