@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,1018 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Comprehensive UI Consistency Preflight
|
|
5
|
+
*
|
|
6
|
+
* Additional consistency checks beyond the basic and advanced modules.
|
|
7
|
+
* These catch subtle patterns that affect visual harmony.
|
|
8
|
+
*
|
|
9
|
+
* Checks:
|
|
10
|
+
* 1. Card Elevation Consistency - Consistent shadow/elevation usage
|
|
11
|
+
* 2. Input Field Consistency - TextField variants, sizes, label patterns
|
|
12
|
+
* 3. Animation Duration Consistency - Standardized timing values
|
|
13
|
+
* 4. Z-Index Layer Consistency - Proper stacking context
|
|
14
|
+
* 5. Responsive Breakpoint Consistency - Consistent breakpoint usage
|
|
15
|
+
* 6. Color Token Consistency - Using design system colors
|
|
16
|
+
* 7. Font Weight Consistency - Consistent typography weights
|
|
17
|
+
* 8. Border Style Consistency - Consistent border patterns
|
|
18
|
+
*
|
|
19
|
+
* Usage:
|
|
20
|
+
* pnpm preflight:ui-consistency-comprehensive
|
|
21
|
+
* pnpm preflight:ui-consistency-comprehensive elevation
|
|
22
|
+
* pnpm preflight:ui-consistency-comprehensive inputs
|
|
23
|
+
* pnpm preflight:ui-consistency-comprehensive animations
|
|
24
|
+
* pnpm preflight:ui-consistency-comprehensive zindex
|
|
25
|
+
* pnpm preflight:ui-consistency-comprehensive breakpoints
|
|
26
|
+
* pnpm preflight:ui-consistency-comprehensive colors
|
|
27
|
+
* pnpm preflight:ui-consistency-comprehensive fonts
|
|
28
|
+
* pnpm preflight:ui-consistency-comprehensive borders
|
|
29
|
+
*/
|
|
30
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
31
|
+
if (k2 === undefined) k2 = k;
|
|
32
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
33
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
34
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
35
|
+
}
|
|
36
|
+
Object.defineProperty(o, k2, desc);
|
|
37
|
+
}) : (function(o, m, k, k2) {
|
|
38
|
+
if (k2 === undefined) k2 = k;
|
|
39
|
+
o[k2] = m[k];
|
|
40
|
+
}));
|
|
41
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
42
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
43
|
+
}) : function(o, v) {
|
|
44
|
+
o["default"] = v;
|
|
45
|
+
});
|
|
46
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
47
|
+
var ownKeys = function(o) {
|
|
48
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
49
|
+
var ar = [];
|
|
50
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
51
|
+
return ar;
|
|
52
|
+
};
|
|
53
|
+
return ownKeys(o);
|
|
54
|
+
};
|
|
55
|
+
return function (mod) {
|
|
56
|
+
if (mod && mod.__esModule) return mod;
|
|
57
|
+
var result = {};
|
|
58
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
59
|
+
__setModuleDefault(result, mod);
|
|
60
|
+
return result;
|
|
61
|
+
};
|
|
62
|
+
})();
|
|
63
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
64
|
+
const fs = __importStar(require("fs"));
|
|
65
|
+
const file_cache_1 = require("../../shared/file-cache");
|
|
66
|
+
const path = __importStar(require("path"));
|
|
67
|
+
const console_chars_1 = require("../../utils/console-chars");
|
|
68
|
+
const universal_progress_reporter_1 = require("../system/universal-progress-reporter");
|
|
69
|
+
const EXCLUDED_PATTERNS = [
|
|
70
|
+
"**/node_modules/**",
|
|
71
|
+
"**/.next/**",
|
|
72
|
+
"**/dist/**",
|
|
73
|
+
"**/build/**",
|
|
74
|
+
"**/*.test.tsx",
|
|
75
|
+
"**/*.spec.tsx",
|
|
76
|
+
"**/*.stories.tsx",
|
|
77
|
+
"**/*.examples.tsx",
|
|
78
|
+
"tests/**",
|
|
79
|
+
];
|
|
80
|
+
async function getAllTsxFiles() {
|
|
81
|
+
return await file_cache_1.fileCache.getAllTsxJsx();
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Check 1: Card Elevation Consistency
|
|
85
|
+
* Cards should use consistent elevation/shadow levels
|
|
86
|
+
*/
|
|
87
|
+
async function checkCardElevationConsistency() {
|
|
88
|
+
const issues = [];
|
|
89
|
+
const files = await getAllTsxFiles();
|
|
90
|
+
const elevationUsage = new Map();
|
|
91
|
+
for (const file of files) {
|
|
92
|
+
const content = fs.readFileSync(file, "utf8");
|
|
93
|
+
const lines = content.split("\n");
|
|
94
|
+
lines.forEach((line, index) => {
|
|
95
|
+
// Track Card elevation usage
|
|
96
|
+
if (/<Card\b/.test(line)) {
|
|
97
|
+
const cardBlock = lines.slice(index, Math.min(index + 10, lines.length)).join("\n");
|
|
98
|
+
// Check for elevation prop
|
|
99
|
+
const elevationMatch = cardBlock.match(/elevation=\{?(\d+)\}?/);
|
|
100
|
+
if (elevationMatch) {
|
|
101
|
+
const elevation = elevationMatch[1];
|
|
102
|
+
if (!elevationUsage.has(elevation)) {
|
|
103
|
+
elevationUsage.set(elevation, []);
|
|
104
|
+
}
|
|
105
|
+
elevationUsage.get(elevation).push({ file, line: index + 1 });
|
|
106
|
+
}
|
|
107
|
+
// Check for shadow classes
|
|
108
|
+
const shadowMatch = cardBlock.match(/shadow-(\w+)/);
|
|
109
|
+
if (shadowMatch) {
|
|
110
|
+
const shadow = `shadow-${shadowMatch[1]}`;
|
|
111
|
+
if (!elevationUsage.has(shadow)) {
|
|
112
|
+
elevationUsage.set(shadow, []);
|
|
113
|
+
}
|
|
114
|
+
elevationUsage.get(shadow).push({ file, line: index + 1 });
|
|
115
|
+
}
|
|
116
|
+
// Check for hardcoded boxShadow
|
|
117
|
+
if (/boxShadow:\s*["'][^"']+["']/.test(cardBlock) && !cardBlock.includes("var(--shadow")) {
|
|
118
|
+
issues.push({
|
|
119
|
+
file,
|
|
120
|
+
line: index + 1,
|
|
121
|
+
severity: "info",
|
|
122
|
+
rule: "card-hardcoded-shadow",
|
|
123
|
+
message: "Card with hardcoded boxShadow instead of design token",
|
|
124
|
+
suggestion: "Use shadow-sm, shadow-md, shadow-lg or var(--shadow-*) tokens",
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
// Report if too many different elevation levels
|
|
131
|
+
if (elevationUsage.size > 4) {
|
|
132
|
+
const sortedUsage = [...elevationUsage.entries()].sort((a, b) => b[1].length - a[1].length);
|
|
133
|
+
issues.push({
|
|
134
|
+
file: "codebase-wide",
|
|
135
|
+
line: 0,
|
|
136
|
+
severity: "info",
|
|
137
|
+
rule: "card-elevation-inconsistency",
|
|
138
|
+
message: `Cards use ${elevationUsage.size} different elevation levels: ${sortedUsage.map(([e, u]) => `${e}(${u.length})`).join(", ")}`,
|
|
139
|
+
suggestion: "Standardize on 2-3 elevation levels (e.g., 0, 1, 3)",
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
return issues;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Check 2: Input Field Consistency
|
|
146
|
+
* TextFields should use consistent variants and sizes
|
|
147
|
+
*/
|
|
148
|
+
async function checkInputFieldConsistency() {
|
|
149
|
+
const issues = [];
|
|
150
|
+
const files = await getAllTsxFiles();
|
|
151
|
+
const variantUsage = new Map();
|
|
152
|
+
const sizeUsage = new Map();
|
|
153
|
+
for (const file of files) {
|
|
154
|
+
const content = fs.readFileSync(file, "utf8");
|
|
155
|
+
const lines = content.split("\n");
|
|
156
|
+
lines.forEach((line, index) => {
|
|
157
|
+
if (/<TextField\b/.test(line)) {
|
|
158
|
+
const fieldBlock = lines.slice(index, Math.min(index + 10, lines.length)).join("\n");
|
|
159
|
+
// Track variant usage
|
|
160
|
+
const variantMatch = fieldBlock.match(/variant=["'](\w+)["']/);
|
|
161
|
+
if (variantMatch) {
|
|
162
|
+
variantUsage.set(variantMatch[1], (variantUsage.get(variantMatch[1]) || 0) + 1);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
variantUsage.set("default", (variantUsage.get("default") || 0) + 1);
|
|
166
|
+
}
|
|
167
|
+
// Track size usage
|
|
168
|
+
const sizeMatch = fieldBlock.match(/size=["'](\w+)["']/);
|
|
169
|
+
if (sizeMatch) {
|
|
170
|
+
sizeUsage.set(sizeMatch[1], (sizeUsage.get(sizeMatch[1]) || 0) + 1);
|
|
171
|
+
}
|
|
172
|
+
// Check for inconsistent label patterns in same file
|
|
173
|
+
const hasLabel = /\blabel=/.test(fieldBlock);
|
|
174
|
+
const hasPlaceholder = /placeholder=/.test(fieldBlock);
|
|
175
|
+
const hasInputLabel = /<InputLabel/.test(content);
|
|
176
|
+
if (hasLabel && hasInputLabel) {
|
|
177
|
+
issues.push({
|
|
178
|
+
file,
|
|
179
|
+
line: index + 1,
|
|
180
|
+
severity: "info",
|
|
181
|
+
rule: "mixed-label-patterns",
|
|
182
|
+
message: "File mixes TextField label prop with InputLabel component",
|
|
183
|
+
suggestion: "Use consistent label pattern (prefer TextField label prop)",
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
// Report variant inconsistency
|
|
190
|
+
if (variantUsage.size > 2) {
|
|
191
|
+
const sorted = [...variantUsage.entries()].sort((a, b) => b[1] - a[1]);
|
|
192
|
+
issues.push({
|
|
193
|
+
file: "codebase-wide",
|
|
194
|
+
line: 0,
|
|
195
|
+
severity: "info",
|
|
196
|
+
rule: "textfield-variant-inconsistency",
|
|
197
|
+
message: `TextFields use ${variantUsage.size} variants: ${sorted.map(([v, c]) => `${v}(${c})`).join(", ")}`,
|
|
198
|
+
suggestion: "Standardize on outlined variant for most forms",
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
return issues;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Check 3: Animation Duration Consistency
|
|
205
|
+
* Animations should use consistent timing values
|
|
206
|
+
*/
|
|
207
|
+
async function checkAnimationDurationConsistency() {
|
|
208
|
+
const issues = [];
|
|
209
|
+
const files = await getAllTsxFiles();
|
|
210
|
+
const durations = new Map();
|
|
211
|
+
// Standard durations (in ms)
|
|
212
|
+
const STANDARD_DURATIONS = new Set(["100", "150", "200", "300", "500", "700", "1000"]);
|
|
213
|
+
for (const file of files) {
|
|
214
|
+
const content = fs.readFileSync(file, "utf8");
|
|
215
|
+
const lines = content.split("\n");
|
|
216
|
+
lines.forEach((line, index) => {
|
|
217
|
+
// Check for duration in Tailwind classes
|
|
218
|
+
const tailwindDuration = line.match(/duration-(\d+)/g);
|
|
219
|
+
if (tailwindDuration) {
|
|
220
|
+
tailwindDuration.forEach((d) => {
|
|
221
|
+
const ms = d.replace("duration-", "");
|
|
222
|
+
if (!durations.has(ms))
|
|
223
|
+
durations.set(ms, []);
|
|
224
|
+
durations.get(ms).push({ file, line: index + 1 });
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
// Check for hardcoded transition durations
|
|
228
|
+
const hardcodedMatch = line.match(/transition[^:]*:\s*[^;]*(\d+(?:\.\d+)?)(ms|s)/g);
|
|
229
|
+
if (hardcodedMatch) {
|
|
230
|
+
hardcodedMatch.forEach((match) => {
|
|
231
|
+
const durationMatch = match.match(/(\d+(?:\.\d+)?)(ms|s)/);
|
|
232
|
+
if (durationMatch) {
|
|
233
|
+
let ms = durationMatch[2] === "s"
|
|
234
|
+
? String(parseFloat(durationMatch[1]) * 1000)
|
|
235
|
+
: durationMatch[1];
|
|
236
|
+
// Skip if using design token
|
|
237
|
+
if (!line.includes("var(--transition")) {
|
|
238
|
+
if (!STANDARD_DURATIONS.has(ms)) {
|
|
239
|
+
issues.push({
|
|
240
|
+
file,
|
|
241
|
+
line: index + 1,
|
|
242
|
+
severity: "info",
|
|
243
|
+
rule: "non-standard-duration",
|
|
244
|
+
message: `Non-standard animation duration: ${ms}ms`,
|
|
245
|
+
suggestion: "Use standard durations: 150ms (fast), 200ms (normal), 300ms (slow)",
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
return issues;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Check 4: Z-Index Layer Consistency
|
|
258
|
+
* Z-index values should follow a consistent scale
|
|
259
|
+
*/
|
|
260
|
+
async function checkZIndexConsistency() {
|
|
261
|
+
const issues = [];
|
|
262
|
+
const files = await getAllTsxFiles();
|
|
263
|
+
const zIndexValues = new Map();
|
|
264
|
+
// Standard z-index scale
|
|
265
|
+
const STANDARD_ZINDEX = new Set([
|
|
266
|
+
"0",
|
|
267
|
+
"10",
|
|
268
|
+
"20",
|
|
269
|
+
"30",
|
|
270
|
+
"40",
|
|
271
|
+
"50",
|
|
272
|
+
"100",
|
|
273
|
+
"999",
|
|
274
|
+
"1000",
|
|
275
|
+
"9999",
|
|
276
|
+
]);
|
|
277
|
+
for (const file of files) {
|
|
278
|
+
const content = fs.readFileSync(file, "utf8");
|
|
279
|
+
const lines = content.split("\n");
|
|
280
|
+
lines.forEach((line, index) => {
|
|
281
|
+
// Check for z-index in Tailwind
|
|
282
|
+
const tailwindZ = line.match(/\bz-(\d+)/g);
|
|
283
|
+
if (tailwindZ) {
|
|
284
|
+
tailwindZ.forEach((z) => {
|
|
285
|
+
const value = z.replace("z-", "");
|
|
286
|
+
if (!zIndexValues.has(value))
|
|
287
|
+
zIndexValues.set(value, []);
|
|
288
|
+
zIndexValues.get(value).push({ file, line: index + 1 });
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
// Check for hardcoded zIndex in style
|
|
292
|
+
const styleZ = line.match(/zIndex:\s*(\d+)/);
|
|
293
|
+
if (styleZ && !line.includes("var(--z-")) {
|
|
294
|
+
const value = styleZ[1];
|
|
295
|
+
if (!STANDARD_ZINDEX.has(value) && parseInt(value) > 10) {
|
|
296
|
+
issues.push({
|
|
297
|
+
file,
|
|
298
|
+
line: index + 1,
|
|
299
|
+
severity: "info",
|
|
300
|
+
rule: "non-standard-zindex",
|
|
301
|
+
message: `Non-standard z-index value: ${value}`,
|
|
302
|
+
suggestion: "Use z-index tokens: 10 (dropdown), 20 (sticky), 30 (fixed), 40 (modal), 50 (tooltip)",
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
// Report if too many different z-index values
|
|
309
|
+
if (zIndexValues.size > 8) {
|
|
310
|
+
const sorted = [...zIndexValues.entries()].sort((a, b) => parseInt(a[0]) - parseInt(b[0]));
|
|
311
|
+
issues.push({
|
|
312
|
+
file: "codebase-wide",
|
|
313
|
+
line: 0,
|
|
314
|
+
severity: "info",
|
|
315
|
+
rule: "zindex-proliferation",
|
|
316
|
+
message: `${zIndexValues.size} different z-index values used: ${sorted.map(([z]) => z).join(", ")}`,
|
|
317
|
+
suggestion: "Consolidate to standard scale: 10, 20, 30, 40, 50",
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
return issues;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Check 5: Responsive Breakpoint Consistency
|
|
324
|
+
* Breakpoints should be used consistently
|
|
325
|
+
*/
|
|
326
|
+
async function checkBreakpointConsistency() {
|
|
327
|
+
const issues = [];
|
|
328
|
+
const files = await getAllTsxFiles();
|
|
329
|
+
const breakpointUsage = new Map();
|
|
330
|
+
for (const file of files) {
|
|
331
|
+
const content = fs.readFileSync(file, "utf8");
|
|
332
|
+
const lines = content.split("\n");
|
|
333
|
+
lines.forEach((line, index) => {
|
|
334
|
+
// Track Tailwind breakpoint usage
|
|
335
|
+
const breakpoints = line.match(/\b(sm|md|lg|xl|2xl):/g);
|
|
336
|
+
if (breakpoints) {
|
|
337
|
+
breakpoints.forEach((bp) => {
|
|
338
|
+
const clean = bp.replace(":", "");
|
|
339
|
+
breakpointUsage.set(clean, (breakpointUsage.get(clean) || 0) + 1);
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
// Check for hardcoded media queries
|
|
343
|
+
if (/@media\s*\([^)]*\d+px/.test(line)) {
|
|
344
|
+
const pxMatch = line.match(/@media\s*\([^)]*(\d+)px/);
|
|
345
|
+
if (pxMatch) {
|
|
346
|
+
const px = parseInt(pxMatch[1]);
|
|
347
|
+
// Check if it matches Tailwind breakpoints
|
|
348
|
+
const tailwindBreakpoints = { 640: "sm", 768: "md", 1024: "lg", 1280: "xl", 1536: "2xl" };
|
|
349
|
+
if (!Object.keys(tailwindBreakpoints).includes(String(px))) {
|
|
350
|
+
issues.push({
|
|
351
|
+
file,
|
|
352
|
+
line: index + 1,
|
|
353
|
+
severity: "info",
|
|
354
|
+
rule: "non-standard-breakpoint",
|
|
355
|
+
message: `Non-standard breakpoint: ${px}px`,
|
|
356
|
+
suggestion: "Use Tailwind breakpoints: sm(640), md(768), lg(1024), xl(1280), 2xl(1536)",
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
// Check for skipped breakpoints (e.g., sm: then xl: without md: or lg:)
|
|
362
|
+
if (/\bsm:/.test(line) && /\bxl:/.test(line) && !/\b(md|lg):/.test(line)) {
|
|
363
|
+
issues.push({
|
|
364
|
+
file,
|
|
365
|
+
line: index + 1,
|
|
366
|
+
severity: "info",
|
|
367
|
+
rule: "skipped-breakpoints",
|
|
368
|
+
message: "Responsive classes skip intermediate breakpoints (sm ${chars.arrow} xl)",
|
|
369
|
+
suggestion: "Consider adding md: or lg: for smoother responsive behavior",
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
return issues;
|
|
375
|
+
}
|
|
376
|
+
async function checkColorTokenConsistency() {
|
|
377
|
+
const issues = [];
|
|
378
|
+
const files = await getAllTsxFiles();
|
|
379
|
+
const HARDCODED_PATTERNS = [
|
|
380
|
+
{ pattern: /#[0-9a-fA-F]{3,6}/, name: "Hex Color" },
|
|
381
|
+
{ pattern: /rgb\([\d\s,]+\)/, name: "RGB Color" },
|
|
382
|
+
{ pattern: /rgba\([\d\s,.]+\)/, name: "RGBA Color" },
|
|
383
|
+
{ pattern: /hsl\([\d\s,]+\)/, name: "HSL Color" },
|
|
384
|
+
];
|
|
385
|
+
// Colors that are "impure" because they aren't semantic
|
|
386
|
+
// e.g. bg-gray-100 is "impure", bg-background or bg-card is "pure"
|
|
387
|
+
// We want to verify usage of semantic tokens: primary, secondary, accent, success, warning, error, info, background, surface, etc.
|
|
388
|
+
// AND neutral grays (gray-50 etc) should often be replaced by 'muted', 'card', 'popover' etc if possible, but might be acceptable relative to "pure" requests.
|
|
389
|
+
// HOWEVER, the user asked for purity. Usually this means Semantic Tokens.
|
|
390
|
+
const GENERIC_TW_COLORS = [
|
|
391
|
+
"slate",
|
|
392
|
+
"gray",
|
|
393
|
+
"zinc",
|
|
394
|
+
"neutral",
|
|
395
|
+
"stone",
|
|
396
|
+
"red",
|
|
397
|
+
"orange",
|
|
398
|
+
"amber",
|
|
399
|
+
"yellow",
|
|
400
|
+
"lime",
|
|
401
|
+
"green",
|
|
402
|
+
"emerald",
|
|
403
|
+
"teal",
|
|
404
|
+
"cyan",
|
|
405
|
+
"sky",
|
|
406
|
+
"blue",
|
|
407
|
+
"indigo",
|
|
408
|
+
"violet",
|
|
409
|
+
"purple",
|
|
410
|
+
"fuchsia",
|
|
411
|
+
"pink",
|
|
412
|
+
"rose",
|
|
413
|
+
];
|
|
414
|
+
const EXCEPTIONS = ["transparent", "current", "inherit", "black", "white", "currentColor"];
|
|
415
|
+
for (const file of files) {
|
|
416
|
+
const content = fs.readFileSync(file, "utf8");
|
|
417
|
+
const lines = content.split("\n");
|
|
418
|
+
lines.forEach((line, index) => {
|
|
419
|
+
// Skip comments
|
|
420
|
+
if (line.trim().startsWith("//") ||
|
|
421
|
+
line.trim().startsWith("*") ||
|
|
422
|
+
line.trim().startsWith("/*"))
|
|
423
|
+
return;
|
|
424
|
+
// 1. Check for Hardcoded Values (Hex, RGB)
|
|
425
|
+
for (const { pattern, name } of HARDCODED_PATTERNS) {
|
|
426
|
+
if (pattern.test(line)) {
|
|
427
|
+
// Check if it's inside a var(...) or part of a defined token
|
|
428
|
+
if (line.includes("var(--"))
|
|
429
|
+
return;
|
|
430
|
+
// Loose check to avoid flagging things inside strings/content (approximate)
|
|
431
|
+
// We mainly care about className="..." or style={{...}}
|
|
432
|
+
if (!/className=|style=/.test(line))
|
|
433
|
+
return;
|
|
434
|
+
const match = line.match(pattern);
|
|
435
|
+
if (match) {
|
|
436
|
+
issues.push({
|
|
437
|
+
file,
|
|
438
|
+
line: index + 1,
|
|
439
|
+
severity: "warning", // Warning for now, stricter later?
|
|
440
|
+
rule: "no-hardcoded-colors",
|
|
441
|
+
message: `Hardcoded ${name}: ${match[0]}`,
|
|
442
|
+
suggestion: "Use semantic design tokens (bg-primary, text-muted) instead.",
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
// 2. Check for Non-Semantic Tailwind Colors
|
|
448
|
+
// Regex looks for words like bg-blue-500, text-gray-900, border-red-200
|
|
449
|
+
// format: (bg|text|border|ring|fill|stroke|decoration|shadow)-[color]-[number]
|
|
450
|
+
const genericRegex = new RegExp(`\\b(bg|text|border|ring|fill|stroke|decoration|shadow)-(${GENERIC_TW_COLORS.join("|")})-(\\d+|50)\\b`, "g");
|
|
451
|
+
let match;
|
|
452
|
+
while ((match = genericRegex.exec(line)) !== null) {
|
|
453
|
+
// Exclude if it's mapped to a variable/token? No, this is checking the class usage itself.
|
|
454
|
+
issues.push({
|
|
455
|
+
file,
|
|
456
|
+
line: index + 1,
|
|
457
|
+
severity: "warning", // Promoted to warning per user request
|
|
458
|
+
rule: "use-semantic-colors",
|
|
459
|
+
message: `Generic Tailwind color used: ${match[0]}`,
|
|
460
|
+
suggestion: "Prefer semantic tokens (e.g., bg-surface-100, text-primary, border-divider) over generic palette colors.",
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
return issues;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Check 7: Font Weight Consistency
|
|
469
|
+
* Font weights should use consistent values
|
|
470
|
+
*/
|
|
471
|
+
async function checkFontWeightConsistency() {
|
|
472
|
+
const issues = [];
|
|
473
|
+
const files = await getAllTsxFiles();
|
|
474
|
+
const weightUsage = new Map();
|
|
475
|
+
// Standard font weights
|
|
476
|
+
const STANDARD_WEIGHTS = new Set([
|
|
477
|
+
"normal",
|
|
478
|
+
"medium",
|
|
479
|
+
"semibold",
|
|
480
|
+
"bold",
|
|
481
|
+
"400",
|
|
482
|
+
"500",
|
|
483
|
+
"600",
|
|
484
|
+
"700",
|
|
485
|
+
]);
|
|
486
|
+
for (const file of files) {
|
|
487
|
+
const content = fs.readFileSync(file, "utf8");
|
|
488
|
+
const lines = content.split("\n");
|
|
489
|
+
lines.forEach((line, index) => {
|
|
490
|
+
// Track Tailwind font weight usage
|
|
491
|
+
const tailwindWeight = line.match(/\bfont-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black)/g);
|
|
492
|
+
if (tailwindWeight) {
|
|
493
|
+
tailwindWeight.forEach((w) => {
|
|
494
|
+
const weight = w.replace("font-", "");
|
|
495
|
+
weightUsage.set(weight, (weightUsage.get(weight) || 0) + 1);
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
// Check for numeric font weights
|
|
499
|
+
const numericWeight = line.match(/fontWeight:\s*(\d+)/);
|
|
500
|
+
if (numericWeight) {
|
|
501
|
+
const weight = numericWeight[1];
|
|
502
|
+
if (!["400", "500", "600", "700"].includes(weight)) {
|
|
503
|
+
issues.push({
|
|
504
|
+
file,
|
|
505
|
+
line: index + 1,
|
|
506
|
+
severity: "info",
|
|
507
|
+
rule: "non-standard-font-weight",
|
|
508
|
+
message: `Non-standard font weight: ${weight}`,
|
|
509
|
+
suggestion: "Use standard weights: 400 (normal), 500 (medium), 600 (semibold), 700 (bold)",
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
// Report if using too many different weights
|
|
516
|
+
if (weightUsage.size > 4) {
|
|
517
|
+
const sorted = [...weightUsage.entries()].sort((a, b) => b[1] - a[1]);
|
|
518
|
+
issues.push({
|
|
519
|
+
file: "codebase-wide",
|
|
520
|
+
line: 0,
|
|
521
|
+
severity: "info",
|
|
522
|
+
rule: "font-weight-proliferation",
|
|
523
|
+
message: `${weightUsage.size} different font weights used: ${sorted.map(([w, c]) => `${w}(${c})`).join(", ")}`,
|
|
524
|
+
suggestion: "Limit to 3-4 weights: normal, medium, semibold, bold",
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
return issues;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Check 8: Border Style Consistency
|
|
531
|
+
* Borders should use consistent patterns
|
|
532
|
+
*/
|
|
533
|
+
async function checkBorderStyleConsistency() {
|
|
534
|
+
const issues = [];
|
|
535
|
+
const files = await getAllTsxFiles();
|
|
536
|
+
const borderWidths = new Map();
|
|
537
|
+
const borderStyles = new Map();
|
|
538
|
+
for (const file of files) {
|
|
539
|
+
const content = fs.readFileSync(file, "utf8");
|
|
540
|
+
const lines = content.split("\n");
|
|
541
|
+
lines.forEach((line, index) => {
|
|
542
|
+
// Track border width usage
|
|
543
|
+
const borderWidth = line.match(/\bborder(?:-[trbl])?-(\d+)/g);
|
|
544
|
+
if (borderWidth) {
|
|
545
|
+
borderWidth.forEach((b) => {
|
|
546
|
+
const width = b.match(/\d+/)?.[0] || "1";
|
|
547
|
+
borderWidths.set(width, (borderWidths.get(width) || 0) + 1);
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
// Check for hardcoded border in style
|
|
551
|
+
const styleBorder = line.match(/border(?:Width)?:\s*["']?(\d+)px/);
|
|
552
|
+
if (styleBorder) {
|
|
553
|
+
const width = styleBorder[1];
|
|
554
|
+
if (!["1", "2", "4"].includes(width)) {
|
|
555
|
+
issues.push({
|
|
556
|
+
file,
|
|
557
|
+
line: index + 1,
|
|
558
|
+
severity: "info",
|
|
559
|
+
rule: "non-standard-border-width",
|
|
560
|
+
message: `Non-standard border width: ${width}px`,
|
|
561
|
+
suggestion: "Use standard widths: 1px (default), 2px (emphasis), 4px (heavy)",
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
// Check for border-radius consistency
|
|
566
|
+
const borderRadius = line.match(/rounded-(\w+)/g);
|
|
567
|
+
if (borderRadius) {
|
|
568
|
+
borderRadius.forEach((r) => {
|
|
569
|
+
const radius = r.replace("rounded-", "");
|
|
570
|
+
borderStyles.set(radius, (borderStyles.get(radius) || 0) + 1);
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
// Report if too many different border radii
|
|
576
|
+
if (borderStyles.size > 6) {
|
|
577
|
+
const sorted = [...borderStyles.entries()].sort((a, b) => b[1] - a[1]);
|
|
578
|
+
issues.push({
|
|
579
|
+
file: "codebase-wide",
|
|
580
|
+
line: 0,
|
|
581
|
+
severity: "info",
|
|
582
|
+
rule: "border-radius-proliferation",
|
|
583
|
+
message: `${borderStyles.size} different border radii used: ${sorted
|
|
584
|
+
.slice(0, 8)
|
|
585
|
+
.map(([r, c]) => `${r}(${c})`)
|
|
586
|
+
.join(", ")}`,
|
|
587
|
+
suggestion: "Standardize on: none, sm, md, lg, full",
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
return issues;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Check 9: Spacing Token Consistency
|
|
594
|
+
* Spacing and positioning should use consistent tokens
|
|
595
|
+
*/
|
|
596
|
+
async function checkSpacingTokenConsistency() {
|
|
597
|
+
const issues = [];
|
|
598
|
+
const files = await getAllTsxFiles();
|
|
599
|
+
// Regex for hardcoded numeric values in styles
|
|
600
|
+
const HARDCODED_SPACING_REGEX = /((?:margin|padding)(?:Top|Right|Bottom|Left|X|Y)?|top|right|bottom|left):\s*["'](?!(?:0|auto|inherit|initial|unset))(-?\d+(\.\d+)?(px|rem|em))["']/;
|
|
601
|
+
for (const file of files) {
|
|
602
|
+
const content = fs.readFileSync(file, "utf8");
|
|
603
|
+
const lines = content.split("\n");
|
|
604
|
+
lines.forEach((line, index) => {
|
|
605
|
+
// Skip comments and imports
|
|
606
|
+
if (line.trim().startsWith("//") ||
|
|
607
|
+
line.trim().startsWith("*") ||
|
|
608
|
+
/^import/.test(line.trim())) {
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
// Check for hardcoded spacing/positioning in style objects
|
|
612
|
+
const match = line.match(HARDCODED_SPACING_REGEX);
|
|
613
|
+
if (match) {
|
|
614
|
+
// Skip if line uses CSS variables
|
|
615
|
+
if (line.includes("var(--"))
|
|
616
|
+
return;
|
|
617
|
+
// Skip if line involves calculations that might be dynamic
|
|
618
|
+
if (line.includes("calc("))
|
|
619
|
+
return;
|
|
620
|
+
issues.push({
|
|
621
|
+
file,
|
|
622
|
+
line: index + 1,
|
|
623
|
+
severity: "info",
|
|
624
|
+
rule: "hardcoded-spacing",
|
|
625
|
+
message: `Hardcoded spacing/positioning: ${match[0]}`,
|
|
626
|
+
suggestion: "Use Tailwind classes (p-4, m-2) or var(--spacing-*) tokens",
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
return issues;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Check 10: Button/Element Symmetry
|
|
635
|
+
* Buttons and interactive elements should have symmetrical padding
|
|
636
|
+
*/
|
|
637
|
+
async function checkElementSymmetry() {
|
|
638
|
+
const issues = [];
|
|
639
|
+
const files = await getAllTsxFiles();
|
|
640
|
+
for (const file of files) {
|
|
641
|
+
const content = fs.readFileSync(file, "utf8");
|
|
642
|
+
const lines = content.split("\n");
|
|
643
|
+
lines.forEach((line, index) => {
|
|
644
|
+
// Check any line with a className with padding
|
|
645
|
+
if (/className=["'][^"']*\bp[lrtbxy]-/.test(line)) {
|
|
646
|
+
// Skip lists - they often use pl- for indentation logic which is validly asymmetric
|
|
647
|
+
if (/<[uo]l/.test(line) ||
|
|
648
|
+
/component=["']ul["']/.test(line) ||
|
|
649
|
+
/component=["']ol["']/.test(line)) {
|
|
650
|
+
return;
|
|
651
|
+
}
|
|
652
|
+
// Horizontal Symmetry (pl vs pr)
|
|
653
|
+
const plMatch = line.match(/\bpl-(\d+|\[[^\]]+\])\b/);
|
|
654
|
+
const prMatch = line.match(/\bpr-(\d+|\[[^\]]+\])\b/);
|
|
655
|
+
// Case 1: Has both but different values
|
|
656
|
+
if (plMatch && prMatch && plMatch[1] !== prMatch[1]) {
|
|
657
|
+
issues.push({
|
|
658
|
+
file,
|
|
659
|
+
line: index + 1,
|
|
660
|
+
severity: "info",
|
|
661
|
+
rule: "asymmetric-padding-x",
|
|
662
|
+
message: `Element has asymmetric horizontal padding: pl-${plMatch[1]} vs pr-${prMatch[1]}`,
|
|
663
|
+
suggestion: "Use px-* for symmetrical horizontal padding, or match pl/pr values",
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
// Case 2: Has pl but missing pr (and not part of px)
|
|
667
|
+
if (plMatch && !prMatch && !/\bpx-/.test(line)) {
|
|
668
|
+
// Skip if it looks like an icon container or input with icon
|
|
669
|
+
if (!/icon|input|search/i.test(line)) {
|
|
670
|
+
issues.push({
|
|
671
|
+
file,
|
|
672
|
+
line: index + 1,
|
|
673
|
+
severity: "info",
|
|
674
|
+
rule: "missing-padding-right",
|
|
675
|
+
message: `Element has left padding (pl-${plMatch[1]}) but no right padding`,
|
|
676
|
+
suggestion: "Ensure symmetry with pr-* or use px-*",
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
// Case 3: Has pr but missing pl (and not part of px)
|
|
681
|
+
if (prMatch && !plMatch && !/\bpx-/.test(line)) {
|
|
682
|
+
if (!/icon|input|search/i.test(line)) {
|
|
683
|
+
issues.push({
|
|
684
|
+
file,
|
|
685
|
+
line: index + 1,
|
|
686
|
+
severity: "info",
|
|
687
|
+
rule: "missing-padding-left",
|
|
688
|
+
message: `Element has right padding (pr-${prMatch[1]}) but no left padding`,
|
|
689
|
+
suggestion: "Ensure symmetry with pl-* or use px-*",
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
// Vertical Symmetry (pt vs pb)
|
|
694
|
+
const ptMatch = line.match(/\bpt-(\d+|\[[^\]]+\])\b/);
|
|
695
|
+
const pbMatch = line.match(/\bpb-(\d+|\[[^\]]+\])\b/);
|
|
696
|
+
if (ptMatch && pbMatch && ptMatch[1] !== pbMatch[1]) {
|
|
697
|
+
issues.push({
|
|
698
|
+
file,
|
|
699
|
+
line: index + 1,
|
|
700
|
+
severity: "info",
|
|
701
|
+
rule: "asymmetric-padding-y",
|
|
702
|
+
message: `Element has asymmetric vertical padding: pt-${ptMatch[1]} vs pb-${pbMatch[1]}`,
|
|
703
|
+
suggestion: "Use py-* for symmetrical vertical padding, or match pt/pb values",
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
// Case 4: Has pt but missing pb (and not part of py)
|
|
707
|
+
if (ptMatch && !pbMatch && !/\bpy-/.test(line)) {
|
|
708
|
+
// Top padding often valid for headers/sections, so we use lower severity or skip mostly
|
|
709
|
+
// Only flag if it looks like a button or card
|
|
710
|
+
if (/<Button|<Card|<Badge/.test(line)) {
|
|
711
|
+
issues.push({
|
|
712
|
+
file,
|
|
713
|
+
line: index + 1,
|
|
714
|
+
severity: "info",
|
|
715
|
+
rule: "missing-padding-bottom",
|
|
716
|
+
message: `Component has top padding (pt-${ptMatch[1]}) but no bottom padding`,
|
|
717
|
+
suggestion: "Ensure symmetry with pb-* or use py-*",
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
// Check border symmetry
|
|
723
|
+
if (/className=["'][^"']*\bborder-[lrtb]-/.test(line)) {
|
|
724
|
+
// Horizontal Border Symmetry
|
|
725
|
+
const borderL = line.match(/\bborder-l(?:-(\d+|\[[^\]]+\]))?\b/);
|
|
726
|
+
const borderR = line.match(/\bborder-r(?:-(\d+|\[[^\]]+\]))?\b/);
|
|
727
|
+
// Case 1: Mismatched values
|
|
728
|
+
if (borderL && borderR) {
|
|
729
|
+
const lVal = borderL[1] || "default";
|
|
730
|
+
const rVal = borderR[1] || "default";
|
|
731
|
+
if (lVal !== rVal) {
|
|
732
|
+
issues.push({
|
|
733
|
+
file,
|
|
734
|
+
line: index + 1,
|
|
735
|
+
severity: "info",
|
|
736
|
+
rule: "asymmetric-border-x",
|
|
737
|
+
message: `Element has asymmetric horizontal borders: Left(${lVal}) vs Right(${rVal})`,
|
|
738
|
+
suggestion: "Ensure symmetry or use border-x-*",
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
// Case 2: Left but no Right
|
|
743
|
+
if (borderL && !borderR && !/\bborder-x-/.test(line)) {
|
|
744
|
+
// Skip tables or divided lists where single borders are common
|
|
745
|
+
if (!/table|divide|separator|border-r-0/i.test(line)) {
|
|
746
|
+
issues.push({
|
|
747
|
+
file,
|
|
748
|
+
line: index + 1,
|
|
749
|
+
severity: "info",
|
|
750
|
+
rule: "missing-border-right",
|
|
751
|
+
message: `Element has left border but no right border`,
|
|
752
|
+
suggestion: "Ensure symmetry with border-r-* or use border-x-* (unless intentional divider)",
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
// Case 3: Right but no Left
|
|
757
|
+
if (borderR && !borderL && !/\bborder-x-/.test(line)) {
|
|
758
|
+
if (!/table|divide|separator|border-l-0/i.test(line)) {
|
|
759
|
+
issues.push({
|
|
760
|
+
file,
|
|
761
|
+
line: index + 1,
|
|
762
|
+
severity: "info",
|
|
763
|
+
rule: "missing-border-left",
|
|
764
|
+
message: `Element has right border but no left border`,
|
|
765
|
+
suggestion: "Ensure symmetry with border-l-* or use border-x-* (unless intentional divider)",
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
// Check border radius symmetry (rounded corners)
|
|
771
|
+
if (/className=["'][^"']*\brounded-/.test(line)) {
|
|
772
|
+
// Top corners
|
|
773
|
+
const roundedTL = line.match(/\brounded-tl(?:-([a-z0-9]+))?\b/);
|
|
774
|
+
const roundedTR = line.match(/\brounded-tr(?:-([a-z0-9]+))?\b/);
|
|
775
|
+
if (roundedTL && roundedTR) {
|
|
776
|
+
const lVal = roundedTL[1] || "default";
|
|
777
|
+
const rVal = roundedTR[1] || "default";
|
|
778
|
+
if (lVal !== rVal) {
|
|
779
|
+
issues.push({
|
|
780
|
+
file,
|
|
781
|
+
line: index + 1,
|
|
782
|
+
severity: "info",
|
|
783
|
+
rule: "asymmetric-radius-top",
|
|
784
|
+
message: `Element has asymmetric top rounding: TL(${lVal}) vs TR(${rVal})`,
|
|
785
|
+
suggestion: "Ensure symmetry with matching values or use rounded-t-*",
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
// Bottom corners
|
|
790
|
+
const roundedBL = line.match(/\brounded-bl(?:-([a-z0-9]+))?\b/);
|
|
791
|
+
const roundedBR = line.match(/\brounded-br(?:-([a-z0-9]+))?\b/);
|
|
792
|
+
if (roundedBL && roundedBR) {
|
|
793
|
+
const lVal = roundedBL[1] || "default";
|
|
794
|
+
const rVal = roundedBR[1] || "default";
|
|
795
|
+
if (lVal !== rVal) {
|
|
796
|
+
issues.push({
|
|
797
|
+
file,
|
|
798
|
+
line: index + 1,
|
|
799
|
+
severity: "info",
|
|
800
|
+
rule: "asymmetric-radius-bottom",
|
|
801
|
+
message: `Element has asymmetric bottom rounding: BL(${lVal}) vs BR(${rVal})`,
|
|
802
|
+
suggestion: "Ensure symmetry with matching values or use rounded-b-*",
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
// Left corners (TL vs BL)
|
|
807
|
+
if (roundedTL && roundedBL) {
|
|
808
|
+
const tVal = roundedTL[1] || "default";
|
|
809
|
+
const bVal = roundedBL[1] || "default";
|
|
810
|
+
if (tVal !== bVal) {
|
|
811
|
+
issues.push({
|
|
812
|
+
file,
|
|
813
|
+
line: index + 1,
|
|
814
|
+
severity: "info",
|
|
815
|
+
rule: "asymmetric-radius-left",
|
|
816
|
+
message: `Element has asymmetric left rounding: TL(${tVal}) vs BL(${bVal})`,
|
|
817
|
+
suggestion: "Ensure symmetry with matching values or use rounded-l-*",
|
|
818
|
+
});
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
// Right corners (TR vs BR)
|
|
822
|
+
if (roundedTR && roundedBR) {
|
|
823
|
+
const tVal = roundedTR[1] || "default";
|
|
824
|
+
const bVal = roundedBR[1] || "default";
|
|
825
|
+
if (tVal !== bVal) {
|
|
826
|
+
issues.push({
|
|
827
|
+
file,
|
|
828
|
+
line: index + 1,
|
|
829
|
+
severity: "info",
|
|
830
|
+
rule: "asymmetric-radius-right",
|
|
831
|
+
message: `Element has asymmetric right rounding: TR(${tVal}) vs BR(${bVal})`,
|
|
832
|
+
suggestion: "Ensure symmetry with matching values or use rounded-r-*",
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
// Check for isolated corners on Buttons (usually wrong unless grouped)
|
|
837
|
+
if (/<Button/.test(line) && !/group|joined/.test(line)) {
|
|
838
|
+
if ((roundedTL || roundedTR || roundedBL || roundedBR) &&
|
|
839
|
+
!/\brounded-(md|lg|full|nm|sm|xl|2xl|3xl)\b/.test(line) &&
|
|
840
|
+
!/\brounded\b/.test(line)) {
|
|
841
|
+
// If it has a specific corner but not a global one, check if it forms a complete side
|
|
842
|
+
const hasTop = roundedTL && roundedTR;
|
|
843
|
+
const hasBottom = roundedBL && roundedBR;
|
|
844
|
+
const hasLeft = roundedTL && roundedBL;
|
|
845
|
+
const hasRight = roundedTR && roundedBR;
|
|
846
|
+
if (!hasTop && !hasBottom && !hasLeft && !hasRight) {
|
|
847
|
+
issues.push({
|
|
848
|
+
file,
|
|
849
|
+
line: index + 1,
|
|
850
|
+
severity: "warning",
|
|
851
|
+
rule: "isolated-radius-button",
|
|
852
|
+
message: `Button has isolated rounded corners. Buttons should usually be fully rounded or constitute a group.`,
|
|
853
|
+
suggestion: "Use rounded-md/lg/full or ensure it is part of a button group",
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
return issues;
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* Check 11: Responsive Purity
|
|
865
|
+
* Ensure no hardcoded JIT pixel values are used in utility classes
|
|
866
|
+
*/
|
|
867
|
+
async function checkResponsivePurity() {
|
|
868
|
+
const issues = [];
|
|
869
|
+
const files = await getAllTsxFiles();
|
|
870
|
+
// Allowed JIT pixel patterns (accessibility/UX standards)
|
|
871
|
+
const allowedPatterns = [
|
|
872
|
+
/min-h-\[44px\]/, // Touch target minimum (WCAG)
|
|
873
|
+
/min-h-\[48px\]/, // Material Design touch target
|
|
874
|
+
/min-w-\[44px\]/, // Touch target minimum
|
|
875
|
+
/min-w-\[48px\]/, // Material Design touch target
|
|
876
|
+
/text-\[\d+px\]/, // Font sizes (often intentional)
|
|
877
|
+
/max-h-\[200px\]/, // Common modal/dropdown max height
|
|
878
|
+
/max-w-\[200px\]/, // Common card/column width
|
|
879
|
+
/min-h-\[108px\]/, // Header height
|
|
880
|
+
/min-h-\[400px\]/, // Content area minimum
|
|
881
|
+
];
|
|
882
|
+
for (const file of files) {
|
|
883
|
+
const content = fs.readFileSync(file, "utf8");
|
|
884
|
+
const lines = content.split("\n");
|
|
885
|
+
lines.forEach((line, index) => {
|
|
886
|
+
// Find classes like w-[500px], p-[20px], top-[15px]
|
|
887
|
+
const jitMatch = line.match(/\b[a-z0-9]+-\[[^\]]*px\]/);
|
|
888
|
+
if (jitMatch) {
|
|
889
|
+
// Skip if it looks like a specifically calculated calc() inside (rare but valid)
|
|
890
|
+
if (jitMatch[0].includes("calc"))
|
|
891
|
+
return;
|
|
892
|
+
// Skip allowed patterns
|
|
893
|
+
if (allowedPatterns.some((pattern) => pattern.test(jitMatch[0])))
|
|
894
|
+
return;
|
|
895
|
+
// Skip preflight-ignore comments
|
|
896
|
+
if (line.includes("preflight-ignore"))
|
|
897
|
+
return;
|
|
898
|
+
issues.push({
|
|
899
|
+
file,
|
|
900
|
+
line: index + 1,
|
|
901
|
+
severity: "warning", // Changed from 'error' to 'warning'
|
|
902
|
+
rule: "no-hardcoded-jit-pixels",
|
|
903
|
+
message: `Hardcoded pixel value in JIT class: ${jitMatch[0]}`,
|
|
904
|
+
suggestion: "Use responsive design tokens or standard Tailwind utilities (e.g., w-64, p-4) instead of arbitrary pixels.",
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
return issues;
|
|
910
|
+
}
|
|
911
|
+
async function main() {
|
|
912
|
+
const reporter = (0, universal_progress_reporter_1.createUniversalProgressReporter)(path.basename(__filename, ".ts"));
|
|
913
|
+
const args = process.argv.slice(2);
|
|
914
|
+
const checkType = args.find((a) => !a.startsWith("--"));
|
|
915
|
+
const verbose = args.includes("--verbose");
|
|
916
|
+
console.log(`\n${console_chars_1.emoji.palette} COMPREHENSIVE UI CONSISTENCY PREFLIGHT\n`);
|
|
917
|
+
console.log("Checking for UI consistency patterns...\n");
|
|
918
|
+
console.log("=".repeat(60));
|
|
919
|
+
const allIssues = [];
|
|
920
|
+
const checks = [];
|
|
921
|
+
const runCheck = async (name, fn) => {
|
|
922
|
+
const start = Date.now();
|
|
923
|
+
const issues = await fn();
|
|
924
|
+
const duration = Date.now() - start;
|
|
925
|
+
checks.push({ name, issues, duration });
|
|
926
|
+
allIssues.push(...issues);
|
|
927
|
+
return issues;
|
|
928
|
+
};
|
|
929
|
+
// Run checks based on argument or all
|
|
930
|
+
if (!checkType || checkType === "elevation") {
|
|
931
|
+
await runCheck("Card Elevation", checkCardElevationConsistency);
|
|
932
|
+
}
|
|
933
|
+
if (!checkType || checkType === "inputs") {
|
|
934
|
+
await runCheck("Input Fields", checkInputFieldConsistency);
|
|
935
|
+
}
|
|
936
|
+
if (!checkType || checkType === "animations") {
|
|
937
|
+
await runCheck("Animation Duration", checkAnimationDurationConsistency);
|
|
938
|
+
}
|
|
939
|
+
if (!checkType || checkType === "zindex") {
|
|
940
|
+
await runCheck("Z-Index Layers", checkZIndexConsistency);
|
|
941
|
+
}
|
|
942
|
+
if (!checkType || checkType === "breakpoints") {
|
|
943
|
+
await runCheck("Breakpoints", checkBreakpointConsistency);
|
|
944
|
+
}
|
|
945
|
+
if (!checkType || checkType === "colors") {
|
|
946
|
+
await runCheck("Color Tokens", checkColorTokenConsistency);
|
|
947
|
+
}
|
|
948
|
+
if (!checkType || checkType === "fonts") {
|
|
949
|
+
await runCheck("Font Weights", checkFontWeightConsistency);
|
|
950
|
+
}
|
|
951
|
+
if (!checkType || checkType === "borders") {
|
|
952
|
+
await runCheck("Border Styles", checkBorderStyleConsistency);
|
|
953
|
+
}
|
|
954
|
+
if (!checkType || checkType === "spacing") {
|
|
955
|
+
await runCheck("Spacing Tokens", checkSpacingTokenConsistency);
|
|
956
|
+
}
|
|
957
|
+
if (!checkType || checkType === "symmetry") {
|
|
958
|
+
await runCheck("Element Symmetry", checkElementSymmetry);
|
|
959
|
+
}
|
|
960
|
+
if (!checkType || checkType === "responsive") {
|
|
961
|
+
await runCheck("Responsive Purity", checkResponsivePurity);
|
|
962
|
+
}
|
|
963
|
+
// Report results
|
|
964
|
+
const errors = allIssues.filter((i) => i.severity === "error");
|
|
965
|
+
const warnings = allIssues.filter((i) => i.severity === "warning");
|
|
966
|
+
const infos = allIssues.filter((i) => i.severity === "info");
|
|
967
|
+
// Print check results
|
|
968
|
+
for (const check of checks) {
|
|
969
|
+
const icon = check.issues.filter((i) => i.severity === "error").length > 0
|
|
970
|
+
? `${console_chars_1.emoji.error}`
|
|
971
|
+
: `${console_chars_1.emoji.success}`;
|
|
972
|
+
console.log(`${icon} ${check.name} (${check.issues.length} issues, ${(check.duration / 1000).toFixed(1)}s)`);
|
|
973
|
+
}
|
|
974
|
+
if (verbose && allIssues.length > 0) {
|
|
975
|
+
console.log("\n" + (0, console_chars_1.createDivider)(60, "light"));
|
|
976
|
+
console.log("\nIssues found:\n");
|
|
977
|
+
// Sort issues by severity: Error > Warning > Info
|
|
978
|
+
allIssues.sort((a, b) => {
|
|
979
|
+
const severityScore = { error: 0, warning: 1, info: 2 };
|
|
980
|
+
return severityScore[a.severity] - severityScore[b.severity];
|
|
981
|
+
});
|
|
982
|
+
for (const issue of allIssues.slice(0, 50)) {
|
|
983
|
+
const color = issue.severity === "error"
|
|
984
|
+
? `${console_chars_1.emoji.error}`
|
|
985
|
+
: issue.severity === "warning"
|
|
986
|
+
? `${console_chars_1.emoji.warning}`
|
|
987
|
+
: `${console_chars_1.emoji.info}`;
|
|
988
|
+
console.log(`${color} ${issue.file}:${issue.line}`);
|
|
989
|
+
console.log(` ${issue.message}`);
|
|
990
|
+
if (issue.suggestion)
|
|
991
|
+
console.log(` ${console_chars_1.chars.arrow} ${issue.suggestion}`);
|
|
992
|
+
}
|
|
993
|
+
if (allIssues.length > 50) {
|
|
994
|
+
console.log(`\n... and ${allIssues.length - 50} more issues`);
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
console.log("\n" + "=".repeat(60));
|
|
998
|
+
console.log(`\n${console_chars_1.emoji.chart} Results: ${errors.length} errors, ${warnings.length} warnings, ${infos.length} info`);
|
|
999
|
+
console.log(` Checks run: ${checks.length}`);
|
|
1000
|
+
console.log(` Total time: ${(checks.reduce((a, c) => a + c.duration, 0) / 1000).toFixed(1)}s`);
|
|
1001
|
+
if (checkType) {
|
|
1002
|
+
console.log(` Check type: ${checkType}`);
|
|
1003
|
+
}
|
|
1004
|
+
// This is non-blocking - consistency issues are suggestions
|
|
1005
|
+
if (errors.length > 0) {
|
|
1006
|
+
console.log(`\n${console_chars_1.emoji.error} UI Consistency check FAILED\n`);
|
|
1007
|
+
process.exit(1);
|
|
1008
|
+
}
|
|
1009
|
+
else if (warnings.length > 0) {
|
|
1010
|
+
console.log(`\n${console_chars_1.emoji.warning} UI Consistency check completed with warnings\n`);
|
|
1011
|
+
}
|
|
1012
|
+
else {
|
|
1013
|
+
console.log(`\n${console_chars_1.emoji.success} UI Consistency Comprehensive PASSED\n`);
|
|
1014
|
+
}
|
|
1015
|
+
process.exit(0);
|
|
1016
|
+
}
|
|
1017
|
+
main().catch(console.error);
|
|
1018
|
+
//# sourceMappingURL=ui-consistency-comprehensive.js.map
|