Revert "feat: Enterprise DSS architecture implementation"
Some checks failed
DSS Project Analysis / dss-context-update (push) Has been cancelled
Some checks failed
DSS Project Analysis / dss-context-update (push) Has been cancelled
This reverts commit 9dbd56271e.
This commit is contained in:
@@ -3,20 +3,22 @@
|
||||
"id": "accessibility",
|
||||
"version": "1.0.0",
|
||||
"name": "Accessibility Rules",
|
||||
"description": "WCAG 2.1 AA compliance rules (token-based, not computed)",
|
||||
"description": "WCAG 2.1 AA compliance rules for accessible design",
|
||||
"category": "accessibility",
|
||||
"severity": "error",
|
||||
"rules": [
|
||||
{
|
||||
"id": "images-have-alt",
|
||||
"name": "Images Must Have Alt Text",
|
||||
"description": "All img elements must have alt attribute",
|
||||
"description": "All img elements must have meaningful alt text or be marked decorative",
|
||||
"severity": "error",
|
||||
"wcag": "1.1.1",
|
||||
"validation": {
|
||||
"type": "attribute-required",
|
||||
"element": "img",
|
||||
"attribute": "alt"
|
||||
"attribute": "alt",
|
||||
"allowEmpty": true,
|
||||
"emptyMeansDecorative": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -27,7 +29,8 @@
|
||||
"wcag": "4.1.2",
|
||||
"validation": {
|
||||
"type": "accessible-name",
|
||||
"elements": ["button", "[role=button]"]
|
||||
"elements": ["button", "[role=button]"],
|
||||
"sources": ["text content", "aria-label", "aria-labelledby"]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -38,38 +41,71 @@
|
||||
"wcag": "1.3.1",
|
||||
"validation": {
|
||||
"type": "label-association",
|
||||
"elements": ["input", "select", "textarea"]
|
||||
"elements": ["input", "select", "textarea"],
|
||||
"methods": ["for/id", "aria-labelledby", "aria-label", "wrapper"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "no-focus-outline-none",
|
||||
"name": "Do Not Remove Focus Outline",
|
||||
"description": "Never use outline: none on focusable elements",
|
||||
"id": "focus-visible",
|
||||
"name": "Focus Must Be Visible",
|
||||
"description": "Interactive elements must have visible focus indicators",
|
||||
"severity": "error",
|
||||
"wcag": "2.4.7",
|
||||
"patterns": {
|
||||
"forbidden": [
|
||||
"outline:\\s*none",
|
||||
"outline:\\s*0(?![0-9])",
|
||||
":focus\\s*\\{[^}]*outline:\\s*none"
|
||||
]
|
||||
"validation": {
|
||||
"type": "focus-style",
|
||||
"minContrastRatio": 3.0,
|
||||
"forbiddenPatterns": ["outline: none", "outline: 0", ":focus { outline: none }"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "color-not-only",
|
||||
"name": "Color Not Only Indicator",
|
||||
"description": "Information must not be conveyed by color alone",
|
||||
"severity": "warning",
|
||||
"wcag": "1.4.1",
|
||||
"guidelines": [
|
||||
"Error states need icon + color + text",
|
||||
"Links in text need underline or other indicator",
|
||||
"Status indicators need icon or pattern"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "touch-target-size",
|
||||
"name": "Minimum Touch Target Size",
|
||||
"description": "Interactive elements should be at least 44x44 CSS pixels",
|
||||
"description": "Interactive elements must be at least 44x44 CSS pixels",
|
||||
"severity": "warning",
|
||||
"wcag": "2.5.5",
|
||||
"guidelines": [
|
||||
"Use Button component which ensures minimum size",
|
||||
"Ensure clickable areas have sufficient padding"
|
||||
]
|
||||
"validation": {
|
||||
"type": "size-check",
|
||||
"minWidth": 44,
|
||||
"minHeight": 44,
|
||||
"elements": ["button", "a", "[role=button]", "input[type=checkbox]", "input[type=radio]"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "keyboard-navigation",
|
||||
"name": "Keyboard Navigation",
|
||||
"description": "All functionality must be accessible via keyboard",
|
||||
"severity": "error",
|
||||
"wcag": "2.1.1",
|
||||
"validation": {
|
||||
"type": "keyboard-accessible",
|
||||
"requirements": [
|
||||
"All interactive elements focusable",
|
||||
"No keyboard traps",
|
||||
"Logical tab order",
|
||||
"Skip links for navigation"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"compliance": {
|
||||
"level": "AA",
|
||||
"standards": ["WCAG 2.1"],
|
||||
"note": "Computed checks (contrast ratio) require runtime analysis"
|
||||
"testingTools": [
|
||||
"axe-core",
|
||||
"pa11y",
|
||||
"lighthouse"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
{
|
||||
"id": "no-hardcoded-colors",
|
||||
"name": "No Hardcoded Colors",
|
||||
"description": "Colors must use design tokens, not hardcoded hex/rgb values",
|
||||
"description": "All colors must use design tokens, not hardcoded hex/rgb values",
|
||||
"severity": "error",
|
||||
"patterns": {
|
||||
"forbidden": [
|
||||
"#[0-9a-fA-F]{3,8}(?![0-9a-fA-F])",
|
||||
"#[0-9a-fA-F]{3,8}",
|
||||
"rgb\\([^)]+\\)",
|
||||
"rgba\\([^)]+\\)",
|
||||
"hsl\\([^)]+\\)",
|
||||
@@ -27,7 +27,11 @@
|
||||
"theme\\.[a-z]+"
|
||||
]
|
||||
},
|
||||
"exceptions": ["*.test.*", "*.spec.*", "**/fixtures/**", "transparent", "inherit", "currentColor"]
|
||||
"exceptions": [
|
||||
"*.test.*",
|
||||
"*.spec.*",
|
||||
"**/fixtures/**"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "semantic-color-naming",
|
||||
@@ -52,7 +56,20 @@
|
||||
}
|
||||
],
|
||||
"tokens": {
|
||||
"required": ["colors.primary", "colors.secondary", "colors.background", "colors.foreground", "colors.border", "colors.error", "colors.success", "colors.warning"],
|
||||
"optional": ["colors.muted", "colors.accent", "colors.info"]
|
||||
"required": [
|
||||
"colors.primary",
|
||||
"colors.secondary",
|
||||
"colors.background",
|
||||
"colors.foreground",
|
||||
"colors.border",
|
||||
"colors.error",
|
||||
"colors.success",
|
||||
"colors.warning"
|
||||
],
|
||||
"optional": [
|
||||
"colors.muted",
|
||||
"colors.accent",
|
||||
"colors.info"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{
|
||||
"id": "use-design-system-components",
|
||||
"name": "Use Design System Components",
|
||||
"description": "Prefer design system components over native HTML or custom implementations",
|
||||
"description": "Prefer design system components over custom implementations",
|
||||
"severity": "error",
|
||||
"components": {
|
||||
"required": {
|
||||
@@ -44,12 +44,17 @@
|
||||
"severity": "error",
|
||||
"validation": {
|
||||
"Button": {
|
||||
"requiredProps": ["variant"],
|
||||
"conditionalProps": { "loading": ["loadingText"], "icon": ["aria-label"] }
|
||||
"requiredProps": ["variant", "size"],
|
||||
"conditionalProps": {
|
||||
"loading": ["loadingText"],
|
||||
"icon": ["aria-label"]
|
||||
}
|
||||
},
|
||||
"Input": {
|
||||
"requiredProps": ["label", "name"],
|
||||
"conditionalProps": { "error": ["errorMessage"] }
|
||||
"conditionalProps": {
|
||||
"error": ["errorMessage"]
|
||||
}
|
||||
},
|
||||
"Modal": {
|
||||
"requiredProps": ["title", "onClose"],
|
||||
@@ -57,15 +62,52 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "component-composition",
|
||||
"name": "Component Composition Patterns",
|
||||
"description": "Follow recommended composition patterns for complex UIs",
|
||||
"severity": "info",
|
||||
"patterns": {
|
||||
"forms": {
|
||||
"structure": ["Form", "FormField", "Input/Select", "Button"],
|
||||
"guidelines": [
|
||||
"Wrap inputs in FormField for consistent labeling",
|
||||
"Use Form component for validation handling",
|
||||
"Place submit button inside Form"
|
||||
]
|
||||
},
|
||||
"lists": {
|
||||
"structure": ["List", "ListItem"],
|
||||
"guidelines": [
|
||||
"Use semantic list components for accessibility",
|
||||
"Implement virtualization for 50+ items"
|
||||
]
|
||||
},
|
||||
"navigation": {
|
||||
"structure": ["Nav", "NavItem", "NavLink"],
|
||||
"guidelines": [
|
||||
"Use Nav component for main navigation",
|
||||
"Implement active state handling"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "no-inline-styles",
|
||||
"name": "No Inline Styles on Components",
|
||||
"description": "Components should use className/variant props, not style attribute",
|
||||
"severity": "warning",
|
||||
"patterns": {
|
||||
"forbidden": ["style={{", "style={"]
|
||||
},
|
||||
"exceptions": ["dynamic positioning", "animations", "calculated values"]
|
||||
"forbidden": [
|
||||
"style={{",
|
||||
"style={{"
|
||||
],
|
||||
"exceptions": [
|
||||
"dynamic positioning",
|
||||
"animations",
|
||||
"calculated values"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"adoption": {
|
||||
@@ -74,6 +116,10 @@
|
||||
"target": 80,
|
||||
"excellent": 95
|
||||
},
|
||||
"metrics": ["percentage_using_ds_components", "custom_component_count", "token_compliance_rate"]
|
||||
"metrics": [
|
||||
"percentage_using_ds_components",
|
||||
"custom_component_count",
|
||||
"token_compliance_rate"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{
|
||||
"id": "no-arbitrary-spacing",
|
||||
"name": "No Arbitrary Spacing Values",
|
||||
"description": "Spacing must use token scale, not arbitrary pixel values",
|
||||
"description": "Spacing must use token scale (4px increments), not arbitrary values",
|
||||
"severity": "warning",
|
||||
"patterns": {
|
||||
"forbidden": [
|
||||
@@ -24,7 +24,12 @@
|
||||
"spacing\\.[a-z0-9]+"
|
||||
]
|
||||
},
|
||||
"exceptions": ["0", "0px", "auto", "inherit"]
|
||||
"exceptions": [
|
||||
"0",
|
||||
"0px",
|
||||
"auto",
|
||||
"inherit"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "spacing-scale",
|
||||
@@ -35,10 +40,29 @@
|
||||
"type": "scale-check",
|
||||
"allowedValues": [0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96, 128]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "consistent-component-spacing",
|
||||
"name": "Component Internal Spacing",
|
||||
"description": "Components should use consistent internal spacing patterns",
|
||||
"severity": "info",
|
||||
"guidelines": [
|
||||
"Use spacing.xs (4px) for tight groupings",
|
||||
"Use spacing.sm (8px) for related elements",
|
||||
"Use spacing.md (16px) for section separation",
|
||||
"Use spacing.lg (24px) for major sections",
|
||||
"Use spacing.xl (32px+) for page-level separation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"tokens": {
|
||||
"required": ["spacing.xs", "spacing.sm", "spacing.md", "spacing.lg", "spacing.xl"],
|
||||
"required": [
|
||||
"spacing.xs",
|
||||
"spacing.sm",
|
||||
"spacing.md",
|
||||
"spacing.lg",
|
||||
"spacing.xl"
|
||||
],
|
||||
"scale": {
|
||||
"xs": "4px",
|
||||
"sm": "8px",
|
||||
|
||||
@@ -10,16 +10,15 @@
|
||||
{
|
||||
"id": "use-typography-scale",
|
||||
"name": "Use Typography Scale",
|
||||
"description": "Font sizes must use the defined typography scale tokens",
|
||||
"description": "Font sizes must use the defined typography scale",
|
||||
"severity": "error",
|
||||
"patterns": {
|
||||
"forbidden": [
|
||||
"font-size:\\s*[0-9]+px",
|
||||
"fontSize:\\s*[0-9]+",
|
||||
"fontSize:\\s*'[0-9]+px'"
|
||||
"fontSize:\\s*[0-9]+"
|
||||
],
|
||||
"allowed": [
|
||||
"var\\(--font-size-[a-z0-9]+\\)",
|
||||
"var\\(--font-size-[a-z]+\\)",
|
||||
"\\$font-size-[a-z]+",
|
||||
"typography\\.[a-z]+"
|
||||
]
|
||||
@@ -37,25 +36,26 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "no-font-family-override",
|
||||
"name": "No Font Family Override",
|
||||
"description": "Font families should use design system tokens",
|
||||
"severity": "warning",
|
||||
"patterns": {
|
||||
"forbidden": [
|
||||
"font-family:\\s*['\"][^'\"]+['\"]",
|
||||
"fontFamily:\\s*['\"][^'\"]+['\"]"
|
||||
],
|
||||
"allowed": [
|
||||
"var\\(--font-[a-z]+\\)",
|
||||
"\\$font-[a-z]+",
|
||||
"fonts\\.[a-z]+"
|
||||
]
|
||||
}
|
||||
"id": "line-height-consistency",
|
||||
"name": "Consistent Line Heights",
|
||||
"description": "Line heights should match the typography scale",
|
||||
"severity": "info",
|
||||
"guidelines": [
|
||||
"Use lineHeight.tight (1.25) for headings",
|
||||
"Use lineHeight.normal (1.5) for body text",
|
||||
"Use lineHeight.relaxed (1.75) for long-form content"
|
||||
]
|
||||
}
|
||||
],
|
||||
"tokens": {
|
||||
"required": ["typography.h1", "typography.h2", "typography.h3", "typography.body", "typography.small"],
|
||||
"required": [
|
||||
"typography.h1",
|
||||
"typography.h2",
|
||||
"typography.h3",
|
||||
"typography.body",
|
||||
"typography.small",
|
||||
"typography.caption"
|
||||
],
|
||||
"scale": {
|
||||
"xs": "12px",
|
||||
"sm": "14px",
|
||||
@@ -64,7 +64,12 @@
|
||||
"xl": "20px",
|
||||
"2xl": "24px",
|
||||
"3xl": "30px",
|
||||
"4xl": "36px"
|
||||
"4xl": "36px",
|
||||
"5xl": "48px"
|
||||
},
|
||||
"fontFamilies": {
|
||||
"sans": "Inter, system-ui, sans-serif",
|
||||
"mono": "JetBrains Mono, monospace"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user