@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,1220 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Advanced UI Spacing Preflight
|
|
5
|
+
*
|
|
6
|
+
* Comprehensive spacing checks for complex UI patterns:
|
|
7
|
+
* 1. Table Spacing - cell padding, header/body separation, dense tables
|
|
8
|
+
* 2. Dialog/Modal Spacing - content padding, actions margin, form spacing
|
|
9
|
+
* 3. Button Group Consistency - gap consistency, alignment, order
|
|
10
|
+
* 4. Responsive Spacing Gaps - hardcoded gaps, mobile-friendly gaps
|
|
11
|
+
* 5. Empty State Spacing - vertical centering, container padding
|
|
12
|
+
* 6. Loading State Spacing - skeleton consistency, layout shift
|
|
13
|
+
* 7. Alert/Banner Spacing - margin from content, stacked alerts
|
|
14
|
+
* 8. Accordion Spacing - summary icons, nested indentation
|
|
15
|
+
* 9. Tab Panel Spacing - panel padding, content start spacing
|
|
16
|
+
* 10. Inline Form Elements - label/input gaps, form group spacing
|
|
17
|
+
*
|
|
18
|
+
* Usage:
|
|
19
|
+
* pnpm preflight:ui-advanced-spacing # All checks
|
|
20
|
+
* pnpm preflight:ui-advanced-spacing tables # Table spacing only
|
|
21
|
+
* pnpm preflight:ui-advanced-spacing dialogs # Dialog spacing only
|
|
22
|
+
* pnpm preflight:ui-advanced-spacing buttons # Button group consistency
|
|
23
|
+
* pnpm preflight:ui-advanced-spacing responsive # Responsive gaps only
|
|
24
|
+
* pnpm preflight:ui-advanced-spacing empty-states # Empty state spacing
|
|
25
|
+
* pnpm preflight:ui-advanced-spacing loading # Loading state spacing
|
|
26
|
+
* pnpm preflight:ui-advanced-spacing alerts # Alert/banner spacing
|
|
27
|
+
* pnpm preflight:ui-advanced-spacing accordions # Accordion spacing
|
|
28
|
+
* pnpm preflight:ui-advanced-spacing tabs # Tab panel spacing
|
|
29
|
+
* pnpm preflight:ui-advanced-spacing inline-forms # Inline form elements
|
|
30
|
+
*/
|
|
31
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
32
|
+
if (k2 === undefined) k2 = k;
|
|
33
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
34
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
35
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(o, k2, desc);
|
|
38
|
+
}) : (function(o, m, k, k2) {
|
|
39
|
+
if (k2 === undefined) k2 = k;
|
|
40
|
+
o[k2] = m[k];
|
|
41
|
+
}));
|
|
42
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
43
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
44
|
+
}) : function(o, v) {
|
|
45
|
+
o["default"] = v;
|
|
46
|
+
});
|
|
47
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
48
|
+
var ownKeys = function(o) {
|
|
49
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
50
|
+
var ar = [];
|
|
51
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
52
|
+
return ar;
|
|
53
|
+
};
|
|
54
|
+
return ownKeys(o);
|
|
55
|
+
};
|
|
56
|
+
return function (mod) {
|
|
57
|
+
if (mod && mod.__esModule) return mod;
|
|
58
|
+
var result = {};
|
|
59
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
60
|
+
__setModuleDefault(result, mod);
|
|
61
|
+
return result;
|
|
62
|
+
};
|
|
63
|
+
})();
|
|
64
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
+
exports.UIAdvancedSpacingModule = void 0;
|
|
66
|
+
const fs = __importStar(require("fs"));
|
|
67
|
+
const file_cache_1 = require("../../shared/file-cache");
|
|
68
|
+
const path = __importStar(require("path"));
|
|
69
|
+
const console_chars_1 = require("../../utils/console-chars");
|
|
70
|
+
const universal_progress_reporter_1 = require("../system/universal-progress-reporter");
|
|
71
|
+
const concurrency_config_1 = require("../../shared/concurrency-config");
|
|
72
|
+
const design_tokens_1 = require("../../shared/design-tokens");
|
|
73
|
+
const EXCLUDED_PATTERNS = [
|
|
74
|
+
"**/node_modules/**",
|
|
75
|
+
"**/.next/**",
|
|
76
|
+
"**/dist/**",
|
|
77
|
+
"**/build/**",
|
|
78
|
+
"**/scripts/**",
|
|
79
|
+
"**/*.test.tsx",
|
|
80
|
+
"**/*.spec.tsx",
|
|
81
|
+
"**/*.stories.tsx",
|
|
82
|
+
];
|
|
83
|
+
// Get concurrency from shared config (respects PREFLIGHT_CONCURRENCY env var)
|
|
84
|
+
const concurrencyConfig = (0, concurrency_config_1.getConcurrencyConfig)();
|
|
85
|
+
class UIAdvancedSpacingModule {
|
|
86
|
+
verbose;
|
|
87
|
+
parallel = false;
|
|
88
|
+
constructor(options = {}) {
|
|
89
|
+
this.verbose = options.verbose || false;
|
|
90
|
+
this.parallel = options.parallel || concurrencyConfig.parallel;
|
|
91
|
+
}
|
|
92
|
+
async getFiles() {
|
|
93
|
+
return await file_cache_1.fileCache.getAllTsxJsx();
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* 1. Table Spacing Checks
|
|
97
|
+
* - Table cells with inconsistent padding
|
|
98
|
+
* - Tables without proper header/body separation
|
|
99
|
+
* - Dense tables without size="small" prop
|
|
100
|
+
* - Tables inside Cards without proper CardContent wrapper
|
|
101
|
+
*/
|
|
102
|
+
async checkTableSpacing() {
|
|
103
|
+
const startTime = Date.now();
|
|
104
|
+
const issues = [];
|
|
105
|
+
const files = await this.getFiles();
|
|
106
|
+
for (const file of files) {
|
|
107
|
+
const content = fs.readFileSync(file, "utf8");
|
|
108
|
+
if (!content.includes("<Table"))
|
|
109
|
+
continue;
|
|
110
|
+
const lines = content.split("\n");
|
|
111
|
+
lines.forEach((line, index) => {
|
|
112
|
+
// Check for Table without size prop when it has many rows
|
|
113
|
+
if (/<Table\b/.test(line) && !/<Table[^>]*size=/.test(line)) {
|
|
114
|
+
const tableBlock = lines.slice(index, Math.min(index + 100, lines.length)).join("\n");
|
|
115
|
+
const rowCount = (tableBlock.match(/<TableRow/g) || []).length;
|
|
116
|
+
// Dense tables (10+ rows) should use size="small"
|
|
117
|
+
if (rowCount >= 10) {
|
|
118
|
+
issues.push({
|
|
119
|
+
file,
|
|
120
|
+
line: index + 1,
|
|
121
|
+
type: "table-no-size-dense",
|
|
122
|
+
severity: "info",
|
|
123
|
+
message: `Table with ${rowCount} rows should consider size="small" for density`,
|
|
124
|
+
suggestion: 'Add size="small" to Table for better data density',
|
|
125
|
+
snippet: line.trim().substring(0, 80),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// Check for TableCell with inconsistent padding styles
|
|
130
|
+
if (/<TableCell/.test(line)) {
|
|
131
|
+
const cellContext = lines.slice(index, Math.min(index + 5, lines.length)).join("\n");
|
|
132
|
+
// Check for mixed padding approaches (some inline, some className)
|
|
133
|
+
const hasInlinePadding = /style=\{[^}]*padding/.test(cellContext);
|
|
134
|
+
const hasClassPadding = /className=["'][^"']*p-\d/.test(cellContext);
|
|
135
|
+
if (hasInlinePadding && hasClassPadding) {
|
|
136
|
+
issues.push({
|
|
137
|
+
file,
|
|
138
|
+
line: index + 1,
|
|
139
|
+
type: "table-cell-mixed-padding",
|
|
140
|
+
severity: "warning",
|
|
141
|
+
message: "TableCell uses both inline style and className for padding",
|
|
142
|
+
suggestion: "Use consistent padding approach (prefer className or design tokens)",
|
|
143
|
+
snippet: line.trim().substring(0, 80),
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
// Check for Table inside Card without CardContent
|
|
148
|
+
if (/<Card\b/.test(line) && !/<Card[^>]*>/.test(line)) {
|
|
149
|
+
// Multi-line Card opening
|
|
150
|
+
}
|
|
151
|
+
else if (/<Card\b[^>]*>/.test(line)) {
|
|
152
|
+
const cardBlock = lines.slice(index, Math.min(index + 50, lines.length)).join("\n");
|
|
153
|
+
const cardEndMatch = cardBlock.indexOf("</Card>");
|
|
154
|
+
const cardContent = cardEndMatch > 0 ? cardBlock.substring(0, cardEndMatch) : cardBlock;
|
|
155
|
+
const hasTable = /<Table\b/.test(cardContent);
|
|
156
|
+
const hasCardContent = /<CardContent/.test(cardContent);
|
|
157
|
+
const hasTableContainer = /<TableContainer/.test(cardContent);
|
|
158
|
+
// Table in Card without CardContent or TableContainer is problematic
|
|
159
|
+
if (hasTable && !hasCardContent && !hasTableContainer) {
|
|
160
|
+
issues.push({
|
|
161
|
+
file,
|
|
162
|
+
line: index + 1,
|
|
163
|
+
type: "table-in-card-no-wrapper",
|
|
164
|
+
severity: "warning",
|
|
165
|
+
message: "Table inside Card without CardContent or TableContainer wrapper",
|
|
166
|
+
suggestion: "Wrap Table in <TableContainer> or <CardContent> for proper spacing",
|
|
167
|
+
snippet: line.trim().substring(0, 80),
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
return {
|
|
174
|
+
name: "Table Spacing",
|
|
175
|
+
passed: true,
|
|
176
|
+
blocking: true,
|
|
177
|
+
issues,
|
|
178
|
+
duration: Date.now() - startTime,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* 2. Dialog/Modal Content Spacing
|
|
183
|
+
* - DialogContent with p-0 followed by form fields (needs padding)
|
|
184
|
+
* - DialogActions without proper top margin from content
|
|
185
|
+
* - Modal forms without consistent internal spacing
|
|
186
|
+
*/
|
|
187
|
+
async checkDialogSpacing() {
|
|
188
|
+
const startTime = Date.now();
|
|
189
|
+
const issues = [];
|
|
190
|
+
const files = await this.getFiles();
|
|
191
|
+
for (const file of files) {
|
|
192
|
+
const content = fs.readFileSync(file, "utf8");
|
|
193
|
+
if (!content.includes("<Dialog"))
|
|
194
|
+
continue;
|
|
195
|
+
const lines = content.split("\n");
|
|
196
|
+
lines.forEach((line, index) => {
|
|
197
|
+
// Check for DialogContent with p-0 containing form fields
|
|
198
|
+
if (/<DialogContent[^>]*className=["'][^"']*p-0/.test(line)) {
|
|
199
|
+
const dialogBlock = lines.slice(index, Math.min(index + 30, lines.length)).join("\n");
|
|
200
|
+
const hasFormFields = /<(TextField|Select|Autocomplete|form)/.test(dialogBlock);
|
|
201
|
+
// p-0 is fine for full-bleed content (images, maps) but not for forms
|
|
202
|
+
if (hasFormFields) {
|
|
203
|
+
issues.push({
|
|
204
|
+
file,
|
|
205
|
+
line: index + 1,
|
|
206
|
+
type: "dialog-p0-with-forms",
|
|
207
|
+
severity: "warning",
|
|
208
|
+
message: "DialogContent with p-0 contains form fields (needs padding)",
|
|
209
|
+
suggestion: 'Use className="p-6" for DialogContent with forms',
|
|
210
|
+
snippet: line.trim().substring(0, 80),
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
// Check for DialogActions without proper spacing
|
|
215
|
+
if (/<DialogActions/.test(line)) {
|
|
216
|
+
const actionsContext = lines.slice(index, Math.min(index + 5, lines.length)).join("\n");
|
|
217
|
+
const linesBefore = lines.slice(Math.max(0, index - 10), index).join("\n");
|
|
218
|
+
// Check if DialogContent ends right before DialogActions without spacing
|
|
219
|
+
const contentEndsAbove = /<\/DialogContent>/.test(linesBefore);
|
|
220
|
+
const hasSpacingClass = /className=["'][^"']*(?:pt-|mt-|border-t)/.test(actionsContext);
|
|
221
|
+
const hasSpacingStyle = /style=\{[^}]*(?:paddingTop|marginTop|borderTop)/.test(actionsContext);
|
|
222
|
+
// DialogActions should have visual separation from content
|
|
223
|
+
if (contentEndsAbove && !hasSpacingClass && !hasSpacingStyle) {
|
|
224
|
+
// Check if DialogActions has default spacing (sx prop or built-in)
|
|
225
|
+
const hasSxSpacing = /sx=\{[^}]*(?:pt|mt|borderTop)/.test(actionsContext);
|
|
226
|
+
if (!hasSxSpacing) {
|
|
227
|
+
issues.push({
|
|
228
|
+
file,
|
|
229
|
+
line: index + 1,
|
|
230
|
+
type: "dialog-actions-no-spacing",
|
|
231
|
+
severity: "info",
|
|
232
|
+
message: "DialogActions may need visual separation from content",
|
|
233
|
+
suggestion: 'Consider adding className="pt-4 border-t" or similar for visual separation',
|
|
234
|
+
snippet: line.trim().substring(0, 80),
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
// Check for Dialog forms without Stack/consistent spacing
|
|
240
|
+
if (/<Dialog\b/.test(line)) {
|
|
241
|
+
const dialogBlock = lines.slice(index, Math.min(index + 80, lines.length)).join("\n");
|
|
242
|
+
const dialogEnd = dialogBlock.indexOf("</Dialog>");
|
|
243
|
+
const dialogContent = dialogEnd > 0 ? dialogBlock.substring(0, dialogEnd) : dialogBlock;
|
|
244
|
+
// Count form fields
|
|
245
|
+
const formFieldCount = (dialogContent.match(/<(TextField|Select|Autocomplete)/g) || [])
|
|
246
|
+
.length;
|
|
247
|
+
if (formFieldCount >= 3) {
|
|
248
|
+
// Multiple form fields should use Stack for consistent spacing
|
|
249
|
+
const hasStack = /<Stack[^>]*spacing/.test(dialogContent);
|
|
250
|
+
const hasGridSpacing = /<Grid[^>]*container[^>]*spacing/.test(dialogContent);
|
|
251
|
+
const hasFlexGap = /className=["'][^"']*(?:gap-|space-y-)/.test(dialogContent);
|
|
252
|
+
if (!hasStack && !hasGridSpacing && !hasFlexGap) {
|
|
253
|
+
issues.push({
|
|
254
|
+
file,
|
|
255
|
+
line: index + 1,
|
|
256
|
+
type: "dialog-form-no-spacing-system",
|
|
257
|
+
severity: "info",
|
|
258
|
+
message: `Dialog with ${formFieldCount} form fields lacks consistent spacing system`,
|
|
259
|
+
suggestion: 'Use <Stack spacing={3}> or className="space-y-4" for form fields',
|
|
260
|
+
snippet: line.trim().substring(0, 80),
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
return {
|
|
268
|
+
name: "Dialog/Modal Spacing",
|
|
269
|
+
passed: true,
|
|
270
|
+
blocking: true,
|
|
271
|
+
issues,
|
|
272
|
+
duration: Date.now() - startTime,
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* 3. Button Group Consistency
|
|
277
|
+
* - Multiple buttons without consistent gap
|
|
278
|
+
* - Action buttons at different positions (alignment)
|
|
279
|
+
* - Primary/secondary button order inconsistency
|
|
280
|
+
*/
|
|
281
|
+
async checkButtonGroupConsistency() {
|
|
282
|
+
const startTime = Date.now();
|
|
283
|
+
const issues = [];
|
|
284
|
+
const files = await this.getFiles();
|
|
285
|
+
// Track gap usage across files for consistency analysis
|
|
286
|
+
const gapUsage = new Map();
|
|
287
|
+
for (const file of files) {
|
|
288
|
+
const content = fs.readFileSync(file, "utf8");
|
|
289
|
+
if (!content.includes("<Button"))
|
|
290
|
+
continue;
|
|
291
|
+
const lines = content.split("\n");
|
|
292
|
+
lines.forEach((line, index) => {
|
|
293
|
+
// Check for button containers with gap classes
|
|
294
|
+
if (/className=["'][^"']*(?:flex|inline-flex)[^"']*gap-(\d+)/.test(line)) {
|
|
295
|
+
const gapMatch = line.match(/gap-(\d+)/);
|
|
296
|
+
if (gapMatch) {
|
|
297
|
+
const gap = gapMatch[1];
|
|
298
|
+
gapUsage.set(gap, (gapUsage.get(gap) || 0) + 1);
|
|
299
|
+
}
|
|
300
|
+
// Check if this container has multiple buttons
|
|
301
|
+
const containerBlock = lines.slice(index, Math.min(index + 15, lines.length)).join("\n");
|
|
302
|
+
const buttonCount = (containerBlock.match(/<Button/g) || []).length;
|
|
303
|
+
if (buttonCount >= 2) {
|
|
304
|
+
// Check for primary/secondary order (primary should typically be last/right)
|
|
305
|
+
const primaryFirst = /variant=["'](?:contained|default)["'][^]*variant=["'](?:outlined|text)["']/.test(containerBlock);
|
|
306
|
+
const hasJustifyEnd = /justify-end|justify-between|ml-auto/.test(line);
|
|
307
|
+
// In LTR layouts, primary action is typically on the right
|
|
308
|
+
if (primaryFirst && hasJustifyEnd) {
|
|
309
|
+
issues.push({
|
|
310
|
+
file,
|
|
311
|
+
line: index + 1,
|
|
312
|
+
type: "button-order-primary-first",
|
|
313
|
+
severity: "info",
|
|
314
|
+
message: "Primary button appears before secondary (consider reversing for standard UX)",
|
|
315
|
+
suggestion: "Place primary action button last (rightmost) in button groups",
|
|
316
|
+
snippet: line.trim().substring(0, 80),
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
// Check for buttons without proper container gap
|
|
322
|
+
if (/<Button/.test(line)) {
|
|
323
|
+
const linesBefore = lines.slice(Math.max(0, index - 3), index).join("\n");
|
|
324
|
+
const linesAfter = lines.slice(index, Math.min(index + 5, lines.length)).join("\n");
|
|
325
|
+
// Check if there's another Button nearby without gap container
|
|
326
|
+
const hasNearbyButton = /<Button/.test(linesAfter.split("\n").slice(1).join("\n"));
|
|
327
|
+
const hasGapContainer = /gap-\d|space-x-\d|Stack/.test(linesBefore);
|
|
328
|
+
if (hasNearbyButton && !hasGapContainer) {
|
|
329
|
+
// Check for inline margin on buttons (anti-pattern)
|
|
330
|
+
const hasInlineMargin = /className=["'][^"']*m[lr]-\d/.test(line) ||
|
|
331
|
+
/style=\{[^}]*margin(?:Left|Right)/.test(line);
|
|
332
|
+
if (hasInlineMargin) {
|
|
333
|
+
issues.push({
|
|
334
|
+
file,
|
|
335
|
+
line: index + 1,
|
|
336
|
+
type: "button-inline-margin",
|
|
337
|
+
severity: "warning",
|
|
338
|
+
message: "Button uses inline margin instead of container gap",
|
|
339
|
+
suggestion: `Wrap buttons in flex container with gap-${design_tokens_1.GAPS.buttonGroup} instead of individual margins`,
|
|
340
|
+
snippet: line.trim().substring(0, 80),
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
// Report inconsistent gap usage across codebase
|
|
348
|
+
if (gapUsage.size > 2) {
|
|
349
|
+
const sortedGaps = [...gapUsage.entries()].sort((a, b) => b[1] - a[1]);
|
|
350
|
+
const mostCommon = sortedGaps[0][0];
|
|
351
|
+
const uncommonGaps = sortedGaps.filter(([gap]) => gap !== mostCommon && gap !== String(Number(mostCommon) + 1));
|
|
352
|
+
if (uncommonGaps.length > 0) {
|
|
353
|
+
issues.push({
|
|
354
|
+
file: "codebase-wide",
|
|
355
|
+
line: 0,
|
|
356
|
+
type: "button-gap-inconsistency",
|
|
357
|
+
severity: "info",
|
|
358
|
+
message: `Button groups use inconsistent gaps: ${sortedGaps.map(([g, c]) => `gap-${g}(${c})`).join(", ")}`,
|
|
359
|
+
suggestion: `Standardize on gap-${mostCommon} or gap-${Number(mostCommon) + 1} for button groups`,
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
return {
|
|
364
|
+
name: "Button Group Consistency",
|
|
365
|
+
passed: true,
|
|
366
|
+
blocking: true,
|
|
367
|
+
issues,
|
|
368
|
+
duration: Date.now() - startTime,
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* 4. Responsive Spacing Gaps
|
|
373
|
+
* - Hardcoded gap values that don't scale responsively
|
|
374
|
+
* - Grid gaps that are too tight on mobile
|
|
375
|
+
* - Missing responsive gap classes
|
|
376
|
+
*/
|
|
377
|
+
async checkResponsiveGaps() {
|
|
378
|
+
const startTime = Date.now();
|
|
379
|
+
const issues = [];
|
|
380
|
+
const files = await this.getFiles();
|
|
381
|
+
for (const file of files) {
|
|
382
|
+
const content = fs.readFileSync(file, "utf8");
|
|
383
|
+
const lines = content.split("\n");
|
|
384
|
+
lines.forEach((line, index) => {
|
|
385
|
+
// Check for grid containers with small gaps that might be too tight on mobile
|
|
386
|
+
if (/className=["'][^"']*grid[^"']*gap-[12][^0-9]/.test(line)) {
|
|
387
|
+
const hasResponsiveGap = /(?:sm|md|lg|xl):gap-/.test(line);
|
|
388
|
+
const isSmallGrid = /grid-cols-[2-6]/.test(line);
|
|
389
|
+
if (isSmallGrid && !hasResponsiveGap) {
|
|
390
|
+
issues.push({
|
|
391
|
+
file,
|
|
392
|
+
line: index + 1,
|
|
393
|
+
type: "grid-tight-gap-no-responsive",
|
|
394
|
+
severity: "info",
|
|
395
|
+
message: "Grid with gap-1 or gap-2 may be too tight on mobile",
|
|
396
|
+
suggestion: "Consider responsive gaps: gap-2 md:gap-4 for better mobile spacing",
|
|
397
|
+
snippet: line.trim().substring(0, 80),
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
// Check for large gaps that don't scale down on mobile
|
|
402
|
+
if (/className=["'][^"']*gap-[89]|gap-1[0-9]/.test(line)) {
|
|
403
|
+
const hasResponsiveGap = /(?:sm|md|lg|xl):gap-/.test(line);
|
|
404
|
+
if (!hasResponsiveGap) {
|
|
405
|
+
issues.push({
|
|
406
|
+
file,
|
|
407
|
+
line: index + 1,
|
|
408
|
+
type: "large-gap-no-responsive",
|
|
409
|
+
severity: "info",
|
|
410
|
+
message: "Large gap (8+) without responsive variant may waste mobile space",
|
|
411
|
+
suggestion: "Consider responsive gaps: gap-4 md:gap-8 for mobile optimization",
|
|
412
|
+
snippet: line.trim().substring(0, 80),
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
// Check for inline style gaps (should use Tailwind for responsiveness)
|
|
417
|
+
if (/style=\{[^}]*gap:\s*["']?\d+px/.test(line)) {
|
|
418
|
+
issues.push({
|
|
419
|
+
file,
|
|
420
|
+
line: index + 1,
|
|
421
|
+
type: "inline-gap-not-responsive",
|
|
422
|
+
severity: "warning",
|
|
423
|
+
message: "Inline style gap cannot be responsive",
|
|
424
|
+
suggestion: "Use Tailwind gap classes (gap-4 md:gap-6) for responsive spacing",
|
|
425
|
+
snippet: line.trim().substring(0, 80),
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
// Check for card grids without responsive gaps
|
|
429
|
+
if (/className=["'][^"']*grid[^"']*grid-cols-/.test(line)) {
|
|
430
|
+
const hasResponsiveCols = /(?:sm|md|lg|xl):grid-cols-/.test(line);
|
|
431
|
+
const hasResponsiveGap = /(?:sm|md|lg|xl):gap-/.test(line);
|
|
432
|
+
// If columns are responsive, gaps should be too
|
|
433
|
+
if (hasResponsiveCols && !hasResponsiveGap) {
|
|
434
|
+
const gapMatch = line.match(/gap-(\d+)/);
|
|
435
|
+
if (gapMatch && Number(gapMatch[1]) >= 4) {
|
|
436
|
+
issues.push({
|
|
437
|
+
file,
|
|
438
|
+
line: index + 1,
|
|
439
|
+
type: "responsive-cols-static-gap",
|
|
440
|
+
severity: "info",
|
|
441
|
+
message: "Grid has responsive columns but static gap",
|
|
442
|
+
suggestion: "Add responsive gap to match column breakpoints",
|
|
443
|
+
snippet: line.trim().substring(0, 80),
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
return {
|
|
451
|
+
name: "Responsive Spacing Gaps",
|
|
452
|
+
passed: true,
|
|
453
|
+
blocking: true,
|
|
454
|
+
issues,
|
|
455
|
+
duration: Date.now() - startTime,
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* 5. Empty State Spacing
|
|
460
|
+
* - Empty state components without proper vertical centering
|
|
461
|
+
* - Empty states with inconsistent padding from container edges
|
|
462
|
+
*/
|
|
463
|
+
async checkEmptyStateSpacing() {
|
|
464
|
+
const startTime = Date.now();
|
|
465
|
+
const issues = [];
|
|
466
|
+
const files = await this.getFiles();
|
|
467
|
+
for (const file of files) {
|
|
468
|
+
const content = fs.readFileSync(file, "utf8");
|
|
469
|
+
const lines = content.split("\n");
|
|
470
|
+
lines.forEach((line, index) => {
|
|
471
|
+
// Check for empty state patterns (common indicators)
|
|
472
|
+
const isEmptyStateStart = /(?:EmptyState|NoResults|NoData|Empty|NotFound)/.test(line) ||
|
|
473
|
+
/className=["'][^"']*(?:empty|no-results)/.test(line);
|
|
474
|
+
if (isEmptyStateStart || /<Box[^>]*>/.test(line)) {
|
|
475
|
+
const blockContext = lines.slice(index, Math.min(index + 20, lines.length)).join("\n");
|
|
476
|
+
// Detect empty state pattern: icon + text + optional action
|
|
477
|
+
const hasEmptyIcon = /(?:Inbox|Search|FileX|AlertCircle|Package)(?:Icon)?/.test(blockContext) ||
|
|
478
|
+
/lucide-react/.test(blockContext);
|
|
479
|
+
const hasEmptyText = /(?:No |Nothing |Empty|not found|no results)/i.test(blockContext);
|
|
480
|
+
if (hasEmptyIcon && hasEmptyText) {
|
|
481
|
+
// Check for proper centering
|
|
482
|
+
const hasCentering = /(?:items-center|justify-center|text-center|mx-auto)/.test(blockContext) ||
|
|
483
|
+
/(?:alignItems|justifyContent):\s*["']center["']/.test(blockContext);
|
|
484
|
+
const hasVerticalPadding = /(?:py-|pt-|pb-)\d+/.test(blockContext) ||
|
|
485
|
+
/(?:paddingTop|paddingBottom|padding):\s*["']var\(--spacing/.test(blockContext);
|
|
486
|
+
if (!hasCentering) {
|
|
487
|
+
issues.push({
|
|
488
|
+
file,
|
|
489
|
+
line: index + 1,
|
|
490
|
+
type: "empty-state-no-centering",
|
|
491
|
+
severity: "warning",
|
|
492
|
+
message: "Empty state lacks proper centering",
|
|
493
|
+
suggestion: 'Add className="flex flex-col items-center justify-center text-center"',
|
|
494
|
+
snippet: line.trim().substring(0, 80),
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
if (!hasVerticalPadding) {
|
|
498
|
+
issues.push({
|
|
499
|
+
file,
|
|
500
|
+
line: index + 1,
|
|
501
|
+
type: "empty-state-no-padding",
|
|
502
|
+
severity: "info",
|
|
503
|
+
message: "Empty state may need vertical padding for visual balance",
|
|
504
|
+
suggestion: 'Add className="py-12" or similar for proper vertical spacing',
|
|
505
|
+
snippet: line.trim().substring(0, 80),
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
// Check for UnifiedEmptyState usage (should be preferred)
|
|
511
|
+
if (/(?:No |Nothing |Empty|not found)/i.test(line) && /<Typography/.test(line)) {
|
|
512
|
+
const blockContext = lines.slice(index, Math.min(index + 10, lines.length)).join("\n");
|
|
513
|
+
const usesUnifiedEmptyState = /UnifiedEmptyState/.test(content);
|
|
514
|
+
if (!usesUnifiedEmptyState && /variant=["'](?:h6|body1)["']/.test(blockContext)) {
|
|
515
|
+
issues.push({
|
|
516
|
+
file,
|
|
517
|
+
line: index + 1,
|
|
518
|
+
type: "empty-state-not-unified",
|
|
519
|
+
severity: "info",
|
|
520
|
+
message: "Consider using UnifiedEmptyState component for consistency",
|
|
521
|
+
suggestion: 'Import and use <UnifiedEmptyState title="..." /> for standardized empty states',
|
|
522
|
+
snippet: line.trim().substring(0, 80),
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
return {
|
|
529
|
+
name: "Empty State Spacing",
|
|
530
|
+
passed: true,
|
|
531
|
+
blocking: true,
|
|
532
|
+
issues,
|
|
533
|
+
duration: Date.now() - startTime,
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* 6. Loading State Spacing
|
|
538
|
+
* - Skeleton loaders with different spacing than actual content
|
|
539
|
+
* - Loading states that cause layout shift
|
|
540
|
+
*/
|
|
541
|
+
async checkLoadingStateSpacing() {
|
|
542
|
+
const startTime = Date.now();
|
|
543
|
+
const issues = [];
|
|
544
|
+
const files = await this.getFiles();
|
|
545
|
+
for (const file of files) {
|
|
546
|
+
const content = fs.readFileSync(file, "utf8");
|
|
547
|
+
if (!content.includes("Skeleton") && !content.includes("loading"))
|
|
548
|
+
continue;
|
|
549
|
+
const lines = content.split("\n");
|
|
550
|
+
lines.forEach((line, index) => {
|
|
551
|
+
// Check for Skeleton without explicit dimensions (causes layout shift)
|
|
552
|
+
if (/<(?:Skeleton|UnifiedSkeleton)\b/.test(line)) {
|
|
553
|
+
const skeletonContext = lines.slice(index, Math.min(index + 5, lines.length)).join("\n");
|
|
554
|
+
const hasWidth = /width[=:]/.test(skeletonContext);
|
|
555
|
+
const hasHeight = /height[=:]/.test(skeletonContext);
|
|
556
|
+
const isTextVariant = /variant=["']text["']/.test(skeletonContext);
|
|
557
|
+
const isCircularVariant = /variant=["']circular["']/.test(skeletonContext);
|
|
558
|
+
// Text skeletons need width, circular need both, rectangular need both
|
|
559
|
+
if (!isTextVariant && !isCircularVariant && (!hasWidth || !hasHeight)) {
|
|
560
|
+
issues.push({
|
|
561
|
+
file,
|
|
562
|
+
line: index + 1,
|
|
563
|
+
type: "skeleton-missing-dimensions",
|
|
564
|
+
severity: "warning",
|
|
565
|
+
message: "Skeleton without explicit dimensions may cause layout shift",
|
|
566
|
+
suggestion: "Add width and height props to prevent content jumping",
|
|
567
|
+
snippet: line.trim().substring(0, 80),
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
if (isCircularVariant && (!hasWidth || !hasHeight)) {
|
|
571
|
+
issues.push({
|
|
572
|
+
file,
|
|
573
|
+
line: index + 1,
|
|
574
|
+
type: "skeleton-circular-no-size",
|
|
575
|
+
severity: "warning",
|
|
576
|
+
message: "Circular skeleton needs width and height for proper sizing",
|
|
577
|
+
suggestion: "Add width={40} height={40} or similar dimensions",
|
|
578
|
+
snippet: line.trim().substring(0, 80),
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
// Check for loading containers without min-height (causes collapse)
|
|
583
|
+
if (/(?:isLoading|loading)\s*(?:&&|\?)/.test(line)) {
|
|
584
|
+
const loadingBlock = lines.slice(index, Math.min(index + 20, lines.length)).join("\n");
|
|
585
|
+
const hasMinHeight = /min-h-|minHeight/.test(loadingBlock);
|
|
586
|
+
const hasFixedHeight = /h-\[|height:/.test(loadingBlock);
|
|
587
|
+
// Loading states should maintain container height
|
|
588
|
+
if (!hasMinHeight && !hasFixedHeight) {
|
|
589
|
+
const hasSkeleton = /Skeleton/.test(loadingBlock);
|
|
590
|
+
if (hasSkeleton) {
|
|
591
|
+
issues.push({
|
|
592
|
+
file,
|
|
593
|
+
line: index + 1,
|
|
594
|
+
type: "loading-no-min-height",
|
|
595
|
+
severity: "info",
|
|
596
|
+
message: "Loading state container may collapse without min-height",
|
|
597
|
+
suggestion: "Add min-h-[200px] or similar to prevent layout shift",
|
|
598
|
+
snippet: line.trim().substring(0, 80),
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
// Check for loading.tsx files with different grid structure than page
|
|
604
|
+
if (file.endsWith("loading.tsx")) {
|
|
605
|
+
const hasGrid = /grid-cols-/.test(content);
|
|
606
|
+
const gridMatch = content.match(/grid-cols-(\d+)/g);
|
|
607
|
+
if (gridMatch && gridMatch.length > 0) {
|
|
608
|
+
// Check if responsive breakpoints match typical page patterns
|
|
609
|
+
const hasResponsiveGrid = /(?:sm|md|lg|xl):grid-cols-/.test(content);
|
|
610
|
+
if (!hasResponsiveGrid && hasGrid) {
|
|
611
|
+
issues.push({
|
|
612
|
+
file,
|
|
613
|
+
line: 1,
|
|
614
|
+
type: "loading-grid-not-responsive",
|
|
615
|
+
severity: "info",
|
|
616
|
+
message: "Loading skeleton grid may not match page responsive breakpoints",
|
|
617
|
+
suggestion: "Ensure loading.tsx grid matches page.tsx responsive columns",
|
|
618
|
+
snippet: "loading.tsx",
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
return {
|
|
626
|
+
name: "Loading State Spacing",
|
|
627
|
+
passed: true,
|
|
628
|
+
blocking: true,
|
|
629
|
+
issues,
|
|
630
|
+
duration: Date.now() - startTime,
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* 7. Alert/Banner Spacing
|
|
635
|
+
* - Alerts without proper margin from surrounding content
|
|
636
|
+
* - Multiple alerts stacked without consistent gap
|
|
637
|
+
*/
|
|
638
|
+
async checkAlertSpacing() {
|
|
639
|
+
const startTime = Date.now();
|
|
640
|
+
const issues = [];
|
|
641
|
+
const files = await this.getFiles();
|
|
642
|
+
for (const file of files) {
|
|
643
|
+
const content = fs.readFileSync(file, "utf8");
|
|
644
|
+
if (!content.includes("<Alert"))
|
|
645
|
+
continue;
|
|
646
|
+
const lines = content.split("\n");
|
|
647
|
+
let alertCount = 0;
|
|
648
|
+
let lastAlertLine = -1;
|
|
649
|
+
lines.forEach((line, index) => {
|
|
650
|
+
if (/<Alert\b/.test(line)) {
|
|
651
|
+
alertCount++;
|
|
652
|
+
// Check for Alert without margin
|
|
653
|
+
const alertContext = lines.slice(index, Math.min(index + 5, lines.length)).join("\n");
|
|
654
|
+
const hasMargin = /className=["'][^"']*m[btlrxy]-\d/.test(alertContext) ||
|
|
655
|
+
/style=\{[^}]*margin/.test(alertContext);
|
|
656
|
+
// Check what comes before/after
|
|
657
|
+
const linesBefore = lines.slice(Math.max(0, index - 3), index).join("\n");
|
|
658
|
+
const linesAfter = lines.slice(index + 1, Math.min(index + 5, lines.length)).join("\n");
|
|
659
|
+
const hasContentBefore = /<(?:Typography|Box|div|form|Card)/.test(linesBefore);
|
|
660
|
+
const hasContentAfter = /<(?:Typography|Box|div|form|Card|TextField)/.test(linesAfter);
|
|
661
|
+
// Alert between content needs margin
|
|
662
|
+
if ((hasContentBefore || hasContentAfter) && !hasMargin) {
|
|
663
|
+
issues.push({
|
|
664
|
+
file,
|
|
665
|
+
line: index + 1,
|
|
666
|
+
type: "alert-no-margin",
|
|
667
|
+
severity: "warning",
|
|
668
|
+
message: "Alert without margin may crowd surrounding content",
|
|
669
|
+
suggestion: 'Add className="mb-4" or "my-4" for proper spacing',
|
|
670
|
+
snippet: line.trim().substring(0, 80),
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
// Check for stacked alerts without consistent gap
|
|
674
|
+
if (lastAlertLine >= 0 && index - lastAlertLine <= 5) {
|
|
675
|
+
const betweenAlerts = lines.slice(lastAlertLine + 1, index).join("\n");
|
|
676
|
+
const hasGapBetween = /className=["'][^"']*(?:space-y-|gap-)/.test(linesBefore) ||
|
|
677
|
+
/mb-\d/.test(betweenAlerts);
|
|
678
|
+
if (!hasGapBetween) {
|
|
679
|
+
issues.push({
|
|
680
|
+
file,
|
|
681
|
+
line: index + 1,
|
|
682
|
+
type: "stacked-alerts-no-gap",
|
|
683
|
+
severity: "info",
|
|
684
|
+
message: "Stacked alerts without consistent gap",
|
|
685
|
+
suggestion: 'Wrap alerts in <Stack spacing={2}> or add className="space-y-2"',
|
|
686
|
+
snippet: line.trim().substring(0, 80),
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
lastAlertLine = index;
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
// Check for multiple alerts that should use a container
|
|
694
|
+
if (alertCount >= 3) {
|
|
695
|
+
const hasAlertContainer = /className=["'][^"']*(?:space-y-|gap-)/.test(content) ||
|
|
696
|
+
/<Stack[^>]*spacing/.test(content);
|
|
697
|
+
if (!hasAlertContainer) {
|
|
698
|
+
issues.push({
|
|
699
|
+
file,
|
|
700
|
+
line: 1,
|
|
701
|
+
type: "multiple-alerts-no-container",
|
|
702
|
+
severity: "info",
|
|
703
|
+
message: `File has ${alertCount} alerts - consider using a spacing container`,
|
|
704
|
+
suggestion: "Group alerts in <Stack spacing={2}> for consistent spacing",
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
return {
|
|
710
|
+
name: "Alert/Banner Spacing",
|
|
711
|
+
passed: true,
|
|
712
|
+
blocking: true,
|
|
713
|
+
issues,
|
|
714
|
+
duration: Date.now() - startTime,
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* 8. Accordion Content Spacing
|
|
719
|
+
* - AccordionSummary with icons but no gap
|
|
720
|
+
* - AccordionDetails with nested accordions lacking proper indentation
|
|
721
|
+
*/
|
|
722
|
+
async checkAccordionSpacing() {
|
|
723
|
+
const startTime = Date.now();
|
|
724
|
+
const issues = [];
|
|
725
|
+
const files = await this.getFiles();
|
|
726
|
+
for (const file of files) {
|
|
727
|
+
const content = fs.readFileSync(file, "utf8");
|
|
728
|
+
if (!content.includes("<Accordion"))
|
|
729
|
+
continue;
|
|
730
|
+
const lines = content.split("\n");
|
|
731
|
+
lines.forEach((line, index) => {
|
|
732
|
+
// Check AccordionSummary with icon but no gap
|
|
733
|
+
if (/<AccordionSummary/.test(line)) {
|
|
734
|
+
const summaryBlock = lines.slice(index, Math.min(index + 15, lines.length)).join("\n");
|
|
735
|
+
const summaryEnd = summaryBlock.indexOf("</AccordionSummary>");
|
|
736
|
+
const summaryContent = summaryEnd > 0 ? summaryBlock.substring(0, summaryEnd) : summaryBlock;
|
|
737
|
+
// Check for icon + text pattern
|
|
738
|
+
const hasIcon = /Icon|<svg|lucide/.test(summaryContent);
|
|
739
|
+
const hasText = /<Typography|<span|<div/.test(summaryContent);
|
|
740
|
+
const hasGap = /gap-\d|space-x-\d|className=["'][^"']*gap/.test(summaryContent) ||
|
|
741
|
+
/style=\{[^}]*gap/.test(summaryContent);
|
|
742
|
+
if (hasIcon && hasText && !hasGap) {
|
|
743
|
+
// Check if wrapped in flex container
|
|
744
|
+
const hasFlexWrapper = /className=["'][^"']*flex/.test(summaryContent);
|
|
745
|
+
if (hasFlexWrapper) {
|
|
746
|
+
issues.push({
|
|
747
|
+
file,
|
|
748
|
+
line: index + 1,
|
|
749
|
+
type: "accordion-summary-no-gap",
|
|
750
|
+
severity: "warning",
|
|
751
|
+
message: "AccordionSummary has icon and text in flex container without gap",
|
|
752
|
+
suggestion: `Add gap-${design_tokens_1.GAPS.iconTextTight} or gap-${design_tokens_1.GAPS.iconText} to flex container for proper icon-text spacing`,
|
|
753
|
+
snippet: line.trim().substring(0, 80),
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
// Check AccordionDetails for nested accordions
|
|
759
|
+
if (/<AccordionDetails/.test(line)) {
|
|
760
|
+
const detailsBlock = lines.slice(index, Math.min(index + 50, lines.length)).join("\n");
|
|
761
|
+
const detailsEnd = detailsBlock.indexOf("</AccordionDetails>");
|
|
762
|
+
const detailsContent = detailsEnd > 0 ? detailsBlock.substring(0, detailsEnd) : detailsBlock;
|
|
763
|
+
// Check for nested Accordion
|
|
764
|
+
const hasNestedAccordion = /<Accordion\b/.test(detailsContent.substring(20)); // Skip opening tag
|
|
765
|
+
if (hasNestedAccordion) {
|
|
766
|
+
// Nested accordions should have indentation/margin
|
|
767
|
+
const hasIndentation = /(?:ml-|pl-|paddingLeft|marginLeft)\d/.test(detailsContent) ||
|
|
768
|
+
/className=["'][^"']*(?:ml-|pl-)/.test(detailsContent);
|
|
769
|
+
if (!hasIndentation) {
|
|
770
|
+
issues.push({
|
|
771
|
+
file,
|
|
772
|
+
line: index + 1,
|
|
773
|
+
type: "nested-accordion-no-indent",
|
|
774
|
+
severity: "info",
|
|
775
|
+
message: "Nested accordion without indentation may confuse hierarchy",
|
|
776
|
+
suggestion: 'Add className="ml-4" or "pl-4" to nested accordion container',
|
|
777
|
+
snippet: line.trim().substring(0, 80),
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
// Check for AccordionDetails starting with form fields (needs top margin)
|
|
782
|
+
const startsWithForm = /^[\s\n]*<(?:TextField|Select|Grid|form)/m.test(detailsContent.substring(20));
|
|
783
|
+
const hasTopMargin = /marginTop|mt-|pt-/.test(detailsContent.substring(0, 100));
|
|
784
|
+
if (startsWithForm && !hasTopMargin) {
|
|
785
|
+
issues.push({
|
|
786
|
+
file,
|
|
787
|
+
line: index + 1,
|
|
788
|
+
type: "accordion-details-form-no-margin",
|
|
789
|
+
severity: "warning",
|
|
790
|
+
message: "AccordionDetails starts with form fields without top margin",
|
|
791
|
+
suggestion: 'Wrap content in <Box style={{ marginTop: "var(--spacing-4)" }}>',
|
|
792
|
+
snippet: line.trim().substring(0, 80),
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
return {
|
|
799
|
+
name: "Accordion Spacing",
|
|
800
|
+
passed: true,
|
|
801
|
+
blocking: true,
|
|
802
|
+
issues,
|
|
803
|
+
duration: Date.now() - startTime,
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* 9. Tab Panel Spacing
|
|
808
|
+
* - Tab panels with inconsistent padding
|
|
809
|
+
* - Tab content that starts with different element types having different spacing
|
|
810
|
+
*/
|
|
811
|
+
async checkTabPanelSpacing() {
|
|
812
|
+
const startTime = Date.now();
|
|
813
|
+
const issues = [];
|
|
814
|
+
const files = await this.getFiles();
|
|
815
|
+
for (const file of files) {
|
|
816
|
+
const content = fs.readFileSync(file, "utf8");
|
|
817
|
+
if (!content.includes("<Tab") && !content.includes("tabValue"))
|
|
818
|
+
continue;
|
|
819
|
+
const lines = content.split("\n");
|
|
820
|
+
// Track tab panel patterns for consistency
|
|
821
|
+
const tabPanelPaddings = [];
|
|
822
|
+
lines.forEach((line, index) => {
|
|
823
|
+
// Check for tab panel conditional rendering
|
|
824
|
+
if (/tabValue\s*===\s*\d+\s*&&/.test(line) || /value\s*===\s*\d+\s*&&/.test(line)) {
|
|
825
|
+
const panelBlock = lines.slice(index, Math.min(index + 30, lines.length)).join("\n");
|
|
826
|
+
// Extract padding from panel container
|
|
827
|
+
const paddingMatch = panelBlock.match(/className=["'][^"']*p-(\d+)/);
|
|
828
|
+
if (paddingMatch) {
|
|
829
|
+
tabPanelPaddings.push(paddingMatch[1]);
|
|
830
|
+
}
|
|
831
|
+
// Check if panel starts with form fields without header
|
|
832
|
+
const panelContent = panelBlock.split(/\{tabValue|\{value/)[0] || panelBlock;
|
|
833
|
+
const startsWithForm = /<(?:TextField|Select|Autocomplete|Grid[^>]*container)/.test(panelContent.substring(0, 200));
|
|
834
|
+
const hasHeader = /<Typography[^>]*variant=["']h[456]/.test(panelContent.substring(0, 200));
|
|
835
|
+
if (startsWithForm && !hasHeader) {
|
|
836
|
+
issues.push({
|
|
837
|
+
file,
|
|
838
|
+
line: index + 1,
|
|
839
|
+
type: "tab-panel-form-no-header",
|
|
840
|
+
severity: "info",
|
|
841
|
+
message: "Tab panel starts with form fields without section header",
|
|
842
|
+
suggestion: "Add a Typography header before form fields for context",
|
|
843
|
+
snippet: line.trim().substring(0, 80),
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
// Check TabPanel component usage
|
|
848
|
+
if (/<TabPanel/.test(line)) {
|
|
849
|
+
const panelContext = lines.slice(index, Math.min(index + 10, lines.length)).join("\n");
|
|
850
|
+
// Check for padding
|
|
851
|
+
const hasPadding = /className=["'][^"']*p-\d/.test(panelContext) ||
|
|
852
|
+
/style=\{[^}]*padding/.test(panelContext);
|
|
853
|
+
if (!hasPadding) {
|
|
854
|
+
issues.push({
|
|
855
|
+
file,
|
|
856
|
+
line: index + 1,
|
|
857
|
+
type: "tab-panel-no-padding",
|
|
858
|
+
severity: "info",
|
|
859
|
+
message: "TabPanel without explicit padding",
|
|
860
|
+
suggestion: 'Add className="p-4" or "p-6" for consistent panel padding',
|
|
861
|
+
snippet: line.trim().substring(0, 80),
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
// Check for Tabs without proper spacing from content below
|
|
866
|
+
if (/<Tabs\b/.test(line)) {
|
|
867
|
+
const afterTabs = lines.slice(index + 1, Math.min(index + 10, lines.length)).join("\n");
|
|
868
|
+
const tabsEndIndex = afterTabs.indexOf("</Tabs>");
|
|
869
|
+
if (tabsEndIndex > 0) {
|
|
870
|
+
const afterTabsClose = afterTabs.substring(tabsEndIndex + 7, tabsEndIndex + 100);
|
|
871
|
+
const hasSpacingAfter = /className=["'][^"']*(?:mt-|pt-)/.test(afterTabsClose) ||
|
|
872
|
+
/style=\{[^}]*(?:marginTop|paddingTop)/.test(afterTabsClose) ||
|
|
873
|
+
/<Box[^>]*className=["'][^"']*(?:mt-|pt-)/.test(afterTabsClose);
|
|
874
|
+
// Content after Tabs should have top spacing
|
|
875
|
+
if (!hasSpacingAfter && /<(?:Box|div|Card|Typography)/.test(afterTabsClose)) {
|
|
876
|
+
issues.push({
|
|
877
|
+
file,
|
|
878
|
+
line: index + 1,
|
|
879
|
+
type: "tabs-no-spacing-after",
|
|
880
|
+
severity: "info",
|
|
881
|
+
message: "Content after Tabs may need top spacing",
|
|
882
|
+
suggestion: "Add mt-4 or pt-4 to content container after Tabs",
|
|
883
|
+
snippet: line.trim().substring(0, 80),
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
// Check for inconsistent tab panel padding in same file
|
|
890
|
+
if (tabPanelPaddings.length >= 2) {
|
|
891
|
+
const uniquePaddings = [...new Set(tabPanelPaddings)];
|
|
892
|
+
if (uniquePaddings.length > 1) {
|
|
893
|
+
issues.push({
|
|
894
|
+
file,
|
|
895
|
+
line: 1,
|
|
896
|
+
type: "tab-panel-inconsistent-padding",
|
|
897
|
+
severity: "warning",
|
|
898
|
+
message: `Tab panels have inconsistent padding: p-${uniquePaddings.join(", p-")}`,
|
|
899
|
+
suggestion: "Use consistent padding across all tab panels",
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
return {
|
|
905
|
+
name: "Tab Panel Spacing",
|
|
906
|
+
passed: true,
|
|
907
|
+
blocking: true,
|
|
908
|
+
issues,
|
|
909
|
+
duration: Date.now() - startTime,
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* 10. Inline Form Elements
|
|
914
|
+
* - Label + Input on same line without proper gap
|
|
915
|
+
* - Inline form groups (like date range pickers) with inconsistent internal spacing
|
|
916
|
+
*/
|
|
917
|
+
async checkInlineFormSpacing() {
|
|
918
|
+
const startTime = Date.now();
|
|
919
|
+
const issues = [];
|
|
920
|
+
const files = await this.getFiles();
|
|
921
|
+
for (const file of files) {
|
|
922
|
+
const content = fs.readFileSync(file, "utf8");
|
|
923
|
+
const lines = content.split("\n");
|
|
924
|
+
lines.forEach((line, index) => {
|
|
925
|
+
// Check for inline label + input patterns
|
|
926
|
+
if (/<(?:label|Label)\b/.test(line)) {
|
|
927
|
+
const labelBlock = lines.slice(index, Math.min(index + 10, lines.length)).join("\n");
|
|
928
|
+
// Check if label and input are on same line or in flex container
|
|
929
|
+
const hasInlineInput = /<(?:input|Input|TextField|Select)/.test(labelBlock);
|
|
930
|
+
const isFlexRow = /className=["'][^"']*(?:flex|inline-flex)[^"']*(?:items-center|flex-row)/.test(labelBlock) || /display:\s*["']?flex/.test(labelBlock);
|
|
931
|
+
if (hasInlineInput && isFlexRow) {
|
|
932
|
+
const hasGap = /gap-\d|space-x-\d/.test(labelBlock) || /style=\{[^}]*gap/.test(labelBlock);
|
|
933
|
+
if (!hasGap) {
|
|
934
|
+
issues.push({
|
|
935
|
+
file,
|
|
936
|
+
line: index + 1,
|
|
937
|
+
type: "inline-label-input-no-gap",
|
|
938
|
+
severity: "warning",
|
|
939
|
+
message: "Inline label and input without gap",
|
|
940
|
+
suggestion: `Add gap-${design_tokens_1.GAPS.iconTextTight} or gap-${design_tokens_1.GAPS.iconText} to flex container`,
|
|
941
|
+
snippet: line.trim().substring(0, 80),
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
// Check for date range patterns (two date inputs side by side)
|
|
947
|
+
if (/(?:DatePicker|date|Date)/.test(line)) {
|
|
948
|
+
const dateBlock = lines.slice(index, Math.min(index + 15, lines.length)).join("\n");
|
|
949
|
+
// Look for "from/to" or "start/end" date patterns
|
|
950
|
+
const isDateRange = /(?:from|start|begin).*(?:to|end|until)/i.test(dateBlock) ||
|
|
951
|
+
/DatePicker[^]*DatePicker/.test(dateBlock);
|
|
952
|
+
if (isDateRange) {
|
|
953
|
+
const hasGap = /gap-\d|space-x-\d/.test(dateBlock);
|
|
954
|
+
const hasSeparator = /(?:—|–|-|to|${chars.arrow})/.test(dateBlock);
|
|
955
|
+
if (!hasGap && !hasSeparator) {
|
|
956
|
+
issues.push({
|
|
957
|
+
file,
|
|
958
|
+
line: index + 1,
|
|
959
|
+
type: "date-range-no-gap",
|
|
960
|
+
severity: "info",
|
|
961
|
+
message: "Date range inputs may need gap or separator",
|
|
962
|
+
suggestion: "Add gap-4 between date inputs or a visual separator",
|
|
963
|
+
snippet: line.trim().substring(0, 80),
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
// Check for inline form groups (multiple inputs in a row)
|
|
969
|
+
if (/className=["'][^"']*(?:flex|inline-flex)[^"']*(?:items-center|flex-row)/.test(line)) {
|
|
970
|
+
const flexBlock = lines.slice(index, Math.min(index + 20, lines.length)).join("\n");
|
|
971
|
+
// Count form inputs in this flex container
|
|
972
|
+
const inputCount = (flexBlock.match(/<(?:TextField|Select|Input|Autocomplete)/g) || [])
|
|
973
|
+
.length;
|
|
974
|
+
if (inputCount >= 2) {
|
|
975
|
+
const hasGap = /gap-\d/.test(line);
|
|
976
|
+
const hasSpaceX = /space-x-\d/.test(line);
|
|
977
|
+
if (!hasGap && !hasSpaceX) {
|
|
978
|
+
issues.push({
|
|
979
|
+
file,
|
|
980
|
+
line: index + 1,
|
|
981
|
+
type: "inline-form-group-no-gap",
|
|
982
|
+
severity: "warning",
|
|
983
|
+
message: `Inline form group with ${inputCount} inputs lacks gap`,
|
|
984
|
+
suggestion: `Add gap-${design_tokens_1.GAPS.iconText} or gap-${design_tokens_1.GAPS.formField} to flex container for proper input spacing`,
|
|
985
|
+
snippet: line.trim().substring(0, 80),
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
// Check for search + button inline patterns
|
|
991
|
+
if (/<TextField[^>]*(?:search|Search)/.test(line) ||
|
|
992
|
+
/placeholder=["'][^"']*[Ss]earch/.test(line)) {
|
|
993
|
+
const searchBlock = lines.slice(index, Math.min(index + 10, lines.length)).join("\n");
|
|
994
|
+
const hasAdjacentButton = /<Button/.test(searchBlock);
|
|
995
|
+
if (hasAdjacentButton) {
|
|
996
|
+
const linesBefore = lines.slice(Math.max(0, index - 3), index).join("\n");
|
|
997
|
+
const hasGapContainer = /gap-\d|space-x-\d/.test(linesBefore);
|
|
998
|
+
if (!hasGapContainer) {
|
|
999
|
+
issues.push({
|
|
1000
|
+
file,
|
|
1001
|
+
line: index + 1,
|
|
1002
|
+
type: "search-button-no-gap",
|
|
1003
|
+
severity: "info",
|
|
1004
|
+
message: "Search input with adjacent button may need gap container",
|
|
1005
|
+
suggestion: "Wrap in flex container with gap-2 for proper spacing",
|
|
1006
|
+
snippet: line.trim().substring(0, 80),
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
});
|
|
1012
|
+
}
|
|
1013
|
+
return {
|
|
1014
|
+
name: "Inline Form Elements",
|
|
1015
|
+
passed: true,
|
|
1016
|
+
blocking: true,
|
|
1017
|
+
issues,
|
|
1018
|
+
duration: Date.now() - startTime,
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Run all checks
|
|
1023
|
+
*/
|
|
1024
|
+
async runAll() {
|
|
1025
|
+
const startTime = Date.now();
|
|
1026
|
+
console.log(`\n${console_chars_1.emoji.target} ADVANCED UI SPACING PREFLIGHT`);
|
|
1027
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
1028
|
+
const checks = [];
|
|
1029
|
+
checks.push(await this.checkTableSpacing());
|
|
1030
|
+
checks.push(await this.checkDialogSpacing());
|
|
1031
|
+
checks.push(await this.checkButtonGroupConsistency());
|
|
1032
|
+
checks.push(await this.checkResponsiveGaps());
|
|
1033
|
+
checks.push(await this.checkEmptyStateSpacing());
|
|
1034
|
+
checks.push(await this.checkLoadingStateSpacing());
|
|
1035
|
+
checks.push(await this.checkAlertSpacing());
|
|
1036
|
+
checks.push(await this.checkAccordionSpacing());
|
|
1037
|
+
checks.push(await this.checkTabPanelSpacing());
|
|
1038
|
+
checks.push(await this.checkInlineFormSpacing());
|
|
1039
|
+
const totalDuration = Date.now() - startTime;
|
|
1040
|
+
const allIssues = checks.flatMap((c) => c.issues);
|
|
1041
|
+
const errors = allIssues.filter((i) => i.severity === "error").length;
|
|
1042
|
+
const warnings = allIssues.filter((i) => i.severity === "warning").length;
|
|
1043
|
+
const infos = allIssues.filter((i) => i.severity === "info").length;
|
|
1044
|
+
const blockingFailed = checks.some((c) => c.blocking && !c.passed);
|
|
1045
|
+
const summary = {
|
|
1046
|
+
total: checks.length,
|
|
1047
|
+
passed: checks.filter((c) => c.passed).length,
|
|
1048
|
+
failed: checks.filter((c) => !c.passed).length,
|
|
1049
|
+
errors,
|
|
1050
|
+
warnings,
|
|
1051
|
+
};
|
|
1052
|
+
// Print results
|
|
1053
|
+
checks.forEach((check) => {
|
|
1054
|
+
const icon = check.passed
|
|
1055
|
+
? `${console_chars_1.emoji.success}`
|
|
1056
|
+
: check.blocking
|
|
1057
|
+
? `${console_chars_1.emoji.error}`
|
|
1058
|
+
: `${console_chars_1.emoji.warning}`;
|
|
1059
|
+
console.log(`${icon} ${check.name} (${check.issues.length} issues, ${(check.duration / 1000).toFixed(1)}s)`);
|
|
1060
|
+
if (this.verbose && check.issues.length > 0) {
|
|
1061
|
+
check.issues.slice(0, 10).forEach((issue) => {
|
|
1062
|
+
const color = issue.severity === "error"
|
|
1063
|
+
? "\x1b[31m"
|
|
1064
|
+
: issue.severity === "warning"
|
|
1065
|
+
? "\x1b[33m"
|
|
1066
|
+
: "\x1b[36m";
|
|
1067
|
+
const reset = "\x1b[0m";
|
|
1068
|
+
console.log(` ${color}[${issue.severity.toUpperCase()}]${reset} ${issue.file}:${issue.line}`);
|
|
1069
|
+
console.log(` ${issue.message}`);
|
|
1070
|
+
if (issue.suggestion)
|
|
1071
|
+
console.log(` ${console_chars_1.chars.arrow} ${issue.suggestion}`);
|
|
1072
|
+
});
|
|
1073
|
+
if (check.issues.length > 10) {
|
|
1074
|
+
console.log(` ... and ${check.issues.length - 10} more issues`);
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1078
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
1079
|
+
console.log(`Errors: ${errors} | Warnings: ${warnings} | Info: ${infos} | Time: ${(totalDuration / 1000).toFixed(1)}s`);
|
|
1080
|
+
if (errors === 0 && warnings === 0) {
|
|
1081
|
+
console.log(`\n${console_chars_1.emoji.success} ADVANCED UI SPACING PASSED`);
|
|
1082
|
+
}
|
|
1083
|
+
else if (errors === 0) {
|
|
1084
|
+
console.log(`\n${console_chars_1.emoji.warning} ADVANCED UI SPACING - ${warnings} warning(s), ${infos} info(s)`);
|
|
1085
|
+
}
|
|
1086
|
+
else {
|
|
1087
|
+
console.log(`\n${console_chars_1.emoji.error} ADVANCED UI SPACING FAILED - ${errors} error(s)`);
|
|
1088
|
+
}
|
|
1089
|
+
return {
|
|
1090
|
+
module: "ui-advanced-spacing",
|
|
1091
|
+
passed: !blockingFailed,
|
|
1092
|
+
totalDuration,
|
|
1093
|
+
checks,
|
|
1094
|
+
summary,
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
/**
|
|
1098
|
+
* Print detailed results
|
|
1099
|
+
*/
|
|
1100
|
+
printResults(result) {
|
|
1101
|
+
result.checks.forEach((check) => {
|
|
1102
|
+
if (check.issues.length > 0) {
|
|
1103
|
+
console.log(`\n${console_chars_1.emoji.clipboard} ${check.name}:`);
|
|
1104
|
+
check.issues.forEach((issue) => {
|
|
1105
|
+
const color = issue.severity === "error"
|
|
1106
|
+
? "\x1b[31m"
|
|
1107
|
+
: issue.severity === "warning"
|
|
1108
|
+
? "\x1b[33m"
|
|
1109
|
+
: "\x1b[36m";
|
|
1110
|
+
const reset = "\x1b[0m";
|
|
1111
|
+
console.log(` ${color}[${issue.severity.toUpperCase()}]${reset} ${issue.file}:${issue.line}`);
|
|
1112
|
+
console.log(` ${issue.message}`);
|
|
1113
|
+
if (issue.suggestion)
|
|
1114
|
+
console.log(` ${console_chars_1.chars.arrow} ${issue.suggestion}`);
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
exports.UIAdvancedSpacingModule = UIAdvancedSpacingModule;
|
|
1121
|
+
async function main() {
|
|
1122
|
+
const reporter = (0, universal_progress_reporter_1.createUniversalProgressReporter)(path.basename(__filename, ".ts"));
|
|
1123
|
+
const args = process.argv.slice(2);
|
|
1124
|
+
const mode = args[0] || "all";
|
|
1125
|
+
const verbose = args.includes("--verbose") || args.includes("-v");
|
|
1126
|
+
const parallel = args.includes("--parallel") || args.includes("-p");
|
|
1127
|
+
const module = new UIAdvancedSpacingModule({ verbose, parallel });
|
|
1128
|
+
const runSingle = async (name, fn) => {
|
|
1129
|
+
console.log(`\n${console_chars_1.emoji.target} ADVANCED UI SPACING: ${name.toUpperCase()}`);
|
|
1130
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
1131
|
+
const check = await fn();
|
|
1132
|
+
const summary = {
|
|
1133
|
+
total: 1,
|
|
1134
|
+
passed: check.passed ? 1 : 0,
|
|
1135
|
+
failed: check.passed ? 0 : 1,
|
|
1136
|
+
errors: check.issues.filter((i) => i.severity === "error").length,
|
|
1137
|
+
warnings: check.issues.filter((i) => i.severity === "warning").length,
|
|
1138
|
+
};
|
|
1139
|
+
const icon = check.passed
|
|
1140
|
+
? `${console_chars_1.emoji.success}`
|
|
1141
|
+
: check.blocking
|
|
1142
|
+
? `${console_chars_1.emoji.error}`
|
|
1143
|
+
: `${console_chars_1.emoji.warning}`;
|
|
1144
|
+
console.log(`${icon} ${check.name} (${check.issues.length} issues, ${(check.duration / 1000).toFixed(1)}s)`);
|
|
1145
|
+
if (check.issues.length > 0) {
|
|
1146
|
+
check.issues.slice(0, 30).forEach((issue) => {
|
|
1147
|
+
const color = issue.severity === "error"
|
|
1148
|
+
? "\x1b[31m"
|
|
1149
|
+
: issue.severity === "warning"
|
|
1150
|
+
? "\x1b[33m"
|
|
1151
|
+
: "\x1b[36m";
|
|
1152
|
+
const reset = "\x1b[0m";
|
|
1153
|
+
console.log(` ${color}[${issue.severity.toUpperCase()}]${reset} ${issue.file}:${issue.line}`);
|
|
1154
|
+
console.log(` ${issue.message}`);
|
|
1155
|
+
if (issue.suggestion)
|
|
1156
|
+
console.log(` ${console_chars_1.chars.arrow} ${issue.suggestion}`);
|
|
1157
|
+
});
|
|
1158
|
+
if (check.issues.length > 30) {
|
|
1159
|
+
console.log(` ... and ${check.issues.length - 30} more issues`);
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
1163
|
+
console.log(`Errors: ${summary.errors} | Warnings: ${summary.warnings}`);
|
|
1164
|
+
console.log(check.passed
|
|
1165
|
+
? `\n${console_chars_1.emoji.success} PASSED`
|
|
1166
|
+
: `\n${check.blocking ? "${emoji.error} FAILED" : "${emoji.warning} WARNINGS"}`);
|
|
1167
|
+
return {
|
|
1168
|
+
module: `ui-advanced-spacing:${name}`,
|
|
1169
|
+
passed: check.passed,
|
|
1170
|
+
totalDuration: check.duration,
|
|
1171
|
+
checks: [check],
|
|
1172
|
+
summary,
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
let result;
|
|
1176
|
+
switch (mode) {
|
|
1177
|
+
case "tables":
|
|
1178
|
+
result = await runSingle("tables", () => module.checkTableSpacing());
|
|
1179
|
+
break;
|
|
1180
|
+
case "dialogs":
|
|
1181
|
+
result = await runSingle("dialogs", () => module.checkDialogSpacing());
|
|
1182
|
+
break;
|
|
1183
|
+
case "buttons":
|
|
1184
|
+
result = await runSingle("buttons", () => module.checkButtonGroupConsistency());
|
|
1185
|
+
break;
|
|
1186
|
+
case "responsive":
|
|
1187
|
+
result = await runSingle("responsive", () => module.checkResponsiveGaps());
|
|
1188
|
+
break;
|
|
1189
|
+
case "empty-states":
|
|
1190
|
+
result = await runSingle("empty-states", () => module.checkEmptyStateSpacing());
|
|
1191
|
+
break;
|
|
1192
|
+
case "loading":
|
|
1193
|
+
result = await runSingle("loading", () => module.checkLoadingStateSpacing());
|
|
1194
|
+
break;
|
|
1195
|
+
case "alerts":
|
|
1196
|
+
result = await runSingle("alerts", () => module.checkAlertSpacing());
|
|
1197
|
+
break;
|
|
1198
|
+
case "accordions":
|
|
1199
|
+
result = await runSingle("accordions", () => module.checkAccordionSpacing());
|
|
1200
|
+
break;
|
|
1201
|
+
case "tabs":
|
|
1202
|
+
result = await runSingle("tabs", () => module.checkTabPanelSpacing());
|
|
1203
|
+
break;
|
|
1204
|
+
case "inline-forms":
|
|
1205
|
+
result = await runSingle("inline-forms", () => module.checkInlineFormSpacing());
|
|
1206
|
+
break;
|
|
1207
|
+
default:
|
|
1208
|
+
result = await module.runAll();
|
|
1209
|
+
break;
|
|
1210
|
+
}
|
|
1211
|
+
// Print detailed results if verbose
|
|
1212
|
+
if (verbose) {
|
|
1213
|
+
module.printResults(result);
|
|
1214
|
+
}
|
|
1215
|
+
process.exit(result.passed ? 0 : 1);
|
|
1216
|
+
}
|
|
1217
|
+
if (require.main === module) {
|
|
1218
|
+
main();
|
|
1219
|
+
}
|
|
1220
|
+
//# sourceMappingURL=ui-advanced-spacing.js.map
|