{
  "extends": ["next/core-web-vitals"],
  "plugins": ["gridpilot-rules"],
  "ignorePatterns": [
    "lib/types/generated/**",
    "**/*.test.ts",
    "**/*.test.tsx",
    "eslint-rules/**"
  ],
  "overrides": [
    {
      "files": ["lib/presenters/*.ts", "lib/presenters/*.tsx"],
      "rules": {
        "gridpilot-rules/presenter-contract": "error",
        "gridpilot-rules/filename-presenter-match": "error"
      }
    },
    {
      "files": ["app/**/*.tsx"],
      "rules": {
        "gridpilot-rules/template-no-direct-mutations": "error",
        "gridpilot-rules/template-no-side-effects": "error",
        "gridpilot-rules/template-no-async-render": "error",
        "gridpilot-rules/template-no-external-state": "error",
        "gridpilot-rules/template-no-global-objects": "error",
        "gridpilot-rules/template-no-mutation-props": "error",
        "gridpilot-rules/template-no-unsafe-html": "error"
      }
    },
    {
      "files": ["app/**/page.tsx", "app/**/layout.tsx"],
      "rules": {
        "gridpilot-rules/rsc-no-container-manager": "error",
        "gridpilot-rules/rsc-no-page-data-fetcher": "error",
        "gridpilot-rules/rsc-no-view-models": "error",
        "gridpilot-rules/rsc-no-presenters": "error",
        "gridpilot-rules/rsc-no-intl": "error",
        "gridpilot-rules/rsc-no-sorting-filtering": "error",
        "gridpilot-rules/rsc-no-display-objects": "error",
        "gridpilot-rules/rsc-no-unsafe-services": "error",
        "gridpilot-rules/rsc-no-di": "error",
        "gridpilot-rules/rsc-no-local-helpers": "error",
        "gridpilot-rules/rsc-no-object-construction": "error",
        "gridpilot-rules/rsc-no-container-manager-calls": "error"
      }
    },
    {
      "files": ["lib/display-objects/**/*.ts", "lib/display-objects/**/*.tsx"],
      "rules": {
        "gridpilot-rules/display-no-domain-models": "error",
        "gridpilot-rules/display-no-business-logic": "error",
        "gridpilot-rules/model-no-domain-in-display": "error",
        "gridpilot-rules/filename-display-match": "error"
      }
    },
    {
      "files": ["lib/page-queries/**/*.ts"],
      "rules": {
        "gridpilot-rules/page-query-no-null-returns": "error",
        "gridpilot-rules/page-query-filename": "error",
        "gridpilot-rules/page-query-contract": "error",
        "gridpilot-rules/page-query-execute": "error",
        "gridpilot-rules/page-query-return-type": "error"
      }
    },
    {
      "files": ["lib/services/**/*.ts"],
      "rules": {
        "gridpilot-rules/services-must-be-marked": "error",
        "gridpilot-rules/services-no-external-api": "error",
        "gridpilot-rules/services-must-be-pure": "error",
        "gridpilot-rules/filename-service-match": "error"
      }
    },
    {
      "files": ["app/**/*.tsx"],
      "rules": {
        "gridpilot-rules/client-only-no-server-code": "error",
        "gridpilot-rules/client-only-must-have-directive": "error"
      }
    },
    {
      "files": ["lib/write-boundaries/**/*.ts"],
      "rules": {
        "gridpilot-rules/write-boundary-no-direct-mutations": "error",
        "gridpilot-rules/write-boundary-must-use-repository": "error"
      }
    },
    {
      "files": ["lib/domain/**/*.ts", "lib/models/**/*.ts"],
      "rules": {
        "gridpilot-rules/model-no-display-in-domain": "error"
      }
    }
  ]
}
