{
  "plugins": [
    "react",
    "import"
  ],
  "rules": {
    "react/forbid-elements": [
      "warn",
      {
        "forbid": []
      }
    ],
    "no-restricted-imports": [
      "warn",
      {
        "patterns": [
          {
            "group": [
              "components/EzButton/**",
              "eazy-landing/**",
              "exports/eazy-math-diagnostic/**",
              "flashcards/**",
              "quiz-game-export/**",
              "quiz-game-server/**",
              "quiz-game/**",
              "quiz-game/dist/**",
              "quiz/**",
              "role-game/**",
              "tetri-psychometry-export/**",
              "tetri-psychometry/**",
              "tetri-vocab/**",
              "ui_kits/flyer/**",
              "ui_kits/web/**",
              "word-game/**",
              "workshop-followup/**",
              "workshop-followup/מקור-לעריכה/**"
            ],
            "message": "Import design-system components from 'index.js', not component internals."
          }
        ]
      }
    ],
    "no-restricted-syntax": [
      "warn",
      {
        "selector": "Literal[value=/#[0-9a-fA-F]{3,8}\\b/]",
        "message": "Raw hex color — use a design-system color token via var()."
      },
      {
        "selector": "Literal[value=/\\b\\d+px\\b/]",
        "message": "Raw px value — use a design-system spacing token via var()."
      },
      {
        "selector": "Literal[value=/font-family\\s*:\\s*(?!['\\\"]?(?:Avigul|Avigul Shadow|Almoni Neue Tzar|FbTamlilCondensed|Geomanist))/i]",
        "message": "Font not provided by the design system. Available: Avigul, Avigul Shadow, Almoni Neue Tzar, FbTamlilCondensed, Geomanist."
      },
      {
        "selector": "JSXOpeningElement[name.name='EzButton'] > JSXAttribute > JSXIdentifier[name!=/^(?:children|variant|type|disabled|onClick|key|ref|className|style|children)$/]",
        "message": "<EzButton> doesn't accept that prop. Declared props: children, variant, type, disabled, onClick."
      },
      {
        "selector": "JSXOpeningElement[name.name='EzButton'] > JSXAttribute[name.name='variant'] > Literal[value!=/^(?:primary|secondary|ghost|link)$/]",
        "message": "<EzButton> variant must be one of 'primary' | 'secondary' | 'ghost' | 'link'."
      },
      {
        "selector": "JSXOpeningElement[name.name='EzButton'] > JSXAttribute[name.name='type'] > Literal[value!=/^(?:button|submit|reset)$/]",
        "message": "<EzButton> type must be one of 'button' | 'submit' | 'reset'."
      }
    ]
  },
  "overrides": [
    {
      "files": [
        "**/index.js"
      ],
      "rules": {
        "no-restricted-imports": "off"
      }
    }
  ],
  "x-omelette": {
    "components": {
      "EzButton": {
        "replaces": []
      }
    },
    "tokens": [
      "--ez-bg-1",
      "--ez-bg-2",
      "--ez-bg-3",
      "--ez-bg-accent",
      "--ez-bg-cta",
      "--ez-danger",
      "--ez-fg-1",
      "--ez-fg-2",
      "--ez-fg-3",
      "--ez-fg-on-lavender",
      "--ez-fg-on-orange",
      "--ez-indigo",
      "--ez-indigo-deep",
      "--ez-ink",
      "--ez-ink-mute",
      "--ez-ink-soft",
      "--ez-lavender",
      "--ez-lavender-deep",
      "--ez-lavender-soft",
      "--ez-lavender-tint",
      "--ez-line",
      "--ez-link",
      "--ez-link-hover",
      "--ez-orange",
      "--ez-orange-deep",
      "--ez-orange-soft",
      "--ez-orange-tint",
      "--ez-paper",
      "--ez-paper-cool",
      "--ez-paper-warm",
      "--ez-success",
      "--ez-warning",
      "--font-body",
      "--font-display",
      "--font-en-disp",
      "--font-mono",
      "--font-shadow",
      "--leading-base",
      "--leading-loose",
      "--leading-snug",
      "--leading-tight",
      "--r-1",
      "--r-2",
      "--r-3",
      "--r-4",
      "--r-pill",
      "--shadow-1",
      "--shadow-2",
      "--shadow-3",
      "--sp-1",
      "--sp-10",
      "--sp-11",
      "--sp-2",
      "--sp-3",
      "--sp-4",
      "--sp-5",
      "--sp-6",
      "--sp-7",
      "--sp-8",
      "--sp-9"
    ],
    "tokenKinds": {
      "--ez-orange": "color",
      "--ez-orange-deep": "color",
      "--ez-orange-soft": "color",
      "--ez-orange-tint": "color",
      "--ez-lavender": "color",
      "--ez-lavender-deep": "color",
      "--ez-lavender-soft": "color",
      "--ez-lavender-tint": "color",
      "--ez-indigo": "color",
      "--ez-indigo-deep": "color",
      "--ez-paper": "color",
      "--ez-paper-warm": "color",
      "--ez-paper-cool": "color",
      "--ez-line": "color",
      "--ez-ink": "color",
      "--ez-ink-soft": "color",
      "--ez-ink-mute": "color",
      "--ez-fg-1": "color",
      "--ez-fg-2": "color",
      "--ez-fg-3": "color",
      "--ez-fg-on-orange": "color",
      "--ez-fg-on-lavender": "color",
      "--ez-bg-1": "color",
      "--ez-bg-2": "color",
      "--ez-bg-3": "color",
      "--ez-bg-accent": "color",
      "--ez-bg-cta": "color",
      "--ez-link": "color",
      "--ez-link-hover": "color",
      "--ez-success": "color",
      "--ez-warning": "color",
      "--ez-danger": "color",
      "--sp-1": "spacing",
      "--sp-2": "spacing",
      "--sp-3": "spacing",
      "--sp-4": "spacing",
      "--sp-5": "spacing",
      "--sp-6": "spacing",
      "--sp-7": "spacing",
      "--sp-8": "spacing",
      "--sp-9": "spacing",
      "--sp-10": "spacing",
      "--sp-11": "spacing",
      "--r-1": "spacing",
      "--r-2": "spacing",
      "--r-3": "spacing",
      "--r-4": "spacing",
      "--r-pill": "spacing",
      "--shadow-1": "shadow",
      "--shadow-2": "shadow",
      "--shadow-3": "shadow",
      "--font-display": "font",
      "--font-body": "font",
      "--font-mono": "font",
      "--font-shadow": "shadow",
      "--font-en-disp": "font",
      "--leading-tight": "font",
      "--leading-snug": "font",
      "--leading-base": "font",
      "--leading-loose": "font"
    },
    "fontFamilies": [
      "Almoni Neue Tzar",
      "Avigul",
      "Avigul Shadow",
      "FbTamlilCondensed",
      "Geomanist"
    ]
  }
}