@empline/preflight 1.1.11 → 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/checks/consolidated/auth-storage-state.d.ts +3 -0
- package/dist/checks/consolidated/auth-storage-state.d.ts.map +1 -0
- package/dist/checks/consolidated/auth-storage-state.js +146 -0
- package/dist/checks/consolidated/auth-storage-state.js.map +1 -0
- package/dist/checks/consolidated/business.d.ts +50 -0
- package/dist/checks/consolidated/business.d.ts.map +1 -0
- package/dist/checks/consolidated/business.js +252 -0
- package/dist/checks/consolidated/business.js.map +1 -0
- package/dist/checks/consolidated/caching-strategy.d.ts +104 -0
- package/dist/checks/consolidated/caching-strategy.d.ts.map +1 -0
- package/dist/checks/consolidated/caching-strategy.js +725 -0
- package/dist/checks/consolidated/caching-strategy.js.map +1 -0
- package/dist/checks/consolidated/code-quality.d.ts +83 -0
- package/dist/checks/consolidated/code-quality.d.ts.map +1 -0
- package/dist/checks/consolidated/code-quality.js +445 -0
- package/dist/checks/consolidated/code-quality.js.map +1 -0
- package/dist/checks/consolidated/console-statements.d.ts +32 -0
- package/dist/checks/consolidated/console-statements.d.ts.map +1 -0
- package/dist/checks/consolidated/console-statements.js +304 -0
- package/dist/checks/consolidated/console-statements.js.map +1 -0
- package/dist/checks/consolidated/css-advanced-validation.d.ts +24 -0
- package/dist/checks/consolidated/css-advanced-validation.d.ts.map +1 -0
- package/dist/checks/consolidated/css-advanced-validation.js +415 -0
- package/dist/checks/consolidated/css-advanced-validation.js.map +1 -0
- package/dist/checks/consolidated/css-organization.d.ts +14 -0
- package/dist/checks/consolidated/css-organization.d.ts.map +1 -0
- package/dist/checks/consolidated/css-organization.js +432 -0
- package/dist/checks/consolidated/css-organization.js.map +1 -0
- package/dist/checks/consolidated/css-runtime-validation.d.ts +22 -0
- package/dist/checks/consolidated/css-runtime-validation.d.ts.map +1 -0
- package/dist/checks/consolidated/css-runtime-validation.js +330 -0
- package/dist/checks/consolidated/css-runtime-validation.js.map +1 -0
- package/dist/checks/consolidated/css-variable-validation.d.ts +17 -0
- package/dist/checks/consolidated/css-variable-validation.d.ts.map +1 -0
- package/dist/checks/consolidated/css-variable-validation.js +412 -0
- package/dist/checks/consolidated/css-variable-validation.js.map +1 -0
- package/dist/checks/consolidated/dark-mode-consistency.d.ts +23 -0
- package/dist/checks/consolidated/dark-mode-consistency.d.ts.map +1 -0
- package/dist/checks/consolidated/dark-mode-consistency.js +291 -0
- package/dist/checks/consolidated/dark-mode-consistency.js.map +1 -0
- package/dist/checks/consolidated/database.d.ts +95 -0
- package/dist/checks/consolidated/database.d.ts.map +1 -0
- package/dist/checks/consolidated/database.js +427 -0
- package/dist/checks/consolidated/database.js.map +1 -0
- package/dist/checks/consolidated/e2e-checks.d.ts +52 -0
- package/dist/checks/consolidated/e2e-checks.d.ts.map +1 -0
- package/dist/checks/consolidated/e2e-checks.js +157 -0
- package/dist/checks/consolidated/e2e-checks.js.map +1 -0
- package/dist/checks/consolidated/e2e-regression-coverage.d.ts +14 -0
- package/dist/checks/consolidated/e2e-regression-coverage.d.ts.map +1 -0
- package/dist/checks/consolidated/e2e-regression-coverage.js +151 -0
- package/dist/checks/consolidated/e2e-regression-coverage.js.map +1 -0
- package/dist/checks/consolidated/e2e-validation.d.ts +137 -0
- package/dist/checks/consolidated/e2e-validation.d.ts.map +1 -0
- package/dist/checks/consolidated/e2e-validation.js +1001 -0
- package/dist/checks/consolidated/e2e-validation.js.map +1 -0
- package/dist/checks/consolidated/enterprise-baseline.d.ts +9 -0
- package/dist/checks/consolidated/enterprise-baseline.d.ts.map +1 -0
- package/dist/checks/consolidated/enterprise-baseline.js +277 -0
- package/dist/checks/consolidated/enterprise-baseline.js.map +1 -0
- package/dist/checks/consolidated/generate-pageload-config.d.ts +6 -0
- package/dist/checks/consolidated/generate-pageload-config.d.ts.map +1 -0
- package/dist/checks/consolidated/generate-pageload-config.js +161 -0
- package/dist/checks/consolidated/generate-pageload-config.js.map +1 -0
- package/dist/checks/consolidated/hardened-checks.d.ts +276 -0
- package/dist/checks/consolidated/hardened-checks.d.ts.map +1 -0
- package/dist/checks/consolidated/hardened-checks.js +3056 -0
- package/dist/checks/consolidated/hardened-checks.js.map +1 -0
- package/dist/checks/consolidated/homepage-ux.d.ts +12 -0
- package/dist/checks/consolidated/homepage-ux.d.ts.map +1 -0
- package/dist/checks/consolidated/homepage-ux.js +242 -0
- package/dist/checks/consolidated/homepage-ux.js.map +1 -0
- package/dist/checks/consolidated/images.d.ts +76 -0
- package/dist/checks/consolidated/images.d.ts.map +1 -0
- package/dist/checks/consolidated/images.js +311 -0
- package/dist/checks/consolidated/images.js.map +1 -0
- package/dist/checks/consolidated/import-cycles.d.ts +63 -0
- package/dist/checks/consolidated/import-cycles.d.ts.map +1 -0
- package/dist/checks/consolidated/import-cycles.js +291 -0
- package/dist/checks/consolidated/import-cycles.js.map +1 -0
- package/dist/checks/consolidated/imports.d.ts +112 -0
- package/dist/checks/consolidated/imports.d.ts.map +1 -0
- package/dist/checks/consolidated/imports.js +977 -0
- package/dist/checks/consolidated/imports.js.map +1 -0
- package/dist/checks/consolidated/inline-style-conflicts.d.ts +21 -0
- package/dist/checks/consolidated/inline-style-conflicts.d.ts.map +1 -0
- package/dist/checks/consolidated/inline-style-conflicts.js +300 -0
- package/dist/checks/consolidated/inline-style-conflicts.js.map +1 -0
- package/dist/checks/consolidated/lib-organization.d.ts +12 -0
- package/dist/checks/consolidated/lib-organization.d.ts.map +1 -0
- package/dist/checks/consolidated/lib-organization.js +419 -0
- package/dist/checks/consolidated/lib-organization.js.map +1 -0
- package/dist/checks/consolidated/n-plus-one.d.ts +63 -0
- package/dist/checks/consolidated/n-plus-one.d.ts.map +1 -0
- package/dist/checks/consolidated/n-plus-one.js +331 -0
- package/dist/checks/consolidated/n-plus-one.js.map +1 -0
- package/dist/checks/consolidated/nextjs.d.ts +51 -0
- package/dist/checks/consolidated/nextjs.d.ts.map +1 -0
- package/dist/checks/consolidated/nextjs.js +205 -0
- package/dist/checks/consolidated/nextjs.js.map +1 -0
- package/dist/checks/consolidated/organization.d.ts +54 -0
- package/dist/checks/consolidated/organization.d.ts.map +1 -0
- package/dist/checks/consolidated/organization.js +158 -0
- package/dist/checks/consolidated/organization.js.map +1 -0
- package/dist/checks/consolidated/pageload.d.ts +12 -0
- package/dist/checks/consolidated/pageload.d.ts.map +1 -0
- package/dist/checks/consolidated/pageload.js +138 -0
- package/dist/checks/consolidated/pageload.js.map +1 -0
- package/dist/checks/consolidated/performance.d.ts +112 -0
- package/dist/checks/consolidated/performance.d.ts.map +1 -0
- package/dist/checks/consolidated/performance.js +1546 -0
- package/dist/checks/consolidated/performance.js.map +1 -0
- package/dist/checks/consolidated/quality.d.ts +52 -0
- package/dist/checks/consolidated/quality.d.ts.map +1 -0
- package/dist/checks/consolidated/quality.js +253 -0
- package/dist/checks/consolidated/quality.js.map +1 -0
- package/dist/checks/consolidated/react.d.ts +48 -0
- package/dist/checks/consolidated/react.d.ts.map +1 -0
- package/dist/checks/consolidated/react.js +203 -0
- package/dist/checks/consolidated/react.js.map +1 -0
- package/dist/checks/consolidated/regression-hygiene.d.ts +17 -0
- package/dist/checks/consolidated/regression-hygiene.d.ts.map +1 -0
- package/dist/checks/consolidated/regression-hygiene.js +242 -0
- package/dist/checks/consolidated/regression-hygiene.js.map +1 -0
- package/dist/checks/consolidated/regression.d.ts +20 -0
- package/dist/checks/consolidated/regression.d.ts.map +1 -0
- package/dist/checks/consolidated/regression.js +121 -0
- package/dist/checks/consolidated/regression.js.map +1 -0
- package/dist/checks/consolidated/runtime.d.ts +53 -0
- package/dist/checks/consolidated/runtime.d.ts.map +1 -0
- package/dist/checks/consolidated/runtime.js +160 -0
- package/dist/checks/consolidated/runtime.js.map +1 -0
- package/dist/checks/consolidated/script-performance.d.ts +17 -0
- package/dist/checks/consolidated/script-performance.d.ts.map +1 -0
- package/dist/checks/consolidated/script-performance.js +137 -0
- package/dist/checks/consolidated/script-performance.js.map +1 -0
- package/dist/checks/consolidated/security.d.ts +78 -0
- package/dist/checks/consolidated/security.d.ts.map +1 -0
- package/dist/checks/consolidated/security.js +404 -0
- package/dist/checks/consolidated/security.js.map +1 -0
- package/dist/checks/consolidated/seo.d.ts +31 -0
- package/dist/checks/consolidated/seo.d.ts.map +1 -0
- package/dist/checks/consolidated/seo.js +1438 -0
- package/dist/checks/consolidated/seo.js.map +1 -0
- package/dist/checks/consolidated/sx-prop-deprecation.d.ts +22 -0
- package/dist/checks/consolidated/sx-prop-deprecation.d.ts.map +1 -0
- package/dist/checks/consolidated/sx-prop-deprecation.js +280 -0
- package/dist/checks/consolidated/sx-prop-deprecation.js.map +1 -0
- package/dist/checks/consolidated/tailwind-class-validation.d.ts +25 -0
- package/dist/checks/consolidated/tailwind-class-validation.d.ts.map +1 -0
- package/dist/checks/consolidated/tailwind-class-validation.js +533 -0
- package/dist/checks/consolidated/tailwind-class-validation.js.map +1 -0
- package/dist/checks/consolidated/testing.d.ts +54 -0
- package/dist/checks/consolidated/testing.d.ts.map +1 -0
- package/dist/checks/consolidated/testing.js +163 -0
- package/dist/checks/consolidated/testing.js.map +1 -0
- package/dist/checks/consolidated/typescript.d.ts +3 -0
- package/dist/checks/consolidated/typescript.d.ts.map +1 -0
- package/dist/checks/consolidated/typescript.js +31 -0
- package/dist/checks/consolidated/typescript.js.map +1 -0
- package/dist/checks/consolidated/ui-accessibility-advanced.d.ts +104 -0
- package/dist/checks/consolidated/ui-accessibility-advanced.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-accessibility-advanced.js +689 -0
- package/dist/checks/consolidated/ui-accessibility-advanced.js.map +1 -0
- package/dist/checks/consolidated/ui-accessibility.d.ts +121 -0
- package/dist/checks/consolidated/ui-accessibility.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-accessibility.js +776 -0
- package/dist/checks/consolidated/ui-accessibility.js.map +1 -0
- package/dist/checks/consolidated/ui-advanced-spacing.d.ts +142 -0
- package/dist/checks/consolidated/ui-advanced-spacing.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-advanced-spacing.js +1220 -0
- package/dist/checks/consolidated/ui-advanced-spacing.js.map +1 -0
- package/dist/checks/consolidated/ui-animation-duration.d.ts +108 -0
- package/dist/checks/consolidated/ui-animation-duration.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-animation-duration.js +531 -0
- package/dist/checks/consolidated/ui-animation-duration.js.map +1 -0
- package/dist/checks/consolidated/ui-border-radius.d.ts +90 -0
- package/dist/checks/consolidated/ui-border-radius.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-border-radius.js +519 -0
- package/dist/checks/consolidated/ui-border-radius.js.map +1 -0
- package/dist/checks/consolidated/ui-buttons.d.ts +32 -0
- package/dist/checks/consolidated/ui-buttons.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-buttons.js +481 -0
- package/dist/checks/consolidated/ui-buttons.js.map +1 -0
- package/dist/checks/consolidated/ui-cards.d.ts +29 -0
- package/dist/checks/consolidated/ui-cards.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-cards.js +504 -0
- package/dist/checks/consolidated/ui-cards.js.map +1 -0
- package/dist/checks/consolidated/ui-checks.d.ts +48 -0
- package/dist/checks/consolidated/ui-checks.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-checks.js +264 -0
- package/dist/checks/consolidated/ui-checks.js.map +1 -0
- package/dist/checks/consolidated/ui-cleanup.d.ts +81 -0
- package/dist/checks/consolidated/ui-cleanup.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-cleanup.js +650 -0
- package/dist/checks/consolidated/ui-cleanup.js.map +1 -0
- package/dist/checks/consolidated/ui-components.d.ts +255 -0
- package/dist/checks/consolidated/ui-components.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-components.js +2008 -0
- package/dist/checks/consolidated/ui-components.js.map +1 -0
- package/dist/checks/consolidated/ui-consistency-advanced.d.ts +130 -0
- package/dist/checks/consolidated/ui-consistency-advanced.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-consistency-advanced.js +982 -0
- package/dist/checks/consolidated/ui-consistency-advanced.js.map +1 -0
- package/dist/checks/consolidated/ui-consistency-comprehensive.d.ts +30 -0
- package/dist/checks/consolidated/ui-consistency-comprehensive.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-consistency-comprehensive.js +1018 -0
- package/dist/checks/consolidated/ui-consistency-comprehensive.js.map +1 -0
- package/dist/checks/consolidated/ui-consistency-extended.d.ts +26 -0
- package/dist/checks/consolidated/ui-consistency-extended.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-consistency-extended.js +606 -0
- package/dist/checks/consolidated/ui-consistency-extended.js.map +1 -0
- package/dist/checks/consolidated/ui-data-display.d.ts +103 -0
- package/dist/checks/consolidated/ui-data-display.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-data-display.js +740 -0
- package/dist/checks/consolidated/ui-data-display.js.map +1 -0
- package/dist/checks/consolidated/ui-deprecated.d.ts +22 -0
- package/dist/checks/consolidated/ui-deprecated.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-deprecated.js +336 -0
- package/dist/checks/consolidated/ui-deprecated.js.map +1 -0
- package/dist/checks/consolidated/ui-empty-null-states.d.ts +90 -0
- package/dist/checks/consolidated/ui-empty-null-states.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-empty-null-states.js +511 -0
- package/dist/checks/consolidated/ui-empty-null-states.js.map +1 -0
- package/dist/checks/consolidated/ui-error-states.d.ts +99 -0
- package/dist/checks/consolidated/ui-error-states.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-error-states.js +694 -0
- package/dist/checks/consolidated/ui-error-states.js.map +1 -0
- package/dist/checks/consolidated/ui-feedback-confirmations.d.ts +90 -0
- package/dist/checks/consolidated/ui-feedback-confirmations.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-feedback-confirmations.js +596 -0
- package/dist/checks/consolidated/ui-feedback-confirmations.js.map +1 -0
- package/dist/checks/consolidated/ui-forms.d.ts +32 -0
- package/dist/checks/consolidated/ui-forms.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-forms.js +568 -0
- package/dist/checks/consolidated/ui-forms.js.map +1 -0
- package/dist/checks/consolidated/ui-gradient-shadow.d.ts +90 -0
- package/dist/checks/consolidated/ui-gradient-shadow.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-gradient-shadow.js +568 -0
- package/dist/checks/consolidated/ui-gradient-shadow.js.map +1 -0
- package/dist/checks/consolidated/ui-grid-responsive.d.ts +27 -0
- package/dist/checks/consolidated/ui-grid-responsive.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-grid-responsive.js +441 -0
- package/dist/checks/consolidated/ui-grid-responsive.js.map +1 -0
- package/dist/checks/consolidated/ui-icon-size-tokens.d.ts +104 -0
- package/dist/checks/consolidated/ui-icon-size-tokens.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-icon-size-tokens.js +514 -0
- package/dist/checks/consolidated/ui-icon-size-tokens.js.map +1 -0
- package/dist/checks/consolidated/ui-iconography.d.ts +90 -0
- package/dist/checks/consolidated/ui-iconography.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-iconography.js +565 -0
- package/dist/checks/consolidated/ui-iconography.js.map +1 -0
- package/dist/checks/consolidated/ui-interactive-states.d.ts +240 -0
- package/dist/checks/consolidated/ui-interactive-states.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-interactive-states.js +2474 -0
- package/dist/checks/consolidated/ui-interactive-states.js.map +1 -0
- package/dist/checks/consolidated/ui-layout.d.ts +256 -0
- package/dist/checks/consolidated/ui-layout.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-layout.js +1371 -0
- package/dist/checks/consolidated/ui-layout.js.map +1 -0
- package/dist/checks/consolidated/ui-loading-skeletons.d.ts +11 -0
- package/dist/checks/consolidated/ui-loading-skeletons.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-loading-skeletons.js +145 -0
- package/dist/checks/consolidated/ui-loading-skeletons.js.map +1 -0
- package/dist/checks/consolidated/ui-loading-state-skeletons.d.ts +9 -0
- package/dist/checks/consolidated/ui-loading-state-skeletons.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-loading-state-skeletons.js +125 -0
- package/dist/checks/consolidated/ui-loading-state-skeletons.js.map +1 -0
- package/dist/checks/consolidated/ui-media.d.ts +74 -0
- package/dist/checks/consolidated/ui-media.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-media.js +408 -0
- package/dist/checks/consolidated/ui-media.js.map +1 -0
- package/dist/checks/consolidated/ui-micro-interactions.d.ts +107 -0
- package/dist/checks/consolidated/ui-micro-interactions.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-micro-interactions.js +825 -0
- package/dist/checks/consolidated/ui-micro-interactions.js.map +1 -0
- package/dist/checks/consolidated/ui-microcopy-consistency.d.ts +114 -0
- package/dist/checks/consolidated/ui-microcopy-consistency.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-microcopy-consistency.js +566 -0
- package/dist/checks/consolidated/ui-microcopy-consistency.js.map +1 -0
- package/dist/checks/consolidated/ui-mobile-ux.d.ts +251 -0
- package/dist/checks/consolidated/ui-mobile-ux.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-mobile-ux.js +2212 -0
- package/dist/checks/consolidated/ui-mobile-ux.js.map +1 -0
- package/dist/checks/consolidated/ui-motion-accessibility.d.ts +93 -0
- package/dist/checks/consolidated/ui-motion-accessibility.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-motion-accessibility.js +450 -0
- package/dist/checks/consolidated/ui-motion-accessibility.js.map +1 -0
- package/dist/checks/consolidated/ui-navigation.d.ts +85 -0
- package/dist/checks/consolidated/ui-navigation.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-navigation.js +673 -0
- package/dist/checks/consolidated/ui-navigation.js.map +1 -0
- package/dist/checks/consolidated/ui-patterns.d.ts +174 -0
- package/dist/checks/consolidated/ui-patterns.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-patterns.js +1532 -0
- package/dist/checks/consolidated/ui-patterns.js.map +1 -0
- package/dist/checks/consolidated/ui-responsive.d.ts +89 -0
- package/dist/checks/consolidated/ui-responsive.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-responsive.js +588 -0
- package/dist/checks/consolidated/ui-responsive.js.map +1 -0
- package/dist/checks/consolidated/ui-spacing-standards.d.ts +43 -0
- package/dist/checks/consolidated/ui-spacing-standards.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-spacing-standards.js +874 -0
- package/dist/checks/consolidated/ui-spacing-standards.js.map +1 -0
- package/dist/checks/consolidated/ui-spacing.d.ts +751 -0
- package/dist/checks/consolidated/ui-spacing.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-spacing.js +4996 -0
- package/dist/checks/consolidated/ui-spacing.js.map +1 -0
- package/dist/checks/consolidated/ui-standards-auto-fixer.d.ts +70 -0
- package/dist/checks/consolidated/ui-standards-auto-fixer.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-standards-auto-fixer.js +429 -0
- package/dist/checks/consolidated/ui-standards-auto-fixer.js.map +1 -0
- package/dist/checks/consolidated/ui-standards-enforcement.d.ts +100 -0
- package/dist/checks/consolidated/ui-standards-enforcement.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-standards-enforcement.js +935 -0
- package/dist/checks/consolidated/ui-standards-enforcement.js.map +1 -0
- package/dist/checks/consolidated/ui-state-consistency.d.ts +90 -0
- package/dist/checks/consolidated/ui-state-consistency.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-state-consistency.js +659 -0
- package/dist/checks/consolidated/ui-state-consistency.js.map +1 -0
- package/dist/checks/consolidated/ui-style-validation.d.ts +74 -0
- package/dist/checks/consolidated/ui-style-validation.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-style-validation.js +403 -0
- package/dist/checks/consolidated/ui-style-validation.js.map +1 -0
- package/dist/checks/consolidated/ui-tokens.d.ts +110 -0
- package/dist/checks/consolidated/ui-tokens.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-tokens.js +990 -0
- package/dist/checks/consolidated/ui-tokens.js.map +1 -0
- package/dist/checks/consolidated/ui-typography.d.ts +77 -0
- package/dist/checks/consolidated/ui-typography.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-typography.js +416 -0
- package/dist/checks/consolidated/ui-typography.js.map +1 -0
- package/dist/checks/consolidated/ui-visual-hierarchy.d.ts +90 -0
- package/dist/checks/consolidated/ui-visual-hierarchy.d.ts.map +1 -0
- package/dist/checks/consolidated/ui-visual-hierarchy.js +562 -0
- package/dist/checks/consolidated/ui-visual-hierarchy.js.map +1 -0
- package/dist/checks/consolidated/woocommerce.d.ts +50 -0
- package/dist/checks/consolidated/woocommerce.d.ts.map +1 -0
- package/dist/checks/consolidated/woocommerce.js +198 -0
- package/dist/checks/consolidated/woocommerce.js.map +1 -0
- package/dist/checks/core/api-route-protection.d.ts +2 -0
- package/dist/checks/core/api-route-protection.d.ts.map +1 -0
- package/dist/checks/core/api-route-protection.js +101 -0
- package/dist/checks/core/api-route-protection.js.map +1 -0
- package/dist/checks/core/critical.d.ts +8 -0
- package/dist/checks/core/critical.d.ts.map +1 -0
- package/dist/checks/core/critical.js +200 -0
- package/dist/checks/core/critical.js.map +1 -0
- package/dist/checks/core/database.d.ts +8 -0
- package/dist/checks/core/database.d.ts.map +1 -0
- package/dist/checks/core/database.js +699 -0
- package/dist/checks/core/database.js.map +1 -0
- package/dist/checks/core/development.d.ts +8 -0
- package/dist/checks/core/development.d.ts.map +1 -0
- package/dist/checks/core/development.js +417 -0
- package/dist/checks/core/development.js.map +1 -0
- package/dist/checks/core/hydration-mismatch-check.d.ts +38 -0
- package/dist/checks/core/hydration-mismatch-check.d.ts.map +1 -0
- package/dist/checks/core/hydration-mismatch-check.js +411 -0
- package/dist/checks/core/hydration-mismatch-check.js.map +1 -0
- package/dist/checks/core/performance.d.ts +8 -0
- package/dist/checks/core/performance.d.ts.map +1 -0
- package/dist/checks/core/performance.js +474 -0
- package/dist/checks/core/performance.js.map +1 -0
- package/dist/checks/core/security.d.ts +8 -0
- package/dist/checks/core/security.d.ts.map +1 -0
- package/dist/checks/core/security.js +275 -0
- package/dist/checks/core/security.js.map +1 -0
- package/dist/checks/core/standardized-error-handling.d.ts +43 -0
- package/dist/checks/core/standardized-error-handling.d.ts.map +1 -0
- package/dist/checks/core/standardized-error-handling.js +384 -0
- package/dist/checks/core/standardized-error-handling.js.map +1 -0
- package/dist/checks/core/supercatch.d.ts +8 -0
- package/dist/checks/core/supercatch.d.ts.map +1 -0
- package/dist/checks/core/supercatch.js +750 -0
- package/dist/checks/core/supercatch.js.map +1 -0
- package/dist/checks/core/suppression-check.d.ts +2 -0
- package/dist/checks/core/suppression-check.d.ts.map +1 -0
- package/dist/checks/core/suppression-check.js +129 -0
- package/dist/checks/core/suppression-check.js.map +1 -0
- package/dist/checks/core/ui-quality.d.ts +8 -0
- package/dist/checks/core/ui-quality.d.ts.map +1 -0
- package/dist/checks/core/ui-quality.js +1736 -0
- package/dist/checks/core/ui-quality.js.map +1 -0
- package/dist/checks/core/unused-assets-check.d.ts +2 -0
- package/dist/checks/core/unused-assets-check.d.ts.map +1 -0
- package/dist/checks/core/unused-assets-check.js +112 -0
- package/dist/checks/core/unused-assets-check.js.map +1 -0
- package/dist/checks/core/use-status-ssr-safety.d.ts +34 -0
- package/dist/checks/core/use-status-ssr-safety.d.ts.map +1 -0
- package/dist/checks/core/use-status-ssr-safety.js +283 -0
- package/dist/checks/core/use-status-ssr-safety.js.map +1 -0
- package/dist/checks/email/email-flow-validation.d.ts +23 -0
- package/dist/checks/email/email-flow-validation.d.ts.map +1 -0
- package/dist/checks/email/email-flow-validation.js +468 -0
- package/dist/checks/email/email-flow-validation.js.map +1 -0
- package/dist/checks/email/email-template-db-verification.d.ts +20 -0
- package/dist/checks/email/email-template-db-verification.d.ts.map +1 -0
- package/dist/checks/email/email-template-db-verification.js +46 -0
- package/dist/checks/email/email-template-db-verification.js.map +1 -0
- package/dist/checks/email/email-template-validation.d.ts +24 -0
- package/dist/checks/email/email-template-validation.d.ts.map +1 -0
- package/dist/checks/email/email-template-validation.js +688 -0
- package/dist/checks/email/email-template-validation.js.map +1 -0
- package/dist/checks/jsx/comment-placement.d.ts +45 -0
- package/dist/checks/jsx/comment-placement.d.ts.map +1 -0
- package/dist/checks/jsx/comment-placement.js +316 -0
- package/dist/checks/jsx/comment-placement.js.map +1 -0
- package/dist/checks/specialized/admin-layout-check.d.ts +19 -0
- package/dist/checks/specialized/admin-layout-check.d.ts.map +1 -0
- package/dist/checks/specialized/admin-layout-check.js +166 -0
- package/dist/checks/specialized/admin-layout-check.js.map +1 -0
- package/dist/checks/specialized/client-server-separation.d.ts +14 -0
- package/dist/checks/specialized/client-server-separation.d.ts.map +1 -0
- package/dist/checks/specialized/client-server-separation.js +197 -0
- package/dist/checks/specialized/client-server-separation.js.map +1 -0
- package/dist/checks/specialized/cost-optimization.d.ts +18 -0
- package/dist/checks/specialized/cost-optimization.d.ts.map +1 -0
- package/dist/checks/specialized/cost-optimization.js +78 -0
- package/dist/checks/specialized/cost-optimization.js.map +1 -0
- package/dist/checks/specialized/database-migration-sync.d.ts +21 -0
- package/dist/checks/specialized/database-migration-sync.d.ts.map +1 -0
- package/dist/checks/specialized/database-migration-sync.js +150 -0
- package/dist/checks/specialized/database-migration-sync.js.map +1 -0
- package/dist/checks/specialized/database-model-validation.d.ts +15 -0
- package/dist/checks/specialized/database-model-validation.d.ts.map +1 -0
- package/dist/checks/specialized/database-model-validation.js +35 -0
- package/dist/checks/specialized/database-model-validation.js.map +1 -0
- package/dist/checks/specialized/database-schema-migrations-diff.d.ts +27 -0
- package/dist/checks/specialized/database-schema-migrations-diff.d.ts.map +1 -0
- package/dist/checks/specialized/database-schema-migrations-diff.js +177 -0
- package/dist/checks/specialized/database-schema-migrations-diff.js.map +1 -0
- package/dist/checks/specialized/database-schema-sync.d.ts +23 -0
- package/dist/checks/specialized/database-schema-sync.d.ts.map +1 -0
- package/dist/checks/specialized/database-schema-sync.js +77 -0
- package/dist/checks/specialized/database-schema-sync.js.map +1 -0
- package/dist/checks/specialized/decimal-serialization.d.ts +24 -0
- package/dist/checks/specialized/decimal-serialization.d.ts.map +1 -0
- package/dist/checks/specialized/decimal-serialization.js +400 -0
- package/dist/checks/specialized/decimal-serialization.js.map +1 -0
- package/dist/checks/specialized/detect-router-issues.d.ts +14 -0
- package/dist/checks/specialized/detect-router-issues.d.ts.map +1 -0
- package/dist/checks/specialized/detect-router-issues.js +96 -0
- package/dist/checks/specialized/detect-router-issues.js.map +1 -0
- package/dist/checks/specialized/enum-validation.d.ts +15 -0
- package/dist/checks/specialized/enum-validation.d.ts.map +1 -0
- package/dist/checks/specialized/enum-validation.js +35 -0
- package/dist/checks/specialized/enum-validation.js.map +1 -0
- package/dist/checks/specialized/hash-collision.d.ts +18 -0
- package/dist/checks/specialized/hash-collision.d.ts.map +1 -0
- package/dist/checks/specialized/hash-collision.js +78 -0
- package/dist/checks/specialized/hash-collision.js.map +1 -0
- package/dist/checks/specialized/id-generation-enforcement.d.ts +16 -0
- package/dist/checks/specialized/id-generation-enforcement.d.ts.map +1 -0
- package/dist/checks/specialized/id-generation-enforcement.js +307 -0
- package/dist/checks/specialized/id-generation-enforcement.js.map +1 -0
- package/dist/checks/specialized/image-data-integrity.d.ts +15 -0
- package/dist/checks/specialized/image-data-integrity.d.ts.map +1 -0
- package/dist/checks/specialized/image-data-integrity.js +79 -0
- package/dist/checks/specialized/image-data-integrity.js.map +1 -0
- package/dist/checks/specialized/image-health.d.ts +14 -0
- package/dist/checks/specialized/image-health.d.ts.map +1 -0
- package/dist/checks/specialized/image-health.js +122 -0
- package/dist/checks/specialized/image-health.js.map +1 -0
- package/dist/checks/specialized/image-metadata-validation.d.ts +14 -0
- package/dist/checks/specialized/image-metadata-validation.d.ts.map +1 -0
- package/dist/checks/specialized/image-metadata-validation.js +95 -0
- package/dist/checks/specialized/image-metadata-validation.js.map +1 -0
- package/dist/checks/specialized/image-optimization.d.ts +16 -0
- package/dist/checks/specialized/image-optimization.d.ts.map +1 -0
- package/dist/checks/specialized/image-optimization.js +86 -0
- package/dist/checks/specialized/image-optimization.js.map +1 -0
- package/dist/checks/specialized/invalid-module-imports.d.ts +24 -0
- package/dist/checks/specialized/invalid-module-imports.d.ts.map +1 -0
- package/dist/checks/specialized/invalid-module-imports.js +209 -0
- package/dist/checks/specialized/invalid-module-imports.js.map +1 -0
- package/dist/checks/specialized/lint-validation.d.ts +26 -0
- package/dist/checks/specialized/lint-validation.d.ts.map +1 -0
- package/dist/checks/specialized/lint-validation.js +193 -0
- package/dist/checks/specialized/lint-validation.js.map +1 -0
- package/dist/checks/specialized/listing-workflow.d.ts +19 -0
- package/dist/checks/specialized/listing-workflow.d.ts.map +1 -0
- package/dist/checks/specialized/listing-workflow.js +89 -0
- package/dist/checks/specialized/listing-workflow.js.map +1 -0
- package/dist/checks/specialized/mui-imports-validation.d.ts +18 -0
- package/dist/checks/specialized/mui-imports-validation.d.ts.map +1 -0
- package/dist/checks/specialized/mui-imports-validation.js +134 -0
- package/dist/checks/specialized/mui-imports-validation.js.map +1 -0
- package/dist/checks/specialized/nextauth-v5-compliance.d.ts +16 -0
- package/dist/checks/specialized/nextauth-v5-compliance.d.ts.map +1 -0
- package/dist/checks/specialized/nextauth-v5-compliance.js +164 -0
- package/dist/checks/specialized/nextauth-v5-compliance.js.map +1 -0
- package/dist/checks/specialized/nextjs-params-check.d.ts +14 -0
- package/dist/checks/specialized/nextjs-params-check.d.ts.map +1 -0
- package/dist/checks/specialized/nextjs-params-check.js +140 -0
- package/dist/checks/specialized/nextjs-params-check.js.map +1 -0
- package/dist/checks/specialized/no-legacy-catalog-aliases-validation.d.ts +16 -0
- package/dist/checks/specialized/no-legacy-catalog-aliases-validation.d.ts.map +1 -0
- package/dist/checks/specialized/no-legacy-catalog-aliases-validation.js +36 -0
- package/dist/checks/specialized/no-legacy-catalog-aliases-validation.js.map +1 -0
- package/dist/checks/specialized/no-wata-cardgraded-validation.d.ts +22 -0
- package/dist/checks/specialized/no-wata-cardgraded-validation.d.ts.map +1 -0
- package/dist/checks/specialized/no-wata-cardgraded-validation.js +97 -0
- package/dist/checks/specialized/no-wata-cardgraded-validation.js.map +1 -0
- package/dist/checks/specialized/parameter-consistency-check.d.ts +20 -0
- package/dist/checks/specialized/parameter-consistency-check.d.ts.map +1 -0
- package/dist/checks/specialized/parameter-consistency-check.js +115 -0
- package/dist/checks/specialized/parameter-consistency-check.js.map +1 -0
- package/dist/checks/specialized/prisma-field-names-validation.d.ts +15 -0
- package/dist/checks/specialized/prisma-field-names-validation.d.ts.map +1 -0
- package/dist/checks/specialized/prisma-field-names-validation.js +35 -0
- package/dist/checks/specialized/prisma-field-names-validation.js.map +1 -0
- package/dist/checks/specialized/prisma-null-syntax.d.ts +34 -0
- package/dist/checks/specialized/prisma-null-syntax.d.ts.map +1 -0
- package/dist/checks/specialized/prisma-null-syntax.js +330 -0
- package/dist/checks/specialized/prisma-null-syntax.js.map +1 -0
- package/dist/checks/specialized/prisma-query-validation.d.ts +15 -0
- package/dist/checks/specialized/prisma-query-validation.d.ts.map +1 -0
- package/dist/checks/specialized/prisma-query-validation.js +35 -0
- package/dist/checks/specialized/prisma-query-validation.js.map +1 -0
- package/dist/checks/specialized/product-type-validation.d.ts +17 -0
- package/dist/checks/specialized/product-type-validation.d.ts.map +1 -0
- package/dist/checks/specialized/product-type-validation.js +129 -0
- package/dist/checks/specialized/product-type-validation.js.map +1 -0
- package/dist/checks/specialized/responsive-image-validation.d.ts +14 -0
- package/dist/checks/specialized/responsive-image-validation.d.ts.map +1 -0
- package/dist/checks/specialized/responsive-image-validation.js +101 -0
- package/dist/checks/specialized/responsive-image-validation.js.map +1 -0
- package/dist/checks/specialized/root-cleanliness.d.ts +21 -0
- package/dist/checks/specialized/root-cleanliness.d.ts.map +1 -0
- package/dist/checks/specialized/root-cleanliness.js +251 -0
- package/dist/checks/specialized/root-cleanliness.js.map +1 -0
- package/dist/checks/specialized/rotation-detection-validation.d.ts +16 -0
- package/dist/checks/specialized/rotation-detection-validation.d.ts.map +1 -0
- package/dist/checks/specialized/rotation-detection-validation.js +113 -0
- package/dist/checks/specialized/rotation-detection-validation.js.map +1 -0
- package/dist/checks/specialized/script-organization.d.ts +17 -0
- package/dist/checks/specialized/script-organization.d.ts.map +1 -0
- package/dist/checks/specialized/script-organization.js +487 -0
- package/dist/checks/specialized/script-organization.js.map +1 -0
- package/dist/checks/specialized/shared-components-migration.d.ts +137 -0
- package/dist/checks/specialized/shared-components-migration.d.ts.map +1 -0
- package/dist/checks/specialized/shared-components-migration.js +1288 -0
- package/dist/checks/specialized/shared-components-migration.js.map +1 -0
- package/dist/checks/specialized/store-specialties-normalization.d.ts +10 -0
- package/dist/checks/specialized/store-specialties-normalization.d.ts.map +1 -0
- package/dist/checks/specialized/store-specialties-normalization.js +126 -0
- package/dist/checks/specialized/store-specialties-normalization.js.map +1 -0
- package/dist/checks/specialized/two-stage-trim-validation.d.ts +16 -0
- package/dist/checks/specialized/two-stage-trim-validation.d.ts.map +1 -0
- package/dist/checks/specialized/two-stage-trim-validation.js +115 -0
- package/dist/checks/specialized/two-stage-trim-validation.js.map +1 -0
- package/dist/checks/specialized/underscore-variable-audit.d.ts +26 -0
- package/dist/checks/specialized/underscore-variable-audit.d.ts.map +1 -0
- package/dist/checks/specialized/underscore-variable-audit.js +219 -0
- package/dist/checks/specialized/underscore-variable-audit.js.map +1 -0
- package/dist/checks/specialized/unified-badge-consistency.d.ts +16 -0
- package/dist/checks/specialized/unified-badge-consistency.d.ts.map +1 -0
- package/dist/checks/specialized/unified-badge-consistency.js +284 -0
- package/dist/checks/specialized/unified-badge-consistency.js.map +1 -0
- package/dist/checks/specialized/validate-integration-enums.d.ts +15 -0
- package/dist/checks/specialized/validate-integration-enums.d.ts.map +1 -0
- package/dist/checks/specialized/validate-integration-enums.js +131 -0
- package/dist/checks/specialized/validate-integration-enums.js.map +1 -0
- package/dist/checks/testing/action-regression.d.ts +23 -0
- package/dist/checks/testing/action-regression.d.ts.map +1 -0
- package/dist/checks/testing/action-regression.js +192 -0
- package/dist/checks/testing/action-regression.js.map +1 -0
- package/dist/checks/testing/critical-api-coverage.d.ts +21 -0
- package/dist/checks/testing/critical-api-coverage.d.ts.map +1 -0
- package/dist/checks/testing/critical-api-coverage.js +158 -0
- package/dist/checks/testing/critical-api-coverage.js.map +1 -0
- package/dist/checks/testing/data-entry-regression-required.d.ts +24 -0
- package/dist/checks/testing/data-entry-regression-required.d.ts.map +1 -0
- package/dist/checks/testing/data-entry-regression-required.js +378 -0
- package/dist/checks/testing/data-entry-regression-required.js.map +1 -0
- package/dist/checks/testing/e2e-best-practices.d.ts +24 -0
- package/dist/checks/testing/e2e-best-practices.d.ts.map +1 -0
- package/dist/checks/testing/e2e-best-practices.js +791 -0
- package/dist/checks/testing/e2e-best-practices.js.map +1 -0
- package/dist/checks/testing/e2e-flake-patterns.d.ts +26 -0
- package/dist/checks/testing/e2e-flake-patterns.d.ts.map +1 -0
- package/dist/checks/testing/e2e-flake-patterns.js +305 -0
- package/dist/checks/testing/e2e-flake-patterns.js.map +1 -0
- package/dist/checks/testing/e2e-redundant-visibility-checks.d.ts +25 -0
- package/dist/checks/testing/e2e-redundant-visibility-checks.d.ts.map +1 -0
- package/dist/checks/testing/e2e-redundant-visibility-checks.js +613 -0
- package/dist/checks/testing/e2e-redundant-visibility-checks.js.map +1 -0
- package/dist/checks/testing/e2e-slow-tests.d.ts +9 -0
- package/dist/checks/testing/e2e-slow-tests.d.ts.map +1 -0
- package/dist/checks/testing/e2e-slow-tests.js +142 -0
- package/dist/checks/testing/e2e-slow-tests.js.map +1 -0
- package/dist/checks/testing/e2e-timeouts.d.ts +9 -0
- package/dist/checks/testing/e2e-timeouts.d.ts.map +1 -0
- package/dist/checks/testing/e2e-timeouts.js +82 -0
- package/dist/checks/testing/e2e-timeouts.js.map +1 -0
- package/dist/checks/testing/integration-e2e-depth.d.ts +20 -0
- package/dist/checks/testing/integration-e2e-depth.d.ts.map +1 -0
- package/dist/checks/testing/integration-e2e-depth.js +575 -0
- package/dist/checks/testing/integration-e2e-depth.js.map +1 -0
- package/dist/checks/testing/playwright-feature-coverage-gaps.d.ts +31 -0
- package/dist/checks/testing/playwright-feature-coverage-gaps.d.ts.map +1 -0
- package/dist/checks/testing/playwright-feature-coverage-gaps.js +1582 -0
- package/dist/checks/testing/playwright-feature-coverage-gaps.js.map +1 -0
- package/dist/checks/testing/playwright-mock-inventory.d.ts +24 -0
- package/dist/checks/testing/playwright-mock-inventory.d.ts.map +1 -0
- package/dist/checks/testing/playwright-mock-inventory.js +380 -0
- package/dist/checks/testing/playwright-mock-inventory.js.map +1 -0
- package/dist/checks/testing/test-coverage-threshold.d.ts +25 -0
- package/dist/checks/testing/test-coverage-threshold.d.ts.map +1 -0
- package/dist/checks/testing/test-coverage-threshold.js +166 -0
- package/dist/checks/testing/test-coverage-threshold.js.map +1 -0
- package/dist/checks/testing/test-flakiness-score.d.ts +27 -0
- package/dist/checks/testing/test-flakiness-score.d.ts.map +1 -0
- package/dist/checks/testing/test-flakiness-score.js +358 -0
- package/dist/checks/testing/test-flakiness-score.js.map +1 -0
- package/dist/checks/testing/test-patterns.d.ts +16 -0
- package/dist/checks/testing/test-patterns.d.ts.map +1 -0
- package/dist/checks/testing/test-patterns.js +156 -0
- package/dist/checks/testing/test-patterns.js.map +1 -0
- package/dist/checks/workflows/a-plus-rating-validation.d.ts +42 -0
- package/dist/checks/workflows/a-plus-rating-validation.d.ts.map +1 -0
- package/dist/checks/workflows/a-plus-rating-validation.js +527 -0
- package/dist/checks/workflows/a-plus-rating-validation.js.map +1 -0
- package/dist/checks/workflows/affected.d.ts +14 -0
- package/dist/checks/workflows/affected.d.ts.map +1 -0
- package/dist/checks/workflows/affected.js +126 -0
- package/dist/checks/workflows/affected.js.map +1 -0
- package/dist/checks/workflows/ai.d.ts +6 -0
- package/dist/checks/workflows/ai.d.ts.map +1 -0
- package/dist/checks/workflows/ai.js +42 -0
- package/dist/checks/workflows/ai.js.map +1 -0
- package/dist/checks/workflows/all.d.ts +31 -0
- package/dist/checks/workflows/all.d.ts.map +1 -0
- package/dist/checks/workflows/all.js +2688 -0
- package/dist/checks/workflows/all.js.map +1 -0
- package/dist/checks/workflows/commit.d.ts +19 -0
- package/dist/checks/workflows/commit.d.ts.map +1 -0
- package/dist/checks/workflows/commit.js +207 -0
- package/dist/checks/workflows/commit.js.map +1 -0
- package/dist/checks/workflows/critical.d.ts +9 -0
- package/dist/checks/workflows/critical.d.ts.map +1 -0
- package/dist/checks/workflows/critical.js +213 -0
- package/dist/checks/workflows/critical.js.map +1 -0
- package/dist/checks/workflows/database-id-validation.d.ts +9 -0
- package/dist/checks/workflows/database-id-validation.d.ts.map +1 -0
- package/dist/checks/workflows/database-id-validation.js +13 -0
- package/dist/checks/workflows/database-id-validation.js.map +1 -0
- package/dist/checks/workflows/deploy.d.ts +20 -0
- package/dist/checks/workflows/deploy.d.ts.map +1 -0
- package/dist/checks/workflows/deploy.js +107 -0
- package/dist/checks/workflows/deploy.js.map +1 -0
- package/dist/checks/workflows/deployment-readiness.d.ts +12 -0
- package/dist/checks/workflows/deployment-readiness.d.ts.map +1 -0
- package/dist/checks/workflows/deployment-readiness.js +403 -0
- package/dist/checks/workflows/deployment-readiness.js.map +1 -0
- package/dist/checks/workflows/dev.d.ts +19 -0
- package/dist/checks/workflows/dev.d.ts.map +1 -0
- package/dist/checks/workflows/dev.js +88 -0
- package/dist/checks/workflows/dev.js.map +1 -0
- package/dist/checks/workflows/development.d.ts +9 -0
- package/dist/checks/workflows/development.d.ts.map +1 -0
- package/dist/checks/workflows/development.js +65 -0
- package/dist/checks/workflows/development.js.map +1 -0
- package/dist/checks/workflows/enterprise.d.ts +10 -0
- package/dist/checks/workflows/enterprise.d.ts.map +1 -0
- package/dist/checks/workflows/enterprise.js +359 -0
- package/dist/checks/workflows/enterprise.js.map +1 -0
- package/dist/checks/workflows/images.d.ts +6 -0
- package/dist/checks/workflows/images.d.ts.map +1 -0
- package/dist/checks/workflows/images.js +58 -0
- package/dist/checks/workflows/images.js.map +1 -0
- package/dist/checks/workflows/naming.d.ts +19 -0
- package/dist/checks/workflows/naming.d.ts.map +1 -0
- package/dist/checks/workflows/naming.js +42 -0
- package/dist/checks/workflows/naming.js.map +1 -0
- package/dist/checks/workflows/performance.d.ts +8 -0
- package/dist/checks/workflows/performance.d.ts.map +1 -0
- package/dist/checks/workflows/performance.js +77 -0
- package/dist/checks/workflows/performance.js.map +1 -0
- package/dist/checks/workflows/pre-deploy.d.ts +6 -0
- package/dist/checks/workflows/pre-deploy.d.ts.map +1 -0
- package/dist/checks/workflows/pre-deploy.js +41 -0
- package/dist/checks/workflows/pre-deploy.js.map +1 -0
- package/dist/checks/workflows/security.d.ts +8 -0
- package/dist/checks/workflows/security.d.ts.map +1 -0
- package/dist/checks/workflows/security.js +71 -0
- package/dist/checks/workflows/security.js.map +1 -0
- package/dist/checks/workflows/supercatch.d.ts +8 -0
- package/dist/checks/workflows/supercatch.d.ts.map +1 -0
- package/dist/checks/workflows/supercatch.js +127 -0
- package/dist/checks/workflows/supercatch.js.map +1 -0
- package/dist/checks/workflows/ui-quality.d.ts +9 -0
- package/dist/checks/workflows/ui-quality.d.ts.map +1 -0
- package/dist/checks/workflows/ui-quality.js +264 -0
- package/dist/checks/workflows/ui-quality.js.map +1 -0
- package/dist/checks/workflows/ui-uniformity.d.ts +18 -0
- package/dist/checks/workflows/ui-uniformity.d.ts.map +1 -0
- package/dist/checks/workflows/ui-uniformity.js +265 -0
- package/dist/checks/workflows/ui-uniformity.js.map +1 -0
- package/dist/checks/workflows/vercel.d.ts +16 -0
- package/dist/checks/workflows/vercel.d.ts.map +1 -0
- package/dist/checks/workflows/vercel.js +173 -0
- package/dist/checks/workflows/vercel.js.map +1 -0
- package/dist/utils/validation-helpers.d.ts +43 -0
- package/dist/utils/validation-helpers.d.ts.map +1 -0
- package/dist/utils/validation-helpers.js +370 -0
- package/dist/utils/validation-helpers.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,935 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* UI Standards Enforcement Preflight
|
|
5
|
+
*
|
|
6
|
+
* Comprehensive UI consistency checks for:
|
|
7
|
+
* 1. Card Elevation/Shadow Consistency
|
|
8
|
+
* 2. Typography Hierarchy Consistency
|
|
9
|
+
* 3. Button Size Consistency
|
|
10
|
+
* 4. Icon Size Consistency
|
|
11
|
+
* 5. Alert/Status Message Spacing
|
|
12
|
+
* 6. Form Field Density
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* pnpm preflight:ui-standards # All checks
|
|
16
|
+
* pnpm preflight:ui-standards shadows # Card shadows only
|
|
17
|
+
* pnpm preflight:ui-standards typography # Typography hierarchy only
|
|
18
|
+
* pnpm preflight:ui-standards buttons # Button sizes only
|
|
19
|
+
* pnpm preflight:ui-standards icons # Icon sizes only
|
|
20
|
+
* pnpm preflight:ui-standards alerts # Alert spacing only
|
|
21
|
+
* pnpm preflight:ui-standards forms # Form density only
|
|
22
|
+
*/
|
|
23
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
26
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
27
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
28
|
+
}
|
|
29
|
+
Object.defineProperty(o, k2, desc);
|
|
30
|
+
}) : (function(o, m, k, k2) {
|
|
31
|
+
if (k2 === undefined) k2 = k;
|
|
32
|
+
o[k2] = m[k];
|
|
33
|
+
}));
|
|
34
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
35
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
36
|
+
}) : function(o, v) {
|
|
37
|
+
o["default"] = v;
|
|
38
|
+
});
|
|
39
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
40
|
+
var ownKeys = function(o) {
|
|
41
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
42
|
+
var ar = [];
|
|
43
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
44
|
+
return ar;
|
|
45
|
+
};
|
|
46
|
+
return ownKeys(o);
|
|
47
|
+
};
|
|
48
|
+
return function (mod) {
|
|
49
|
+
if (mod && mod.__esModule) return mod;
|
|
50
|
+
var result = {};
|
|
51
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
52
|
+
__setModuleDefault(result, mod);
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
56
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
+
exports.UIStandardsEnforcementModule = void 0;
|
|
58
|
+
const fs = __importStar(require("fs"));
|
|
59
|
+
const file_cache_1 = require("../../shared/file-cache");
|
|
60
|
+
const path = __importStar(require("path"));
|
|
61
|
+
const console_chars_1 = require("../../utils/console-chars");
|
|
62
|
+
const universal_progress_reporter_1 = require("../system/universal-progress-reporter");
|
|
63
|
+
const concurrency_config_1 = require("../../shared/concurrency-config");
|
|
64
|
+
const EXCLUDED_PATTERNS = [
|
|
65
|
+
"**/node_modules/**",
|
|
66
|
+
"**/.next/**",
|
|
67
|
+
"**/dist/**",
|
|
68
|
+
"**/build/**",
|
|
69
|
+
"**/*.test.tsx",
|
|
70
|
+
"**/*.spec.tsx",
|
|
71
|
+
"**/*.stories.tsx",
|
|
72
|
+
"**/stories/**",
|
|
73
|
+
];
|
|
74
|
+
// STANDARDS DEFINITIONS
|
|
75
|
+
/**
|
|
76
|
+
* Card Shadow Standards:
|
|
77
|
+
* - Primary/standalone cards: --shadow-md
|
|
78
|
+
* - Nested/secondary cards: --shadow-sm
|
|
79
|
+
* - Elevated/floating cards: --shadow-lg
|
|
80
|
+
* - No shadow: Only for flat/borderless cards
|
|
81
|
+
*/
|
|
82
|
+
const CARD_SHADOW_STANDARDS = {
|
|
83
|
+
primary: ["shadow-md", "shadow-[var(--shadow-md)]", "elevation={2}"],
|
|
84
|
+
nested: ["shadow-sm", "shadow-[var(--shadow-sm)]", "elevation={1}"],
|
|
85
|
+
elevated: ["shadow-lg", "shadow-[var(--shadow-lg)]", "elevation={3}"],
|
|
86
|
+
flat: ["shadow-none", "elevation={0}"],
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Typography Hierarchy Standards:
|
|
90
|
+
* - Page title: h4
|
|
91
|
+
* - Section header: h6
|
|
92
|
+
* - Subsection: subtitle1
|
|
93
|
+
* - Card title: h6 or subtitle1
|
|
94
|
+
*/
|
|
95
|
+
const TYPOGRAPHY_STANDARDS = {
|
|
96
|
+
pageTitle: ["h4"],
|
|
97
|
+
sectionHeader: ["h6"],
|
|
98
|
+
subsection: ["subtitle1"],
|
|
99
|
+
cardTitle: ["h6", "subtitle1"],
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Button Size Standards:
|
|
103
|
+
* - Primary CTA: lg
|
|
104
|
+
* - Secondary actions: default (no size prop)
|
|
105
|
+
* - Inline/compact actions: sm
|
|
106
|
+
* - Icon-only buttons: sm or default
|
|
107
|
+
*/
|
|
108
|
+
const BUTTON_SIZE_STANDARDS = {
|
|
109
|
+
primaryCta: ["lg"],
|
|
110
|
+
secondary: [undefined, "default"],
|
|
111
|
+
inline: ["sm"],
|
|
112
|
+
iconOnly: ["sm", undefined],
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Icon Size Standards:
|
|
116
|
+
* - Inline text icons: 16px (w-4 h-4)
|
|
117
|
+
* - Button icons: 20px (w-5 h-5)
|
|
118
|
+
* - Card/section icons: 24px (w-6 h-6)
|
|
119
|
+
* - Hero/feature icons: 48px (w-12 h-12)
|
|
120
|
+
*/
|
|
121
|
+
const ICON_SIZE_STANDARDS = {
|
|
122
|
+
inline: ["16", "w-4", "h-4", "size={16}"],
|
|
123
|
+
button: ["20", "w-5", "h-5", "size={20}"],
|
|
124
|
+
card: ["24", "w-6", "h-6", "size={24}"],
|
|
125
|
+
hero: ["48", "w-12", "h-12", "size={48}"],
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Alert Spacing Standards:
|
|
129
|
+
* - After alert: mb-4 (16px)
|
|
130
|
+
* - Stacked alerts: gap-3 (12px)
|
|
131
|
+
*/
|
|
132
|
+
const ALERT_SPACING_STANDARDS = {
|
|
133
|
+
afterAlert: ["mb-4", 'marginBottom: "var(--spacing-4)"'],
|
|
134
|
+
stackedGap: ["gap-3", 'gap: "var(--spacing-3)"'],
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Form Field Density Standards:
|
|
138
|
+
* - Standard forms: spacing-3 or gap-3
|
|
139
|
+
* - Compact forms: spacing-2 or gap-2
|
|
140
|
+
* - Dense tables: spacing-1 or gap-1
|
|
141
|
+
*/
|
|
142
|
+
const FORM_DENSITY_STANDARDS = {
|
|
143
|
+
standard: ["spacing={3}", "gap-3", 'gap: "var(--spacing-3)"'],
|
|
144
|
+
compact: ["spacing={2}", "gap-2", 'gap: "var(--spacing-2)"'],
|
|
145
|
+
dense: ["spacing={1}", "gap-1", 'gap: "var(--spacing-1)"'],
|
|
146
|
+
};
|
|
147
|
+
// Get concurrency from shared config (respects PREFLIGHT_CONCURRENCY env var)
|
|
148
|
+
const concurrencyConfig = (0, concurrency_config_1.getConcurrencyConfig)();
|
|
149
|
+
class UIStandardsEnforcementModule {
|
|
150
|
+
verbose;
|
|
151
|
+
parallel = false;
|
|
152
|
+
constructor(options = {}) {
|
|
153
|
+
this.verbose = options.verbose || false;
|
|
154
|
+
this.parallel = options.parallel || concurrencyConfig.parallel;
|
|
155
|
+
}
|
|
156
|
+
async getFiles() {
|
|
157
|
+
return await file_cache_1.fileCache.getAllTsxJsx();
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* 1. Card Elevation/Shadow Consistency
|
|
161
|
+
* Detects inconsistent shadow usage across Cards
|
|
162
|
+
*/
|
|
163
|
+
async checkCardShadowConsistency() {
|
|
164
|
+
const startTime = Date.now();
|
|
165
|
+
const issues = [];
|
|
166
|
+
const files = await this.getFiles();
|
|
167
|
+
const shadowUsage = new Map();
|
|
168
|
+
for (const file of files) {
|
|
169
|
+
const content = fs.readFileSync(file, "utf8");
|
|
170
|
+
const lines = content.split("\n");
|
|
171
|
+
lines.forEach((line, index) => {
|
|
172
|
+
if (/<Card\b/.test(line)) {
|
|
173
|
+
const cardBlock = lines.slice(index, Math.min(index + 15, lines.length)).join("\n");
|
|
174
|
+
// Detect shadow patterns
|
|
175
|
+
const shadowPatterns = [
|
|
176
|
+
{ pattern: /shadow-\[var\(--shadow-sm\)\]/, name: "--shadow-sm" },
|
|
177
|
+
{ pattern: /shadow-\[var\(--shadow-md\)\]/, name: "--shadow-md" },
|
|
178
|
+
{ pattern: /shadow-\[var\(--shadow-lg\)\]/, name: "--shadow-lg" },
|
|
179
|
+
{ pattern: /shadow-sm(?!\[)/, name: "shadow-sm" },
|
|
180
|
+
{ pattern: /shadow-md(?!\[)/, name: "shadow-md" },
|
|
181
|
+
{ pattern: /shadow-lg(?!\[)/, name: "shadow-lg" },
|
|
182
|
+
{ pattern: /shadow-none/, name: "shadow-none" },
|
|
183
|
+
{ pattern: /elevation=\{1\}/, name: "elevation={1}" },
|
|
184
|
+
{ pattern: /elevation=\{2\}/, name: "elevation={2}" },
|
|
185
|
+
{ pattern: /elevation=\{3\}/, name: "elevation={3}" },
|
|
186
|
+
{ pattern: /elevation=\{0\}/, name: "elevation={0}" },
|
|
187
|
+
];
|
|
188
|
+
let foundShadow = false;
|
|
189
|
+
for (const { pattern, name } of shadowPatterns) {
|
|
190
|
+
if (pattern.test(cardBlock)) {
|
|
191
|
+
foundShadow = true;
|
|
192
|
+
const entry = shadowUsage.get(name) || { count: 0, files: [] };
|
|
193
|
+
entry.count++;
|
|
194
|
+
if (!entry.files.includes(file))
|
|
195
|
+
entry.files.push(file);
|
|
196
|
+
shadowUsage.set(name, entry);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
// Card without any shadow specification
|
|
200
|
+
// Exclude: test files, filter cards, nested cards, intentionally flat cards
|
|
201
|
+
if (!foundShadow && !cardBlock.includes("variant=")) {
|
|
202
|
+
const contextBefore = lines.slice(Math.max(0, index - 10), index).join("\n");
|
|
203
|
+
const isTestFile = /test|spec|stories/i.test(file);
|
|
204
|
+
const isFilterCard = /Filter|filter|Search|search|Sidebar|sidebar/i.test(file + cardBlock);
|
|
205
|
+
const isNestedCard = /<Card/.test(contextBefore);
|
|
206
|
+
const isListItem = /List|Row|Item|map\(|\.map/i.test(contextBefore);
|
|
207
|
+
const isWizardStep = /Wizard|Step|step/i.test(file);
|
|
208
|
+
const isEmptyState = /Empty|empty|placeholder/i.test(cardBlock);
|
|
209
|
+
if (!isTestFile &&
|
|
210
|
+
!isFilterCard &&
|
|
211
|
+
!isNestedCard &&
|
|
212
|
+
!isListItem &&
|
|
213
|
+
!isWizardStep &&
|
|
214
|
+
!isEmptyState) {
|
|
215
|
+
issues.push({
|
|
216
|
+
file,
|
|
217
|
+
line: index + 1,
|
|
218
|
+
type: "card-no-shadow",
|
|
219
|
+
severity: "info",
|
|
220
|
+
message: "Card without explicit shadow/elevation",
|
|
221
|
+
suggestion: "Add shadow-[var(--shadow-md)] for primary cards or shadow-[var(--shadow-sm)] for nested cards",
|
|
222
|
+
snippet: line.trim().substring(0, 80),
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
// Report inconsistent shadow usage
|
|
230
|
+
if (shadowUsage.size > 3) {
|
|
231
|
+
const sorted = [...shadowUsage.entries()].sort((a, b) => b[1].count - a[1].count);
|
|
232
|
+
issues.push({
|
|
233
|
+
file: "codebase-wide",
|
|
234
|
+
line: 0,
|
|
235
|
+
type: "card-shadow-inconsistency",
|
|
236
|
+
severity: "warning",
|
|
237
|
+
message: `Cards use ${shadowUsage.size} different shadow patterns: ${sorted.map(([s, d]) => `${s}(${d.count})`).join(", ")}`,
|
|
238
|
+
suggestion: "Standardize: --shadow-md for primary, --shadow-sm for nested, --shadow-lg for elevated",
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
return {
|
|
242
|
+
name: "Card Shadow Consistency",
|
|
243
|
+
passed: issues.filter((i) => i.severity === "error").length === 0,
|
|
244
|
+
blocking: true,
|
|
245
|
+
issues,
|
|
246
|
+
duration: Date.now() - startTime,
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* 2. Typography Hierarchy Consistency
|
|
251
|
+
* Detects inconsistent heading usage
|
|
252
|
+
*/
|
|
253
|
+
async checkTypographyHierarchy() {
|
|
254
|
+
const startTime = Date.now();
|
|
255
|
+
const issues = [];
|
|
256
|
+
const files = await this.getFiles();
|
|
257
|
+
const pageTitleVariants = new Map();
|
|
258
|
+
const sectionHeaderVariants = new Map();
|
|
259
|
+
for (const file of files) {
|
|
260
|
+
const content = fs.readFileSync(file, "utf8");
|
|
261
|
+
const lines = content.split("\n");
|
|
262
|
+
// Detect if this is a page file (contains page title)
|
|
263
|
+
const isPageFile = /page\.tsx$|Client\.tsx$/.test(file);
|
|
264
|
+
const hasUnifiedHeader = content.includes("UnifiedHeader");
|
|
265
|
+
lines.forEach((line, index) => {
|
|
266
|
+
// Check Typography variant usage
|
|
267
|
+
if (/<Typography\b/.test(line)) {
|
|
268
|
+
const typographyBlock = lines.slice(index, Math.min(index + 5, lines.length)).join("\n");
|
|
269
|
+
const variantMatch = typographyBlock.match(/variant=["']([^"']+)["']/);
|
|
270
|
+
if (variantMatch) {
|
|
271
|
+
const variant = variantMatch[1];
|
|
272
|
+
// Detect page title patterns (first h* in page files)
|
|
273
|
+
if (isPageFile && !hasUnifiedHeader) {
|
|
274
|
+
if (["h1", "h2", "h3", "h4", "h5"].includes(variant)) {
|
|
275
|
+
const contextBefore = lines.slice(Math.max(0, index - 10), index).join("\n");
|
|
276
|
+
const isFirstHeading = !/<Typography[^>]*variant=["']h[1-5]/.test(contextBefore);
|
|
277
|
+
// Exclude admin metric pages, registration pages, and stat cards
|
|
278
|
+
const isAdminMetricPage = /admin.*metric|rotation-metric/i.test(file);
|
|
279
|
+
const isRegistrationPage = /register|signup|sign-up/i.test(file);
|
|
280
|
+
const isStatCard = /CardContent|stat|metric/i.test(contextBefore);
|
|
281
|
+
if (isFirstHeading && !isAdminMetricPage && !isRegistrationPage && !isStatCard) {
|
|
282
|
+
pageTitleVariants.set(variant, (pageTitleVariants.get(variant) || 0) + 1);
|
|
283
|
+
if (variant !== "h4") {
|
|
284
|
+
issues.push({
|
|
285
|
+
file,
|
|
286
|
+
line: index + 1,
|
|
287
|
+
type: "page-title-variant",
|
|
288
|
+
severity: "warning",
|
|
289
|
+
message: `Page title uses variant="${variant}" instead of "h4"`,
|
|
290
|
+
suggestion: 'Use variant="h4" for page titles (or UnifiedHeader)',
|
|
291
|
+
snippet: line.trim().substring(0, 80),
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
// Detect section headers (h5, h6 after page title)
|
|
298
|
+
if (["h5", "h6", "subtitle1"].includes(variant)) {
|
|
299
|
+
sectionHeaderVariants.set(variant, (sectionHeaderVariants.get(variant) || 0) + 1);
|
|
300
|
+
}
|
|
301
|
+
// Flag h1, h2, h3 usage (should be rare)
|
|
302
|
+
// Exclude: Hero/Landing pages, stat cards (large numbers), price displays
|
|
303
|
+
if (["h1", "h2", "h3"].includes(variant) &&
|
|
304
|
+
!file.includes("Hero") &&
|
|
305
|
+
!file.includes("Landing")) {
|
|
306
|
+
const contextBlock = lines
|
|
307
|
+
.slice(Math.max(0, index - 5), Math.min(index + 5, lines.length))
|
|
308
|
+
.join("\n");
|
|
309
|
+
const isStatCard = /CardContent|stat|metric|total|count|price|amount|\d+[%$€£]/i.test(contextBlock);
|
|
310
|
+
const isPriceDisplay = /price|Price|cost|Cost|amount|Amount/i.test(contextBlock);
|
|
311
|
+
if (!isStatCard && !isPriceDisplay) {
|
|
312
|
+
issues.push({
|
|
313
|
+
file,
|
|
314
|
+
line: index + 1,
|
|
315
|
+
type: "large-heading-usage",
|
|
316
|
+
severity: "info",
|
|
317
|
+
message: `Large heading variant="${variant}" used outside hero/landing`,
|
|
318
|
+
suggestion: "Use h4 for page titles, h6 for sections, subtitle1 for subsections",
|
|
319
|
+
snippet: line.trim().substring(0, 80),
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
// Report inconsistent section header usage
|
|
328
|
+
if (sectionHeaderVariants.size > 2) {
|
|
329
|
+
const sorted = [...sectionHeaderVariants.entries()].sort((a, b) => b[1] - a[1]);
|
|
330
|
+
issues.push({
|
|
331
|
+
file: "codebase-wide",
|
|
332
|
+
line: 0,
|
|
333
|
+
type: "section-header-inconsistency",
|
|
334
|
+
severity: "info",
|
|
335
|
+
message: `Section headers use ${sectionHeaderVariants.size} variants: ${sorted.map(([v, c]) => `${v}(${c})`).join(", ")}`,
|
|
336
|
+
suggestion: "Standardize: h6 for section headers, subtitle1 for subsections",
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
return {
|
|
340
|
+
name: "Typography Hierarchy",
|
|
341
|
+
passed: issues.filter((i) => i.severity === "error").length === 0,
|
|
342
|
+
blocking: true,
|
|
343
|
+
issues,
|
|
344
|
+
duration: Date.now() - startTime,
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* 3. Button Size Consistency
|
|
349
|
+
* Detects inconsistent button sizing
|
|
350
|
+
*/
|
|
351
|
+
async checkButtonSizeConsistency() {
|
|
352
|
+
const startTime = Date.now();
|
|
353
|
+
const issues = [];
|
|
354
|
+
const files = await this.getFiles();
|
|
355
|
+
const buttonSizes = new Map();
|
|
356
|
+
const ctaButtonSizes = new Map();
|
|
357
|
+
for (const file of files) {
|
|
358
|
+
const content = fs.readFileSync(file, "utf8");
|
|
359
|
+
const lines = content.split("\n");
|
|
360
|
+
lines.forEach((line, index) => {
|
|
361
|
+
if (/<Button\b/.test(line)) {
|
|
362
|
+
const buttonBlock = lines.slice(index, Math.min(index + 10, lines.length)).join("\n");
|
|
363
|
+
const contextBefore = lines.slice(Math.max(0, index - 10), index).join("\n");
|
|
364
|
+
// Extract size
|
|
365
|
+
const sizeMatch = buttonBlock.match(/size=["']([^"']+)["']/);
|
|
366
|
+
const size = sizeMatch ? sizeMatch[1] : "default";
|
|
367
|
+
buttonSizes.set(size, (buttonSizes.get(size) || 0) + 1);
|
|
368
|
+
// Detect CTA buttons (primary variant with action text)
|
|
369
|
+
const isPrimary = /variant=["'](?:default|primary)["']/.test(buttonBlock) ||
|
|
370
|
+
!buttonBlock.includes("variant=");
|
|
371
|
+
const isCtaText = /(?:Submit|Save|Create|Add|Continue|Get Started|Sign Up|Buy|Purchase|Checkout)/i.test(buttonBlock);
|
|
372
|
+
// Exclude compact contexts where small buttons are appropriate
|
|
373
|
+
const isCompactContext = /Compact|Row|Table|List|Drawer|Popover|Menu|Toolbar|inline|dense/i.test(file + contextBefore);
|
|
374
|
+
const isInCard = /<Card/.test(contextBefore) && !/<CardActions/.test(contextBefore);
|
|
375
|
+
const isSecondaryAction = /variant=["'](?:outline|ghost|secondary)["']/.test(buttonBlock);
|
|
376
|
+
if (isPrimary && isCtaText && !isCompactContext && !isSecondaryAction) {
|
|
377
|
+
ctaButtonSizes.set(size, (ctaButtonSizes.get(size) || 0) + 1);
|
|
378
|
+
// CTA buttons should be lg (only in non-compact contexts)
|
|
379
|
+
if (size !== "lg") {
|
|
380
|
+
issues.push({
|
|
381
|
+
file,
|
|
382
|
+
line: index + 1,
|
|
383
|
+
type: "cta-button-size",
|
|
384
|
+
severity: "info",
|
|
385
|
+
message: `CTA button uses size="${size}" instead of "lg"`,
|
|
386
|
+
suggestion: 'Use size="lg" for primary CTA buttons',
|
|
387
|
+
snippet: line.trim().substring(0, 80),
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
// Detect inline/compact buttons that should be sm
|
|
392
|
+
const isInline = /inline|compact|small/i.test(buttonBlock) ||
|
|
393
|
+
buttonBlock.includes("IconButton") ||
|
|
394
|
+
/className=["'][^"']*text-xs/.test(buttonBlock);
|
|
395
|
+
if (isInline && size !== "sm") {
|
|
396
|
+
issues.push({
|
|
397
|
+
file,
|
|
398
|
+
line: index + 1,
|
|
399
|
+
type: "inline-button-size",
|
|
400
|
+
severity: "info",
|
|
401
|
+
message: `Inline/compact button uses size="${size}" instead of "sm"`,
|
|
402
|
+
suggestion: 'Use size="sm" for inline or compact buttons',
|
|
403
|
+
snippet: line.trim().substring(0, 80),
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
// Report inconsistent button sizing
|
|
410
|
+
if (buttonSizes.size > 3) {
|
|
411
|
+
const sorted = [...buttonSizes.entries()].sort((a, b) => b[1] - a[1]);
|
|
412
|
+
issues.push({
|
|
413
|
+
file: "codebase-wide",
|
|
414
|
+
line: 0,
|
|
415
|
+
type: "button-size-inconsistency",
|
|
416
|
+
severity: "info",
|
|
417
|
+
message: `Buttons use ${buttonSizes.size} different sizes: ${sorted.map(([s, c]) => `${s}(${c})`).join(", ")}`,
|
|
418
|
+
suggestion: "Standardize: lg for CTAs, default for secondary, sm for inline",
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
return {
|
|
422
|
+
name: "Button Size Consistency",
|
|
423
|
+
passed: issues.filter((i) => i.severity === "error").length === 0,
|
|
424
|
+
blocking: true,
|
|
425
|
+
issues,
|
|
426
|
+
duration: Date.now() - startTime,
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* 4. Icon Size Consistency
|
|
431
|
+
* Detects inconsistent icon sizing
|
|
432
|
+
*/
|
|
433
|
+
async checkIconSizeConsistency() {
|
|
434
|
+
const startTime = Date.now();
|
|
435
|
+
const issues = [];
|
|
436
|
+
const files = await this.getFiles();
|
|
437
|
+
const iconSizes = new Map();
|
|
438
|
+
const contextSizes = new Map();
|
|
439
|
+
for (const file of files) {
|
|
440
|
+
const content = fs.readFileSync(file, "utf8");
|
|
441
|
+
const lines = content.split("\n");
|
|
442
|
+
lines.forEach((line, index) => {
|
|
443
|
+
// Detect Lucide icons (most common pattern)
|
|
444
|
+
const iconMatch = line.match(/<([A-Z][a-zA-Z]+Icon|[A-Z][a-zA-Z]+)\s/);
|
|
445
|
+
if (iconMatch && /lucide|Icon/.test(content)) {
|
|
446
|
+
const contextBlock = lines
|
|
447
|
+
.slice(Math.max(0, index - 5), Math.min(index + 5, lines.length))
|
|
448
|
+
.join("\n");
|
|
449
|
+
// Extract size from various patterns
|
|
450
|
+
let size = "unknown";
|
|
451
|
+
// Pattern: size={16}
|
|
452
|
+
const sizeNumMatch = line.match(/size=\{(\d+)\}/);
|
|
453
|
+
if (sizeNumMatch)
|
|
454
|
+
size = sizeNumMatch[1];
|
|
455
|
+
// Pattern: className="w-4 h-4"
|
|
456
|
+
const tailwindMatch = line.match(/className=["'][^"']*(?:w-(\d+)|h-(\d+))/);
|
|
457
|
+
if (tailwindMatch) {
|
|
458
|
+
const w = tailwindMatch[1] || tailwindMatch[2];
|
|
459
|
+
size = `w-${w}`;
|
|
460
|
+
}
|
|
461
|
+
// Pattern: width={24} or height={24}
|
|
462
|
+
const dimMatch = line.match(/(?:width|height)=\{(\d+)\}/);
|
|
463
|
+
if (dimMatch)
|
|
464
|
+
size = dimMatch[1];
|
|
465
|
+
// Pattern: className="text-xl" etc
|
|
466
|
+
const textSizeMatch = line.match(/className=["'][^"']*text-(xs|sm|base|lg|xl|2xl|3xl)/);
|
|
467
|
+
if (textSizeMatch)
|
|
468
|
+
size = `text-${textSizeMatch[1]}`;
|
|
469
|
+
if (size !== "unknown") {
|
|
470
|
+
iconSizes.set(size, (iconSizes.get(size) || 0) + 1);
|
|
471
|
+
}
|
|
472
|
+
// Detect context
|
|
473
|
+
const isInButton = /<Button/.test(contextBlock) || /startIcon|endIcon/.test(contextBlock);
|
|
474
|
+
const isInCard = /<Card/.test(contextBlock);
|
|
475
|
+
const isInline = /inline|flex.*items-center/.test(contextBlock);
|
|
476
|
+
const isHero = /Hero|Feature|Landing/i.test(file);
|
|
477
|
+
// Validate size for context
|
|
478
|
+
if (isInButton && size !== "unknown") {
|
|
479
|
+
const buttonSizes = contextSizes.get("button") || new Map();
|
|
480
|
+
buttonSizes.set(size, (buttonSizes.get(size) || 0) + 1);
|
|
481
|
+
contextSizes.set("button", buttonSizes);
|
|
482
|
+
// Button icons should be 20px (w-5)
|
|
483
|
+
if (!["20", "w-5", "5"].includes(size)) {
|
|
484
|
+
issues.push({
|
|
485
|
+
file,
|
|
486
|
+
line: index + 1,
|
|
487
|
+
type: "button-icon-size",
|
|
488
|
+
severity: "info",
|
|
489
|
+
message: `Button icon uses size ${size} instead of 20px (w-5 h-5)`,
|
|
490
|
+
suggestion: 'Use className="w-5 h-5" or size={20} for button icons',
|
|
491
|
+
snippet: line.trim().substring(0, 80),
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
if (isInCard && !isInButton && size !== "unknown") {
|
|
496
|
+
const cardSizes = contextSizes.get("card") || new Map();
|
|
497
|
+
cardSizes.set(size, (cardSizes.get(size) || 0) + 1);
|
|
498
|
+
contextSizes.set("card", cardSizes);
|
|
499
|
+
// Card icons should be 24px (w-6)
|
|
500
|
+
if (!["24", "w-6", "6"].includes(size)) {
|
|
501
|
+
issues.push({
|
|
502
|
+
file,
|
|
503
|
+
line: index + 1,
|
|
504
|
+
type: "card-icon-size",
|
|
505
|
+
severity: "info",
|
|
506
|
+
message: `Card icon uses size ${size} instead of 24px (w-6 h-6)`,
|
|
507
|
+
suggestion: 'Use className="w-6 h-6" or size={24} for card icons',
|
|
508
|
+
snippet: line.trim().substring(0, 80),
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
if (isHero && size !== "unknown") {
|
|
513
|
+
// Hero icons should be 48px (w-12)
|
|
514
|
+
if (!["48", "w-12", "12", "32", "w-8", "8"].includes(size)) {
|
|
515
|
+
issues.push({
|
|
516
|
+
file,
|
|
517
|
+
line: index + 1,
|
|
518
|
+
type: "hero-icon-size",
|
|
519
|
+
severity: "info",
|
|
520
|
+
message: `Hero/feature icon uses size ${size} instead of 48px (w-12 h-12)`,
|
|
521
|
+
suggestion: 'Use className="w-12 h-12" or size={48} for hero icons',
|
|
522
|
+
snippet: line.trim().substring(0, 80),
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
// Report overall inconsistency
|
|
530
|
+
if (iconSizes.size > 6) {
|
|
531
|
+
const sorted = [...iconSizes.entries()].sort((a, b) => b[1] - a[1]);
|
|
532
|
+
issues.push({
|
|
533
|
+
file: "codebase-wide",
|
|
534
|
+
line: 0,
|
|
535
|
+
type: "icon-size-inconsistency",
|
|
536
|
+
severity: "warning",
|
|
537
|
+
message: `Icons use ${iconSizes.size} different sizes: ${sorted
|
|
538
|
+
.slice(0, 8)
|
|
539
|
+
.map(([s, c]) => `${s}(${c})`)
|
|
540
|
+
.join(", ")}`,
|
|
541
|
+
suggestion: "Standardize: 16px inline, 20px buttons, 24px cards, 48px hero",
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
return {
|
|
545
|
+
name: "Icon Size Consistency",
|
|
546
|
+
passed: issues.filter((i) => i.severity === "error").length === 0,
|
|
547
|
+
blocking: true,
|
|
548
|
+
issues,
|
|
549
|
+
duration: Date.now() - startTime,
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* 5. Alert/Status Message Spacing
|
|
554
|
+
* Detects inconsistent alert margins
|
|
555
|
+
*
|
|
556
|
+
* Enhanced to handle multi-line Alert/UnifiedStatus components by:
|
|
557
|
+
* 1. Finding the actual closing tag (not just first />)
|
|
558
|
+
* 2. Looking for content AFTER the closing tag
|
|
559
|
+
* 3. Skipping conditional wrappers like ") : null}"
|
|
560
|
+
*/
|
|
561
|
+
async checkAlertSpacing() {
|
|
562
|
+
const startTime = Date.now();
|
|
563
|
+
const issues = [];
|
|
564
|
+
const files = await this.getFiles();
|
|
565
|
+
const alertMargins = new Map();
|
|
566
|
+
for (const file of files) {
|
|
567
|
+
const content = fs.readFileSync(file, "utf8");
|
|
568
|
+
const lines = content.split("\n");
|
|
569
|
+
lines.forEach((line, index) => {
|
|
570
|
+
if (/<Alert\b/.test(line) || /<UnifiedStatus\b/.test(line)) {
|
|
571
|
+
const isUnifiedStatus = /<UnifiedStatus\b/.test(line);
|
|
572
|
+
const componentName = isUnifiedStatus ? "UnifiedStatus" : "Alert";
|
|
573
|
+
// Find the closing tag by tracking depth (handles nested JSX)
|
|
574
|
+
let closingLineIndex = index;
|
|
575
|
+
let depth = 1;
|
|
576
|
+
// Check if self-closing on same line
|
|
577
|
+
if (/\/>\s*$/.test(line)) {
|
|
578
|
+
closingLineIndex = index;
|
|
579
|
+
}
|
|
580
|
+
else {
|
|
581
|
+
// Search for closing - track JSX depth
|
|
582
|
+
for (let j = index + 1; j < Math.min(index + 50, lines.length); j++) {
|
|
583
|
+
const searchLine = lines[j];
|
|
584
|
+
// Standalone /> closes our component
|
|
585
|
+
if (/^\s*\/>/.test(searchLine)) {
|
|
586
|
+
depth--;
|
|
587
|
+
if (depth <= 0) {
|
|
588
|
+
closingLineIndex = j;
|
|
589
|
+
break;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
// Opening tags increase depth (but not self-closing ones)
|
|
593
|
+
const opens = (searchLine.match(/<[A-Z][a-zA-Z]*(?=[\s>])(?![^>]*\/>)/g) || [])
|
|
594
|
+
.length;
|
|
595
|
+
const closes = (searchLine.match(/<\/[A-Z][a-zA-Z]*>/g) || []).length;
|
|
596
|
+
depth += opens - closes;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
// Get the full alert block for margin extraction
|
|
600
|
+
const alertBlock = lines.slice(index, closingLineIndex + 1).join("\n");
|
|
601
|
+
// Extract margin
|
|
602
|
+
const mbMatch = alertBlock.match(/className=["'][^"']*mb-(\d+)/);
|
|
603
|
+
const marginMatch = alertBlock.match(/marginBottom:\s*["']?(?:var\(--spacing-(\d+)\)|(\d+)px)/);
|
|
604
|
+
let margin = "none";
|
|
605
|
+
if (mbMatch)
|
|
606
|
+
margin = `mb-${mbMatch[1]}`;
|
|
607
|
+
else if (marginMatch)
|
|
608
|
+
margin = `spacing-${marginMatch[1] || marginMatch[2]}`;
|
|
609
|
+
alertMargins.set(margin, (alertMargins.get(margin) || 0) + 1);
|
|
610
|
+
// Check for missing margin
|
|
611
|
+
if (margin === "none") {
|
|
612
|
+
// Check if there's content after the alert (after CLOSING tag)
|
|
613
|
+
// Skip empty lines and conditional wrappers like ") : null}"
|
|
614
|
+
const afterLines = lines.slice(closingLineIndex + 1, Math.min(closingLineIndex + 8, lines.length));
|
|
615
|
+
const filteredAfter = afterLines.filter((l) => !/^\s*$/.test(l) && !/^\s*\)\s*:\s*null\}?\s*$/.test(l));
|
|
616
|
+
const afterAlert = filteredAfter.join("\n");
|
|
617
|
+
const hasContentAfter = /<(?:Card|Box|div|Typography|Button|form)/i.test(afterAlert);
|
|
618
|
+
if (hasContentAfter) {
|
|
619
|
+
issues.push({
|
|
620
|
+
file,
|
|
621
|
+
line: index + 1,
|
|
622
|
+
type: "alert-no-margin",
|
|
623
|
+
severity: "warning",
|
|
624
|
+
message: `${componentName} without bottom margin before content`,
|
|
625
|
+
suggestion: 'Add className="mb-4" for consistent spacing after alerts',
|
|
626
|
+
snippet: line.trim().substring(0, 80),
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
// Check for non-standard margin
|
|
631
|
+
if (margin !== "none" && margin !== "mb-4" && margin !== "spacing-4") {
|
|
632
|
+
issues.push({
|
|
633
|
+
file,
|
|
634
|
+
line: index + 1,
|
|
635
|
+
type: "alert-non-standard-margin",
|
|
636
|
+
severity: "info",
|
|
637
|
+
message: `${componentName} uses ${margin} instead of mb-4`,
|
|
638
|
+
suggestion: "Use mb-4 (16px) for consistent alert spacing",
|
|
639
|
+
snippet: line.trim().substring(0, 80),
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
// Check for stacked alerts without gap
|
|
644
|
+
if (/<(?:Stack|Box|div)[^>]*>/.test(line)) {
|
|
645
|
+
const containerBlock = lines.slice(index, Math.min(index + 20, lines.length)).join("\n");
|
|
646
|
+
const alertCount = (containerBlock.match(/<Alert\b/g) || []).length;
|
|
647
|
+
if (alertCount >= 2) {
|
|
648
|
+
const hasGap = /gap-\d|spacing=\{\d\}|gap:\s*["']?var\(--spacing/.test(containerBlock);
|
|
649
|
+
if (!hasGap) {
|
|
650
|
+
issues.push({
|
|
651
|
+
file,
|
|
652
|
+
line: index + 1,
|
|
653
|
+
type: "stacked-alerts-no-gap",
|
|
654
|
+
severity: "info",
|
|
655
|
+
message: "Multiple alerts without gap between them",
|
|
656
|
+
suggestion: "Use gap-3 or spacing={3} for stacked alerts",
|
|
657
|
+
snippet: line.trim().substring(0, 80),
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
// Report inconsistent margins
|
|
665
|
+
if (alertMargins.size > 3) {
|
|
666
|
+
const sorted = [...alertMargins.entries()].sort((a, b) => b[1] - a[1]);
|
|
667
|
+
issues.push({
|
|
668
|
+
file: "codebase-wide",
|
|
669
|
+
line: 0,
|
|
670
|
+
type: "alert-margin-inconsistency",
|
|
671
|
+
severity: "info",
|
|
672
|
+
message: `Alerts use ${alertMargins.size} different margins: ${sorted.map(([m, c]) => `${m}(${c})`).join(", ")}`,
|
|
673
|
+
suggestion: "Standardize: mb-4 after alerts, gap-3 for stacked alerts",
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
return {
|
|
677
|
+
name: "Alert Spacing",
|
|
678
|
+
passed: issues.filter((i) => i.severity === "error").length === 0,
|
|
679
|
+
blocking: true,
|
|
680
|
+
issues,
|
|
681
|
+
duration: Date.now() - startTime,
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* 6. Form Field Density
|
|
686
|
+
* Detects inconsistent form spacing
|
|
687
|
+
*/
|
|
688
|
+
async checkFormFieldDensity() {
|
|
689
|
+
const startTime = Date.now();
|
|
690
|
+
const issues = [];
|
|
691
|
+
const files = await this.getFiles();
|
|
692
|
+
const formSpacings = new Map();
|
|
693
|
+
for (const file of files) {
|
|
694
|
+
const content = fs.readFileSync(file, "utf8");
|
|
695
|
+
const lines = content.split("\n");
|
|
696
|
+
lines.forEach((line, index) => {
|
|
697
|
+
// Detect form containers
|
|
698
|
+
if (/<(?:form|Stack|Box|Grid)[^>]*>/.test(line)) {
|
|
699
|
+
const containerBlock = lines.slice(index, Math.min(index + 30, lines.length)).join("\n");
|
|
700
|
+
// Check if this is a form (contains TextField, Select, etc.)
|
|
701
|
+
const isForm = /<(?:TextField|Select|Input|Checkbox|Radio|FormControl)\b/.test(containerBlock);
|
|
702
|
+
if (isForm) {
|
|
703
|
+
// Extract spacing
|
|
704
|
+
const spacingMatch = containerBlock.match(/spacing=\{(\d+)\}/);
|
|
705
|
+
const gapMatch = containerBlock.match(/gap-(\d+)/);
|
|
706
|
+
const gapVarMatch = containerBlock.match(/gap:\s*["']?var\(--spacing-(\d+)\)/);
|
|
707
|
+
let spacing = "unknown";
|
|
708
|
+
if (spacingMatch)
|
|
709
|
+
spacing = `spacing-${spacingMatch[1]}`;
|
|
710
|
+
else if (gapMatch)
|
|
711
|
+
spacing = `gap-${gapMatch[1]}`;
|
|
712
|
+
else if (gapVarMatch)
|
|
713
|
+
spacing = `spacing-${gapVarMatch[1]}`;
|
|
714
|
+
if (spacing !== "unknown") {
|
|
715
|
+
formSpacings.set(spacing, (formSpacings.get(spacing) || 0) + 1);
|
|
716
|
+
}
|
|
717
|
+
// Check for non-standard spacing
|
|
718
|
+
const spacingNum = parseInt(spacing.replace(/\D/g, ""));
|
|
719
|
+
// Standard form spacing should be 3 (12px)
|
|
720
|
+
if (spacingNum && spacingNum !== 3 && spacingNum !== 2) {
|
|
721
|
+
// Check context - is this a compact form?
|
|
722
|
+
const isCompact = /compact|dense|inline|filter|toolbar/i.test(containerBlock);
|
|
723
|
+
const isDialog = /<Dialog|<Modal/.test(containerBlock);
|
|
724
|
+
const isButtonGroup = /IconButton|direction=["']row["']|items-center/.test(containerBlock);
|
|
725
|
+
const isQuantityInput = /quantity|Quantity|increment|decrement/i.test(containerBlock);
|
|
726
|
+
const isPriceInput = /price|Price|currency/i.test(containerBlock);
|
|
727
|
+
const isCheckboxGroup = /Checkbox|Radio|FormControlLabel|Switch/.test(containerBlock);
|
|
728
|
+
const isChipContainer = /flex-wrap|Chip|chip|option|tag/i.test(containerBlock);
|
|
729
|
+
if (!isCompact &&
|
|
730
|
+
!isDialog &&
|
|
731
|
+
!isButtonGroup &&
|
|
732
|
+
!isQuantityInput &&
|
|
733
|
+
!isPriceInput &&
|
|
734
|
+
!isCheckboxGroup &&
|
|
735
|
+
!isChipContainer &&
|
|
736
|
+
spacingNum < 2) {
|
|
737
|
+
issues.push({
|
|
738
|
+
file,
|
|
739
|
+
line: index + 1,
|
|
740
|
+
type: "form-spacing-too-tight",
|
|
741
|
+
severity: "warning",
|
|
742
|
+
message: `Form uses ${spacing} (too tight for readability)`,
|
|
743
|
+
suggestion: "Use spacing={3} or gap-3 for standard forms, spacing={2} for compact",
|
|
744
|
+
snippet: line.trim().substring(0, 80),
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
if (spacingNum > 4) {
|
|
748
|
+
issues.push({
|
|
749
|
+
file,
|
|
750
|
+
line: index + 1,
|
|
751
|
+
type: "form-spacing-too-loose",
|
|
752
|
+
severity: "info",
|
|
753
|
+
message: `Form uses ${spacing} (may be too loose)`,
|
|
754
|
+
suggestion: "Use spacing={3} or gap-3 for standard forms",
|
|
755
|
+
snippet: line.trim().substring(0, 80),
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
// Check for mixed spacing approaches in same form
|
|
760
|
+
const hasSpacingProp = /spacing=\{/.test(containerBlock);
|
|
761
|
+
const hasGapClass = /gap-\d/.test(containerBlock);
|
|
762
|
+
const hasGapStyle = /gap:\s*["']?var/.test(containerBlock);
|
|
763
|
+
const approaches = [hasSpacingProp, hasGapClass, hasGapStyle].filter(Boolean).length;
|
|
764
|
+
if (approaches > 1) {
|
|
765
|
+
issues.push({
|
|
766
|
+
file,
|
|
767
|
+
line: index + 1,
|
|
768
|
+
type: "form-mixed-spacing",
|
|
769
|
+
severity: "info",
|
|
770
|
+
message: "Form uses multiple spacing approaches",
|
|
771
|
+
suggestion: "Use one consistent approach: spacing={3} for Stack, gap-3 for flex/grid",
|
|
772
|
+
snippet: line.trim().substring(0, 80),
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
// Report inconsistent form spacing
|
|
780
|
+
if (formSpacings.size > 4) {
|
|
781
|
+
const sorted = [...formSpacings.entries()].sort((a, b) => b[1] - a[1]);
|
|
782
|
+
issues.push({
|
|
783
|
+
file: "codebase-wide",
|
|
784
|
+
line: 0,
|
|
785
|
+
type: "form-spacing-inconsistency",
|
|
786
|
+
severity: "warning",
|
|
787
|
+
message: `Forms use ${formSpacings.size} different spacings: ${sorted.map(([s, c]) => `${s}(${c})`).join(", ")}`,
|
|
788
|
+
suggestion: "Standardize: spacing-3 for standard, spacing-2 for compact",
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
return {
|
|
792
|
+
name: "Form Field Density",
|
|
793
|
+
passed: issues.filter((i) => i.severity === "error").length === 0,
|
|
794
|
+
blocking: true,
|
|
795
|
+
issues,
|
|
796
|
+
duration: Date.now() - startTime,
|
|
797
|
+
};
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* Run all checks
|
|
801
|
+
*/
|
|
802
|
+
async runAll() {
|
|
803
|
+
const startTime = Date.now();
|
|
804
|
+
console.log(`\n${console_chars_1.emoji.target} UI STANDARDS ENFORCEMENT PREFLIGHT`);
|
|
805
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
806
|
+
const checks = [];
|
|
807
|
+
checks.push(await this.checkCardShadowConsistency());
|
|
808
|
+
checks.push(await this.checkTypographyHierarchy());
|
|
809
|
+
checks.push(await this.checkButtonSizeConsistency());
|
|
810
|
+
checks.push(await this.checkIconSizeConsistency());
|
|
811
|
+
checks.push(await this.checkAlertSpacing());
|
|
812
|
+
checks.push(await this.checkFormFieldDensity());
|
|
813
|
+
const totalDuration = Date.now() - startTime;
|
|
814
|
+
const allIssues = checks.flatMap((c) => c.issues);
|
|
815
|
+
const errors = allIssues.filter((i) => i.severity === "error").length;
|
|
816
|
+
const warnings = allIssues.filter((i) => i.severity === "warning").length;
|
|
817
|
+
const infos = allIssues.filter((i) => i.severity === "info").length;
|
|
818
|
+
const blockingFailed = checks.some((c) => c.blocking && !c.passed);
|
|
819
|
+
const summary = {
|
|
820
|
+
total: checks.length,
|
|
821
|
+
passed: checks.filter((c) => c.passed).length,
|
|
822
|
+
failed: checks.filter((c) => !c.passed).length,
|
|
823
|
+
errors,
|
|
824
|
+
warnings,
|
|
825
|
+
};
|
|
826
|
+
// Print results
|
|
827
|
+
checks.forEach((check) => {
|
|
828
|
+
const icon = check.passed ? `${console_chars_1.emoji.success}` : `${console_chars_1.emoji.error}`;
|
|
829
|
+
const suffix = check.blocking ? " [BLOCKING]" : "";
|
|
830
|
+
console.log(`${icon} ${check.name} (${check.issues.length} issues, ${(check.duration / 1000).toFixed(1)}s)${suffix}`);
|
|
831
|
+
});
|
|
832
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
833
|
+
console.log(`Errors: ${errors} | Warnings: ${warnings} | Info: ${infos} | Time: ${(totalDuration / 1000).toFixed(1)}s`);
|
|
834
|
+
if (blockingFailed) {
|
|
835
|
+
console.log(`\n${console_chars_1.emoji.error} UI STANDARDS FAILED - ${errors} error(s)`);
|
|
836
|
+
}
|
|
837
|
+
else if (warnings > 0) {
|
|
838
|
+
console.log(`\n${console_chars_1.emoji.warning} UI STANDARDS PASSED - ${warnings} warning(s)`);
|
|
839
|
+
}
|
|
840
|
+
else {
|
|
841
|
+
console.log(`\n${console_chars_1.emoji.success} UI STANDARDS PASSED`);
|
|
842
|
+
}
|
|
843
|
+
// Print standards reference
|
|
844
|
+
console.log(`\n${console_chars_1.emoji.clipboard} UI STANDARDS REFERENCE:`);
|
|
845
|
+
console.log(" Card Shadows: --shadow-md (primary), --shadow-sm (nested), --shadow-lg (elevated)");
|
|
846
|
+
console.log(" Typography: h4 (page title), h6 (section), subtitle1 (subsection)");
|
|
847
|
+
console.log(" Button Sizes: lg (CTA), default (secondary), sm (inline)");
|
|
848
|
+
console.log(" Icon Sizes: 16px (inline), 20px (button), 24px (card), 48px (hero)");
|
|
849
|
+
console.log(" Alert Spacing: mb-4 (after alert), gap-3 (stacked alerts)");
|
|
850
|
+
console.log(" Form Density: spacing-3 (standard), spacing-2 (compact)");
|
|
851
|
+
return {
|
|
852
|
+
module: "ui-standards-enforcement",
|
|
853
|
+
passed: !blockingFailed,
|
|
854
|
+
totalDuration,
|
|
855
|
+
checks,
|
|
856
|
+
summary,
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
exports.UIStandardsEnforcementModule = UIStandardsEnforcementModule;
|
|
861
|
+
async function main() {
|
|
862
|
+
const reporter = (0, universal_progress_reporter_1.createUniversalProgressReporter)(path.basename(__filename, ".ts"));
|
|
863
|
+
const args = process.argv.slice(2);
|
|
864
|
+
const mode = args[0] || "all";
|
|
865
|
+
const verbose = args.includes("--verbose") || args.includes("-v");
|
|
866
|
+
const parallel = args.includes("--parallel") || args.includes("-p");
|
|
867
|
+
const module = new UIStandardsEnforcementModule({ verbose, parallel });
|
|
868
|
+
const runSingle = async (name, fn) => {
|
|
869
|
+
console.log(`\n${console_chars_1.emoji.target} UI STANDARDS: ${name.toUpperCase()}`);
|
|
870
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
871
|
+
const check = await fn();
|
|
872
|
+
const summary = {
|
|
873
|
+
total: 1,
|
|
874
|
+
passed: check.passed ? 1 : 0,
|
|
875
|
+
failed: check.passed ? 0 : 1,
|
|
876
|
+
errors: check.issues.filter((i) => i.severity === "error").length,
|
|
877
|
+
warnings: check.issues.filter((i) => i.severity === "warning").length,
|
|
878
|
+
};
|
|
879
|
+
const icon = check.passed ? `${console_chars_1.emoji.success}` : `${console_chars_1.emoji.error}`;
|
|
880
|
+
console.log(`${icon} ${check.name} (${check.issues.length} issues, ${(check.duration / 1000).toFixed(1)}s)`);
|
|
881
|
+
if (check.issues.length > 0) {
|
|
882
|
+
check.issues.slice(0, 50).forEach((issue) => {
|
|
883
|
+
const color = issue.severity === "error"
|
|
884
|
+
? "\x1b[31m"
|
|
885
|
+
: issue.severity === "warning"
|
|
886
|
+
? "\x1b[33m"
|
|
887
|
+
: "\x1b[36m";
|
|
888
|
+
const reset = "\x1b[0m";
|
|
889
|
+
console.log(` ${color}[${issue.severity.toUpperCase()}]${reset} ${issue.file}:${issue.line}`);
|
|
890
|
+
console.log(` ${issue.message}`);
|
|
891
|
+
if (issue.suggestion)
|
|
892
|
+
console.log(` ${console_chars_1.chars.arrow} ${issue.suggestion}`);
|
|
893
|
+
});
|
|
894
|
+
if (check.issues.length > 50)
|
|
895
|
+
console.log(` ... and ${check.issues.length - 50} more issues`);
|
|
896
|
+
}
|
|
897
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
898
|
+
return {
|
|
899
|
+
module: `ui-standards:${name}`,
|
|
900
|
+
passed: check.passed,
|
|
901
|
+
totalDuration: check.duration,
|
|
902
|
+
checks: [check],
|
|
903
|
+
summary,
|
|
904
|
+
};
|
|
905
|
+
};
|
|
906
|
+
let result;
|
|
907
|
+
switch (mode) {
|
|
908
|
+
case "shadows":
|
|
909
|
+
result = await runSingle("shadows", () => module.checkCardShadowConsistency());
|
|
910
|
+
break;
|
|
911
|
+
case "typography":
|
|
912
|
+
result = await runSingle("typography", () => module.checkTypographyHierarchy());
|
|
913
|
+
break;
|
|
914
|
+
case "buttons":
|
|
915
|
+
result = await runSingle("buttons", () => module.checkButtonSizeConsistency());
|
|
916
|
+
break;
|
|
917
|
+
case "icons":
|
|
918
|
+
result = await runSingle("icons", () => module.checkIconSizeConsistency());
|
|
919
|
+
break;
|
|
920
|
+
case "alerts":
|
|
921
|
+
result = await runSingle("alerts", () => module.checkAlertSpacing());
|
|
922
|
+
break;
|
|
923
|
+
case "forms":
|
|
924
|
+
result = await runSingle("forms", () => module.checkFormFieldDensity());
|
|
925
|
+
break;
|
|
926
|
+
default:
|
|
927
|
+
result = await module.runAll();
|
|
928
|
+
break;
|
|
929
|
+
}
|
|
930
|
+
process.exit(result.passed ? 0 : 1);
|
|
931
|
+
}
|
|
932
|
+
if (require.main === module) {
|
|
933
|
+
main();
|
|
934
|
+
}
|
|
935
|
+
//# sourceMappingURL=ui-standards-enforcement.js.map
|