Files
handler/project/_ds/leeworks-design-system-b3e560db-22c8-4dea-b1ef-d19ecb5f5b6e/_adherence.oxlintrc.json
T
2026-07-20 18:34:27 +00:00

432 lines
16 KiB
JSON

{
"plugins": [
"react",
"import"
],
"rules": {
"react/forbid-elements": [
"warn",
{
"forbid": []
}
],
"no-restricted-imports": [
"warn",
{
"patterns": [
{
"group": [
"components/display/**",
"components/feedback/**",
"components/forms/**",
"components/navigation/**",
"ui_kits/dashboard/**",
"ui_kits/mobile/**",
"ui_kits/website/**"
],
"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*(?!['\\\"]?(?:Outfit|Figtree|Spline Sans Mono))/i]",
"message": "Font not provided by the design system. Available: Outfit, Figtree, Spline Sans Mono."
},
{
"selector": "JSXOpeningElement[name.name='Badge'] > JSXAttribute > JSXIdentifier[name!=/^(?:tone|children|style|key|ref|className|style|children)$/]",
"message": "<Badge> doesn't accept that prop. Declared props: tone, children, style."
},
{
"selector": "JSXOpeningElement[name.name='Badge'] > JSXAttribute[name.name='tone'] > Literal[value!=/^(?:neutral|positive|warning|danger|inverse)$/]",
"message": "<Badge> tone must be one of 'neutral' | 'positive' | 'warning' | 'danger' | 'inverse'."
},
{
"selector": "JSXOpeningElement[name.name='Button'] > JSXAttribute > JSXIdentifier[name!=/^(?:variant|size|disabled|icon|children|onClick|style|key|ref|className|style|children)$/]",
"message": "<Button> doesn't accept that prop. Declared props: variant, size, disabled, icon, children, onClick, style."
},
{
"selector": "JSXOpeningElement[name.name='Button'] > JSXAttribute[name.name='variant'] > Literal[value!=/^(?:primary|secondary|ghost|danger)$/]",
"message": "<Button> variant must be one of 'primary' | 'secondary' | 'ghost' | 'danger'."
},
{
"selector": "JSXOpeningElement[name.name='Button'] > JSXAttribute[name.name='size'] > Literal[value!=/^(?:sm|md|lg)$/]",
"message": "<Button> size must be one of 'sm' | 'md' | 'lg'."
},
{
"selector": "JSXOpeningElement[name.name='Card'] > JSXAttribute > JSXIdentifier[name!=/^(?:title|subtitle|actions|footer|variant|padding|children|style|key|ref|className|style|children)$/]",
"message": "<Card> doesn't accept that prop. Declared props: title, subtitle, actions, footer, variant, padding, children, style."
},
{
"selector": "JSXOpeningElement[name.name='Card'] > JSXAttribute[name.name='variant'] > Literal[value!=/^(?:default|sunken|outline)$/]",
"message": "<Card> variant must be one of 'default' | 'sunken' | 'outline'."
},
{
"selector": "JSXOpeningElement[name.name='Checkbox'] > JSXAttribute > JSXIdentifier[name!=/^(?:label|checked|defaultChecked|onChange|disabled|style|key|ref|className|style|children)$/]",
"message": "<Checkbox> doesn't accept that prop. Declared props: label, checked, defaultChecked, onChange, disabled, style."
},
{
"selector": "JSXOpeningElement[name.name='Dialog'] > JSXAttribute > JSXIdentifier[name!=/^(?:open|title|description|actions|onClose|width|children|style|key|ref|className|style|children)$/]",
"message": "<Dialog> doesn't accept that prop. Declared props: open, title, description, actions, onClose, width, children, style."
},
{
"selector": "JSXOpeningElement[name.name='Icon'] > JSXAttribute > JSXIdentifier[name!=/^(?:name|size|strokeWidth|style|key|ref|className|style|children)$/]",
"message": "<Icon> doesn't accept that prop. Declared props: name, size, strokeWidth, style."
},
{
"selector": "JSXOpeningElement[name.name='Icon'] > JSXAttribute[name.name='name'] > Literal[value!=/^(?:dashboard|file|users|settings|search|bell|plus|check|chart|folder|chevronDown|chevronRight|more|arrowUpRight|x|menu|home|inbox|user)$/]",
"message": "<Icon> name must be one of 'dashboard' | 'file' | 'users' | 'settings' | 'search' | 'bell' | 'plus' | 'check' | 'chart' | 'folder' | 'chevronDown' | 'chevronRight' | 'more' | 'arrowUpRight' | 'x' | 'menu' | 'home' | 'inbox' | 'user'."
},
{
"selector": "JSXOpeningElement[name.name='IconButton'] > JSXAttribute > JSXIdentifier[name!=/^(?:size|variant|disabled|label|children|onClick|style|key|ref|className|style|children)$/]",
"message": "<IconButton> doesn't accept that prop. Declared props: size, variant, disabled, label, children, onClick, style."
},
{
"selector": "JSXOpeningElement[name.name='IconButton'] > JSXAttribute[name.name='size'] > Literal[value!=/^(?:sm|md|lg)$/]",
"message": "<IconButton> size must be one of 'sm' | 'md' | 'lg'."
},
{
"selector": "JSXOpeningElement[name.name='IconButton'] > JSXAttribute[name.name='variant'] > Literal[value!=/^(?:ghost|outline|primary)$/]",
"message": "<IconButton> variant must be one of 'ghost' | 'outline' | 'primary'."
},
{
"selector": "JSXOpeningElement[name.name='Input'] > JSXAttribute > JSXIdentifier[name!=/^(?:label|hint|error|size|prefix|suffix|placeholder|value|onChange|type|style|key|ref|className|style|children)$/]",
"message": "<Input> doesn't accept that prop. Declared props: label, hint, error, size, prefix, suffix, placeholder, value, onChange, type, style."
},
{
"selector": "JSXOpeningElement[name.name='Input'] > JSXAttribute[name.name='size'] > Literal[value!=/^(?:sm|md|lg)$/]",
"message": "<Input> size must be one of 'sm' | 'md' | 'lg'."
},
{
"selector": "JSXOpeningElement[name.name='Radio'] > JSXAttribute > JSXIdentifier[name!=/^(?:options|value|defaultValue|onChange|name|disabled|style|key|ref|className|style|children)$/]",
"message": "<Radio> doesn't accept that prop. Declared props: options, value, defaultValue, onChange, name, disabled, style."
},
{
"selector": "JSXOpeningElement[name.name='Select'] > JSXAttribute > JSXIdentifier[name!=/^(?:label|hint|options|size|value|onChange|style|key|ref|className|style|children)$/]",
"message": "<Select> doesn't accept that prop. Declared props: label, hint, options, size, value, onChange, style."
},
{
"selector": "JSXOpeningElement[name.name='Select'] > JSXAttribute[name.name='size'] > Literal[value!=/^(?:sm|md|lg)$/]",
"message": "<Select> size must be one of 'sm' | 'md' | 'lg'."
},
{
"selector": "JSXOpeningElement[name.name='Switch'] > JSXAttribute > JSXIdentifier[name!=/^(?:label|checked|defaultChecked|onChange|disabled|style|key|ref|className|style|children)$/]",
"message": "<Switch> doesn't accept that prop. Declared props: label, checked, defaultChecked, onChange, disabled, style."
},
{
"selector": "JSXOpeningElement[name.name='Tabs'] > JSXAttribute > JSXIdentifier[name!=/^(?:tabs|value|defaultValue|onChange|variant|style|key|ref|className|style|children)$/]",
"message": "<Tabs> doesn't accept that prop. Declared props: tabs, value, defaultValue, onChange, variant, style."
},
{
"selector": "JSXOpeningElement[name.name='Tabs'] > JSXAttribute[name.name='variant'] > Literal[value!=/^(?:underline|segmented)$/]",
"message": "<Tabs> variant must be one of 'underline' | 'segmented'."
},
{
"selector": "JSXOpeningElement[name.name='Tag'] > JSXAttribute > JSXIdentifier[name!=/^(?:onRemove|children|style|key|ref|className|style|children)$/]",
"message": "<Tag> doesn't accept that prop. Declared props: onRemove, children, style."
},
{
"selector": "JSXOpeningElement[name.name='Toast'] > JSXAttribute > JSXIdentifier[name!=/^(?:tone|title|description|onDismiss|style|key|ref|className|style|children)$/]",
"message": "<Toast> doesn't accept that prop. Declared props: tone, title, description, onDismiss, style."
},
{
"selector": "JSXOpeningElement[name.name='Toast'] > JSXAttribute[name.name='tone'] > Literal[value!=/^(?:neutral|positive|danger)$/]",
"message": "<Toast> tone must be one of 'neutral' | 'positive' | 'danger'."
},
{
"selector": "JSXOpeningElement[name.name='Tooltip'] > JSXAttribute > JSXIdentifier[name!=/^(?:label|side|children|style|key|ref|className|style|children)$/]",
"message": "<Tooltip> doesn't accept that prop. Declared props: label, side, children, style."
},
{
"selector": "JSXOpeningElement[name.name='Tooltip'] > JSXAttribute[name.name='side'] > Literal[value!=/^(?:top|bottom|left|right)$/]",
"message": "<Tooltip> side must be one of 'top' | 'bottom' | 'left' | 'right'."
}
]
},
"overrides": [
{
"files": [
"**/index.js"
],
"rules": {
"no-restricted-imports": "off"
}
}
],
"x-omelette": {
"components": {
"Badge": {
"replaces": []
},
"Button": {
"replaces": []
},
"Card": {
"replaces": []
},
"Checkbox": {
"replaces": []
},
"Dialog": {
"replaces": []
},
"Icon": {
"replaces": []
},
"IconButton": {
"replaces": []
},
"Input": {
"replaces": []
},
"Radio": {
"replaces": []
},
"Select": {
"replaces": []
},
"Switch": {
"replaces": []
},
"Tabs": {
"replaces": []
},
"Tag": {
"replaces": []
},
"Toast": {
"replaces": []
},
"Tooltip": {
"replaces": []
}
},
"tokens": [
"--border-default",
"--border-strong",
"--border-subtle",
"--content-max",
"--control-h-lg",
"--control-h-md",
"--control-h-sm",
"--control-pad-x-lg",
"--control-pad-x-md",
"--control-pad-x-sm",
"--danger",
"--danger-tint",
"--dur-base",
"--dur-fast",
"--dur-slow",
"--ease-out",
"--focus-ring",
"--font-body",
"--font-display",
"--font-mono",
"--gutter",
"--ink-0",
"--ink-1",
"--ink-2",
"--ink-3",
"--ink-4",
"--ink-5",
"--ink-6",
"--ink-7",
"--ink-8",
"--ink-9",
"--interactive",
"--interactive-hover",
"--interactive-press",
"--leading-normal",
"--leading-snug",
"--leading-tight",
"--page-max",
"--positive",
"--positive-tint",
"--radius-lg",
"--radius-md",
"--radius-pill",
"--radius-sm",
"--radius-xl",
"--shadow-card",
"--shadow-focus",
"--shadow-overlay",
"--shadow-raised",
"--signal",
"--signal-strong",
"--signal-tint",
"--space-1",
"--space-10",
"--space-11",
"--space-2",
"--space-3",
"--space-4",
"--space-5",
"--space-6",
"--space-7",
"--space-8",
"--space-9",
"--surface-card",
"--surface-inverse",
"--surface-page",
"--surface-raised",
"--surface-sunken",
"--text-2xl",
"--text-3xl",
"--text-4xl",
"--text-base",
"--text-body",
"--text-heading",
"--text-inverse",
"--text-lg",
"--text-link",
"--text-md",
"--text-muted",
"--text-sm",
"--text-xl",
"--text-xs",
"--tracking-normal",
"--tracking-tight",
"--tracking-wide",
"--type-body",
"--type-body-sm",
"--type-caption",
"--type-display",
"--type-h1",
"--type-h2",
"--type-h3",
"--type-h4",
"--type-label",
"--type-mono",
"--type-overline",
"--warning",
"--warning-tint",
"--weight-bold",
"--weight-heavy",
"--weight-medium",
"--weight-regular",
"--weight-semibold",
"--white"
],
"tokenKinds": {
"--white": "color",
"--ink-0": "color",
"--ink-1": "color",
"--ink-2": "color",
"--ink-3": "color",
"--ink-4": "color",
"--ink-5": "color",
"--ink-6": "color",
"--ink-7": "color",
"--ink-8": "color",
"--ink-9": "color",
"--signal": "color",
"--signal-strong": "color",
"--signal-tint": "color",
"--positive": "color",
"--positive-tint": "color",
"--warning": "color",
"--warning-tint": "color",
"--danger": "color",
"--danger-tint": "color",
"--surface-page": "color",
"--surface-raised": "color",
"--surface-sunken": "color",
"--surface-card": "color",
"--surface-inverse": "color",
"--text-heading": "font",
"--text-body": "font",
"--text-muted": "font",
"--text-inverse": "font",
"--text-link": "font",
"--border-subtle": "color",
"--border-default": "color",
"--border-strong": "color",
"--interactive": "color",
"--interactive-hover": "color",
"--interactive-press": "color",
"--focus-ring": "color",
"--font-display": "font",
"--font-body": "font",
"--font-mono": "font",
"--text-xs": "font",
"--text-sm": "font",
"--text-base": "font",
"--text-md": "font",
"--text-lg": "font",
"--text-xl": "font",
"--text-2xl": "font",
"--text-3xl": "font",
"--text-4xl": "font",
"--leading-tight": "font",
"--leading-snug": "font",
"--leading-normal": "font",
"--tracking-tight": "font",
"--tracking-normal": "font",
"--tracking-wide": "font",
"--weight-regular": "font",
"--weight-medium": "font",
"--weight-semibold": "font",
"--weight-bold": "font",
"--weight-heavy": "font",
"--type-display": "font",
"--type-h1": "font",
"--type-h2": "font",
"--type-h3": "font",
"--type-h4": "font",
"--type-body": "font",
"--type-body-sm": "font",
"--type-label": "font",
"--type-caption": "font",
"--type-overline": "font",
"--type-mono": "font",
"--space-1": "spacing",
"--space-2": "spacing",
"--space-3": "spacing",
"--space-4": "spacing",
"--space-5": "spacing",
"--space-6": "spacing",
"--space-7": "spacing",
"--space-8": "spacing",
"--space-9": "spacing",
"--space-10": "spacing",
"--space-11": "spacing",
"--control-h-sm": "spacing",
"--control-h-md": "spacing",
"--control-h-lg": "spacing",
"--control-pad-x-sm": "spacing",
"--control-pad-x-md": "spacing",
"--control-pad-x-lg": "spacing",
"--page-max": "spacing",
"--content-max": "spacing",
"--gutter": "spacing",
"--radius-sm": "radius",
"--radius-md": "radius",
"--radius-lg": "radius",
"--radius-xl": "radius",
"--radius-pill": "radius",
"--shadow-card": "shadow",
"--shadow-raised": "shadow",
"--shadow-overlay": "shadow",
"--shadow-focus": "shadow",
"--ease-out": "other",
"--dur-fast": "other",
"--dur-base": "other",
"--dur-slow": "other"
},
"fontFamilies": [
"Figtree",
"Outfit",
"Spline Sans Mono"
]
}
}