@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,977 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Consolidated Import Validation Preflight
|
|
5
|
+
*
|
|
6
|
+
* Combines 7 separate import checks into one comprehensive module:
|
|
7
|
+
* - import-validation (correct import sources)
|
|
8
|
+
* - import-organization (import order)
|
|
9
|
+
* - import-source-consistency (@/components/ui vs @supercatch/ui)
|
|
10
|
+
* - server-only-imports (Prisma/server code in client components) [BLOCKING]
|
|
11
|
+
* - unused-imports (dead imports)
|
|
12
|
+
* - missing-imports (undefined references)
|
|
13
|
+
* - hook-import-validation (custom hooks)
|
|
14
|
+
*
|
|
15
|
+
* Usage:
|
|
16
|
+
* pnpm preflight:imports # All import checks
|
|
17
|
+
* pnpm preflight:imports validation # Source validation only
|
|
18
|
+
* pnpm preflight:imports organization # Import order only
|
|
19
|
+
* pnpm preflight:imports consistency # @/components/ui consistency
|
|
20
|
+
* pnpm preflight:imports server-only # Server-only imports in client components
|
|
21
|
+
* pnpm preflight:imports unused # Unused imports only
|
|
22
|
+
* pnpm preflight:imports missing # Missing imports only
|
|
23
|
+
* pnpm preflight:imports hooks # Hook imports only
|
|
24
|
+
*/
|
|
25
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
26
|
+
if (k2 === undefined) k2 = k;
|
|
27
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
28
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
29
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
30
|
+
}
|
|
31
|
+
Object.defineProperty(o, k2, desc);
|
|
32
|
+
}) : (function(o, m, k, k2) {
|
|
33
|
+
if (k2 === undefined) k2 = k;
|
|
34
|
+
o[k2] = m[k];
|
|
35
|
+
}));
|
|
36
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
37
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
38
|
+
}) : function(o, v) {
|
|
39
|
+
o["default"] = v;
|
|
40
|
+
});
|
|
41
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
42
|
+
var ownKeys = function(o) {
|
|
43
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
44
|
+
var ar = [];
|
|
45
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
46
|
+
return ar;
|
|
47
|
+
};
|
|
48
|
+
return ownKeys(o);
|
|
49
|
+
};
|
|
50
|
+
return function (mod) {
|
|
51
|
+
if (mod && mod.__esModule) return mod;
|
|
52
|
+
var result = {};
|
|
53
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
54
|
+
__setModuleDefault(result, mod);
|
|
55
|
+
return result;
|
|
56
|
+
};
|
|
57
|
+
})();
|
|
58
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
59
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
60
|
+
};
|
|
61
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
+
exports.ImportsPreflightModule = void 0;
|
|
63
|
+
const fs = __importStar(require("fs"));
|
|
64
|
+
const file_cache_1 = require("../../shared/file-cache");
|
|
65
|
+
const path = __importStar(require("path"));
|
|
66
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
67
|
+
const console_chars_1 = require("../../utils/console-chars");
|
|
68
|
+
const concurrency_config_1 = require("../../shared/concurrency-config");
|
|
69
|
+
const universal_progress_reporter_1 = require("../system/universal-progress-reporter");
|
|
70
|
+
const findings_writer_1 = require("../../utils/findings-writer");
|
|
71
|
+
const glob_1 = require("glob");
|
|
72
|
+
// Get concurrency from shared config (respects PREFLIGHT_CONCURRENCY env var)
|
|
73
|
+
const concurrencyConfig = (0, concurrency_config_1.getConcurrencyConfig)();
|
|
74
|
+
function emitFindingsFromIssues(issues) {
|
|
75
|
+
const isFindingIssue = (issue) => issue.severity === "error" || issue.severity === "warning";
|
|
76
|
+
(0, findings_writer_1.writeFindings)(issues.filter(isFindingIssue).map((i) => ({
|
|
77
|
+
severity: i.severity,
|
|
78
|
+
message: i.message,
|
|
79
|
+
file: String(i.file).replace(/\\/g, "/"),
|
|
80
|
+
range: {
|
|
81
|
+
startLine: i.line,
|
|
82
|
+
startColumn: i.column,
|
|
83
|
+
endLine: i.endLine,
|
|
84
|
+
endColumn: i.endColumn,
|
|
85
|
+
},
|
|
86
|
+
code: i.type,
|
|
87
|
+
})));
|
|
88
|
+
}
|
|
89
|
+
function getImportClauseNames(importClause) {
|
|
90
|
+
if (!importClause)
|
|
91
|
+
return [];
|
|
92
|
+
const names = [];
|
|
93
|
+
if (importClause.name) {
|
|
94
|
+
names.push(importClause.name.text);
|
|
95
|
+
}
|
|
96
|
+
const namedBindings = importClause.namedBindings;
|
|
97
|
+
if (!namedBindings)
|
|
98
|
+
return names;
|
|
99
|
+
if (typescript_1.default.isNamespaceImport(namedBindings)) {
|
|
100
|
+
names.push(`* as ${namedBindings.name.text}`);
|
|
101
|
+
return names;
|
|
102
|
+
}
|
|
103
|
+
if (typescript_1.default.isNamedImports(namedBindings)) {
|
|
104
|
+
for (const el of namedBindings.elements) {
|
|
105
|
+
names.push(el.name.text);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return names;
|
|
109
|
+
}
|
|
110
|
+
function getLocationForNode(sf, node) {
|
|
111
|
+
const start = sf.getLineAndCharacterOfPosition(node.getStart(sf));
|
|
112
|
+
const end = sf.getLineAndCharacterOfPosition(node.getEnd());
|
|
113
|
+
return {
|
|
114
|
+
line: start.line + 1,
|
|
115
|
+
column: start.character + 1,
|
|
116
|
+
endLine: end.line + 1,
|
|
117
|
+
endColumn: end.character + 1,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function indexToLineCol(text, index) {
|
|
121
|
+
const clamped = Math.max(0, Math.min(index, text.length));
|
|
122
|
+
// 1-based line/col
|
|
123
|
+
let line = 1;
|
|
124
|
+
let lastLineStart = 0;
|
|
125
|
+
for (let i = 0; i < clamped; i += 1) {
|
|
126
|
+
if (text.charCodeAt(i) === 10) {
|
|
127
|
+
line += 1;
|
|
128
|
+
lastLineStart = i + 1;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return { line, col: clamped - lastLineStart + 1 };
|
|
132
|
+
}
|
|
133
|
+
const EXCLUDED_PATTERNS = [
|
|
134
|
+
"**/node_modules/**",
|
|
135
|
+
"**/.next/**",
|
|
136
|
+
"**/dist/**",
|
|
137
|
+
"**/build/**",
|
|
138
|
+
"**/*.test.{ts,tsx}",
|
|
139
|
+
"**/*.spec.{ts,tsx}",
|
|
140
|
+
"**/*.stories.{ts,tsx}",
|
|
141
|
+
];
|
|
142
|
+
const REACT_HOOKS = new Set([
|
|
143
|
+
"useState",
|
|
144
|
+
"useEffect",
|
|
145
|
+
"useContext",
|
|
146
|
+
"useReducer",
|
|
147
|
+
"useCallback",
|
|
148
|
+
"useMemo",
|
|
149
|
+
"useRef",
|
|
150
|
+
"useImperativeHandle",
|
|
151
|
+
"useLayoutEffect",
|
|
152
|
+
"useDebugValue",
|
|
153
|
+
"useDeferredValue",
|
|
154
|
+
"useTransition",
|
|
155
|
+
"useId",
|
|
156
|
+
"useSyncExternalStore",
|
|
157
|
+
]);
|
|
158
|
+
const EXTERNAL_HOOKS = new Set([
|
|
159
|
+
...REACT_HOOKS,
|
|
160
|
+
"useRouter",
|
|
161
|
+
"usePathname",
|
|
162
|
+
"useSearchParams",
|
|
163
|
+
"useParams", // Next.js
|
|
164
|
+
"useSWR",
|
|
165
|
+
"useSWRConfig",
|
|
166
|
+
"useSWRMutation", // SWR
|
|
167
|
+
"useQuery",
|
|
168
|
+
"useMutation",
|
|
169
|
+
"useQueryClient", // React Query
|
|
170
|
+
"useForm",
|
|
171
|
+
"useFormContext",
|
|
172
|
+
"useFieldArray", // React Hook Form
|
|
173
|
+
]);
|
|
174
|
+
const IMPORT_ORDER = {
|
|
175
|
+
react: 1,
|
|
176
|
+
thirdParty: 2,
|
|
177
|
+
componentsUI: 3,
|
|
178
|
+
components: 4,
|
|
179
|
+
hooks: 5,
|
|
180
|
+
lib: 6,
|
|
181
|
+
app: 7,
|
|
182
|
+
contexts: 8,
|
|
183
|
+
types: 9,
|
|
184
|
+
utils: 10,
|
|
185
|
+
relative: 11,
|
|
186
|
+
typeImports: 12,
|
|
187
|
+
};
|
|
188
|
+
// IMPORT CHECK IMPLEMENTATIONS
|
|
189
|
+
class ImportsPreflightModule {
|
|
190
|
+
verbose;
|
|
191
|
+
parallel;
|
|
192
|
+
constructor(options = {}) {
|
|
193
|
+
this.verbose = options.verbose || false;
|
|
194
|
+
this.parallel = options.parallel || concurrencyConfig.parallel;
|
|
195
|
+
}
|
|
196
|
+
async getFiles(pattern = "**/*.{ts,tsx}") {
|
|
197
|
+
return (0, glob_1.glob)(pattern, { ignore: EXCLUDED_PATTERNS });
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Import Source Validation
|
|
201
|
+
*/
|
|
202
|
+
async checkImportValidation() {
|
|
203
|
+
const startTime = Date.now();
|
|
204
|
+
const issues = [];
|
|
205
|
+
const files = await this.getFiles();
|
|
206
|
+
for (const file of files) {
|
|
207
|
+
const content = fs.readFileSync(file, "utf8");
|
|
208
|
+
const ext = file.toLowerCase().endsWith(".tsx")
|
|
209
|
+
? typescript_1.default.ScriptKind.TSX
|
|
210
|
+
: file.toLowerCase().endsWith(".jsx")
|
|
211
|
+
? typescript_1.default.ScriptKind.JSX
|
|
212
|
+
: file.toLowerCase().endsWith(".js")
|
|
213
|
+
? typescript_1.default.ScriptKind.JS
|
|
214
|
+
: typescript_1.default.ScriptKind.TS;
|
|
215
|
+
const sf = typescript_1.default.createSourceFile(file, content, typescript_1.default.ScriptTarget.Latest, true, ext);
|
|
216
|
+
const visit = (node) => {
|
|
217
|
+
if (typescript_1.default.isImportDeclaration(node) && typescript_1.default.isStringLiteral(node.moduleSpecifier)) {
|
|
218
|
+
const mod = node.moduleSpecifier.text;
|
|
219
|
+
const loc = getLocationForNode(sf, node.moduleSpecifier);
|
|
220
|
+
// 1) `import { Card } from '@/components/shared/Card'` should use '@/components/ui'
|
|
221
|
+
if (mod === "@/components/shared/Card") {
|
|
222
|
+
const names = getImportClauseNames(node.importClause);
|
|
223
|
+
if (names.some((n) => n.includes("Card"))) {
|
|
224
|
+
issues.push({
|
|
225
|
+
file,
|
|
226
|
+
line: loc.line,
|
|
227
|
+
column: loc.column,
|
|
228
|
+
endLine: loc.endLine,
|
|
229
|
+
endColumn: loc.endColumn,
|
|
230
|
+
type: "wrong-import-source",
|
|
231
|
+
severity: "error",
|
|
232
|
+
message: "Import Card from '@/components/ui'",
|
|
233
|
+
snippet: node.getText(sf).trim().substring(0, 120),
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
// 2) `import { Button|Badge|Chip } from '@/components/shared/<X>'` should use '@/components/ui'
|
|
238
|
+
if (mod === "@/components/shared/Button" ||
|
|
239
|
+
mod === "@/components/shared/Badge" ||
|
|
240
|
+
mod === "@/components/shared/Chip") {
|
|
241
|
+
issues.push({
|
|
242
|
+
file,
|
|
243
|
+
line: loc.line,
|
|
244
|
+
column: loc.column,
|
|
245
|
+
endLine: loc.endLine,
|
|
246
|
+
endColumn: loc.endColumn,
|
|
247
|
+
type: "wrong-import-source",
|
|
248
|
+
severity: "error",
|
|
249
|
+
message: "Import UI primitives from '@/components/ui'",
|
|
250
|
+
snippet: node.getText(sf).trim().substring(0, 120),
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
typescript_1.default.forEachChild(node, visit);
|
|
255
|
+
};
|
|
256
|
+
visit(sf);
|
|
257
|
+
}
|
|
258
|
+
return {
|
|
259
|
+
name: "Import Source Validation",
|
|
260
|
+
passed: issues.filter((i) => i.severity === "error").length === 0,
|
|
261
|
+
blocking: true,
|
|
262
|
+
issues,
|
|
263
|
+
duration: Date.now() - startTime,
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Import Source Consistency (@/components/ui vs @supercatch/ui)
|
|
268
|
+
*/
|
|
269
|
+
async checkImportConsistency() {
|
|
270
|
+
const startTime = Date.now();
|
|
271
|
+
const issues = [];
|
|
272
|
+
const files = await file_cache_1.fileCache.getAllCodeFiles();
|
|
273
|
+
for (const file of files) {
|
|
274
|
+
const content = fs.readFileSync(file, "utf8");
|
|
275
|
+
// Skip shared implementation files (they should use relative imports internally)
|
|
276
|
+
const normalizedFile = file.replace(/\\/g, "/");
|
|
277
|
+
const isSharedImplementation = normalizedFile.includes("components/shared/");
|
|
278
|
+
const ext = file.toLowerCase().endsWith(".tsx")
|
|
279
|
+
? typescript_1.default.ScriptKind.TSX
|
|
280
|
+
: file.toLowerCase().endsWith(".jsx")
|
|
281
|
+
? typescript_1.default.ScriptKind.JSX
|
|
282
|
+
: file.toLowerCase().endsWith(".js")
|
|
283
|
+
? typescript_1.default.ScriptKind.JS
|
|
284
|
+
: typescript_1.default.ScriptKind.TS;
|
|
285
|
+
const sf = typescript_1.default.createSourceFile(file, content, typescript_1.default.ScriptTarget.Latest, true, ext);
|
|
286
|
+
const visit = (node) => {
|
|
287
|
+
if (typescript_1.default.isImportDeclaration(node) && typescript_1.default.isStringLiteral(node.moduleSpecifier)) {
|
|
288
|
+
const mod = node.moduleSpecifier.text;
|
|
289
|
+
const loc = getLocationForNode(sf, node.moduleSpecifier);
|
|
290
|
+
// Direct @supercatch/ui imports are forbidden
|
|
291
|
+
if (mod === "@supercatch/ui") {
|
|
292
|
+
const components = getImportClauseNames(node.importClause);
|
|
293
|
+
issues.push({
|
|
294
|
+
file,
|
|
295
|
+
line: loc.line,
|
|
296
|
+
column: loc.column,
|
|
297
|
+
endLine: loc.endLine,
|
|
298
|
+
endColumn: loc.endColumn,
|
|
299
|
+
type: "direct-supercatch-import",
|
|
300
|
+
severity: "error",
|
|
301
|
+
message: `Direct @supercatch/ui import: ${components.join(", ")}`,
|
|
302
|
+
suggestion: `Change to: import { ${components.filter((c) => !c.startsWith("* as")).join(", ")} } from '@/components/ui';
|
|
303
|
+
import * as path from 'path';`,
|
|
304
|
+
snippet: node.getText(sf).trim().substring(0, 120),
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
// Direct file imports from @/components/ui/<Component> should use the barrel export
|
|
308
|
+
// Skip type-only imports as they're valid for getting specific types
|
|
309
|
+
if (mod.startsWith("@/components/ui/") && !node.importClause?.isTypeOnly) {
|
|
310
|
+
const fileName = mod.slice("@/components/ui/".length);
|
|
311
|
+
if (/^[A-Z][a-zA-Z]+$/.test(fileName)) {
|
|
312
|
+
// Check if all imports are type imports
|
|
313
|
+
const hasValueImports = node.importClause?.namedBindings &&
|
|
314
|
+
typescript_1.default.isNamedImports(node.importClause.namedBindings) &&
|
|
315
|
+
node.importClause.namedBindings.elements.some((el) => !el.isTypeOnly);
|
|
316
|
+
if (hasValueImports) {
|
|
317
|
+
const components = getImportClauseNames(node.importClause);
|
|
318
|
+
issues.push({
|
|
319
|
+
file,
|
|
320
|
+
line: loc.line,
|
|
321
|
+
column: loc.column,
|
|
322
|
+
endLine: loc.endLine,
|
|
323
|
+
endColumn: loc.endColumn,
|
|
324
|
+
type: "direct-file-import",
|
|
325
|
+
severity: "error",
|
|
326
|
+
message: `Direct file import from @/components/ui/${fileName}`,
|
|
327
|
+
suggestion: `Change to: import { ${components.join(", ")} } from '@/components/ui';
|
|
328
|
+
import * as path from 'path';`,
|
|
329
|
+
snippet: node.getText(sf).trim().substring(0, 120),
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
// Direct top-level imports from @/components/shared/<Component> should use '@/components/shared'
|
|
335
|
+
// NOTE: We intentionally only enforce top-level here to avoid touching nested shared imports
|
|
336
|
+
// like @/components/shared/integration/IntegrationStepper.
|
|
337
|
+
// Skip type-only imports as they're valid for getting specific types
|
|
338
|
+
if (!isSharedImplementation &&
|
|
339
|
+
mod.startsWith("@/components/shared/") &&
|
|
340
|
+
!node.importClause?.isTypeOnly) {
|
|
341
|
+
const fileName = mod.slice("@/components/shared/".length);
|
|
342
|
+
if (/^[A-Z][a-zA-Z0-9]+$/.test(fileName)) {
|
|
343
|
+
// Check if all imports are type imports
|
|
344
|
+
const hasValueImports = node.importClause?.namedBindings &&
|
|
345
|
+
typescript_1.default.isNamedImports(node.importClause.namedBindings) &&
|
|
346
|
+
node.importClause.namedBindings.elements.some((el) => !el.isTypeOnly);
|
|
347
|
+
if (hasValueImports) {
|
|
348
|
+
const components = getImportClauseNames(node.importClause);
|
|
349
|
+
issues.push({
|
|
350
|
+
file,
|
|
351
|
+
line: loc.line,
|
|
352
|
+
column: loc.column,
|
|
353
|
+
endLine: loc.endLine,
|
|
354
|
+
endColumn: loc.endColumn,
|
|
355
|
+
type: "direct-shared-file-import",
|
|
356
|
+
severity: "error",
|
|
357
|
+
message: `Direct file import from @/components/shared/${fileName}`,
|
|
358
|
+
suggestion: `Export ${components.join(", ")} from components/shared/index.ts and import from '@/components/shared' instead.`,
|
|
359
|
+
snippet: node.getText(sf).trim().substring(0, 120),
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
typescript_1.default.forEachChild(node, visit);
|
|
366
|
+
};
|
|
367
|
+
visit(sf);
|
|
368
|
+
}
|
|
369
|
+
return {
|
|
370
|
+
name: "Import Source Consistency",
|
|
371
|
+
passed: issues.length === 0,
|
|
372
|
+
blocking: true,
|
|
373
|
+
issues,
|
|
374
|
+
duration: Date.now() - startTime,
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Import Organization (order)
|
|
379
|
+
*/
|
|
380
|
+
async checkImportOrganization() {
|
|
381
|
+
const startTime = Date.now();
|
|
382
|
+
const issues = [];
|
|
383
|
+
const files = await this.getFiles("{app,components,lib,hooks,contexts}/**/*.{ts,tsx}");
|
|
384
|
+
for (const file of files) {
|
|
385
|
+
const content = fs.readFileSync(file, "utf8");
|
|
386
|
+
const imports = this.extractImportsWithCategory(content);
|
|
387
|
+
let lastCategory = 0;
|
|
388
|
+
for (const imp of imports) {
|
|
389
|
+
if (imp.category < lastCategory) {
|
|
390
|
+
issues.push({
|
|
391
|
+
file,
|
|
392
|
+
line: imp.line,
|
|
393
|
+
column: imp.column,
|
|
394
|
+
endLine: imp.endLine,
|
|
395
|
+
endColumn: imp.endColumn,
|
|
396
|
+
type: "import-out-of-order",
|
|
397
|
+
severity: "warning",
|
|
398
|
+
message: `Import out of order: "${imp.source}" should come earlier`,
|
|
399
|
+
snippet: imp.text.substring(0, 80),
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
lastCategory = imp.category;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return {
|
|
406
|
+
name: "Import Organization",
|
|
407
|
+
passed: true,
|
|
408
|
+
blocking: false,
|
|
409
|
+
issues,
|
|
410
|
+
duration: Date.now() - startTime,
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
extractImportsWithCategory(content) {
|
|
414
|
+
const imports = [];
|
|
415
|
+
const lines = content.split("\n");
|
|
416
|
+
lines.forEach((line, index) => {
|
|
417
|
+
if (!line.trim().startsWith("import "))
|
|
418
|
+
return;
|
|
419
|
+
const match = line.match(/from\s+['"]([^'"]+)['"]/);
|
|
420
|
+
if (!match)
|
|
421
|
+
return;
|
|
422
|
+
const source = match[1];
|
|
423
|
+
const sourceIdx = typeof match.index === "number" ? line.indexOf(source, match.index) : line.indexOf(source);
|
|
424
|
+
const column = sourceIdx >= 0 ? sourceIdx + 1 : undefined;
|
|
425
|
+
const endColumn = typeof column === "number" ? column + source.length : undefined;
|
|
426
|
+
let category = IMPORT_ORDER.thirdParty;
|
|
427
|
+
if (source === "react" || source.startsWith("react/"))
|
|
428
|
+
category = IMPORT_ORDER.react;
|
|
429
|
+
else if (source.startsWith("@/components/ui"))
|
|
430
|
+
category = IMPORT_ORDER.componentsUI;
|
|
431
|
+
else if (source.startsWith("@/components"))
|
|
432
|
+
category = IMPORT_ORDER.components;
|
|
433
|
+
else if (source.startsWith("@/hooks"))
|
|
434
|
+
category = IMPORT_ORDER.hooks;
|
|
435
|
+
else if (source.startsWith("@/lib"))
|
|
436
|
+
category = IMPORT_ORDER.lib;
|
|
437
|
+
else if (source.startsWith("@/app"))
|
|
438
|
+
category = IMPORT_ORDER.app;
|
|
439
|
+
else if (source.startsWith("@/contexts"))
|
|
440
|
+
category = IMPORT_ORDER.contexts;
|
|
441
|
+
else if (source.startsWith("@/types"))
|
|
442
|
+
category = IMPORT_ORDER.types;
|
|
443
|
+
else if (source.startsWith("./") || source.startsWith("../"))
|
|
444
|
+
category = IMPORT_ORDER.relative;
|
|
445
|
+
imports.push({
|
|
446
|
+
text: line.trim(),
|
|
447
|
+
line: index + 1,
|
|
448
|
+
column,
|
|
449
|
+
endLine: index + 1,
|
|
450
|
+
endColumn,
|
|
451
|
+
category,
|
|
452
|
+
source,
|
|
453
|
+
});
|
|
454
|
+
});
|
|
455
|
+
return imports;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Unused Imports Detection
|
|
459
|
+
*
|
|
460
|
+
* Detects imports that are never used in the code.
|
|
461
|
+
* Handles edge cases:
|
|
462
|
+
* - Namespace access (MetadataRoute.Robots)
|
|
463
|
+
* - Type annotations in interfaces (children: ReactNode)
|
|
464
|
+
* - Type annotations in variable declarations (const x: Type)
|
|
465
|
+
* - Type parameters in generics (<T extends Type>)
|
|
466
|
+
*/
|
|
467
|
+
async checkUnusedImports() {
|
|
468
|
+
const startTime = Date.now();
|
|
469
|
+
const issues = [];
|
|
470
|
+
const files = await this.getFiles("{app,components,lib,hooks}/**/*.{ts,tsx}");
|
|
471
|
+
for (const file of files) {
|
|
472
|
+
const content = fs.readFileSync(file, "utf8");
|
|
473
|
+
const imports = this.extractNamedImports(content);
|
|
474
|
+
for (const imp of imports) {
|
|
475
|
+
// Skip invalid import names (e.g., containing special characters)
|
|
476
|
+
if (!imp.local || /[^a-zA-Z0-9_$]/.test(imp.local))
|
|
477
|
+
continue;
|
|
478
|
+
// Find the end of the import statement block (after all imports)
|
|
479
|
+
const importBlockEnd = this.findImportBlockEnd(content);
|
|
480
|
+
const codeAfterImports = importBlockEnd > -1 ? content.slice(importBlockEnd) : content;
|
|
481
|
+
// Check for various usage patterns
|
|
482
|
+
const escapedName = imp.local.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
483
|
+
// Simple word boundary check - most reliable for actual usage
|
|
484
|
+
const wordBoundaryRegex = new RegExp(`\\b${escapedName}\\b`);
|
|
485
|
+
// Check if the name appears anywhere in the code after the import block
|
|
486
|
+
if (wordBoundaryRegex.test(codeAfterImports)) {
|
|
487
|
+
continue; // It's used, skip
|
|
488
|
+
}
|
|
489
|
+
issues.push({
|
|
490
|
+
file,
|
|
491
|
+
line: imp.line,
|
|
492
|
+
column: imp.column,
|
|
493
|
+
endLine: imp.endLine,
|
|
494
|
+
endColumn: imp.endColumn,
|
|
495
|
+
type: "unused-import",
|
|
496
|
+
severity: "warning",
|
|
497
|
+
message: `Unused import '${imp.local}' from '${imp.module}'`,
|
|
498
|
+
suggestion: "Remove unused import",
|
|
499
|
+
snippet: imp.snippet,
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
return {
|
|
504
|
+
name: "Unused Imports",
|
|
505
|
+
passed: true,
|
|
506
|
+
blocking: false,
|
|
507
|
+
issues,
|
|
508
|
+
duration: Date.now() - startTime,
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Find where the import block ends (first non-import, non-empty, non-comment line)
|
|
513
|
+
*/
|
|
514
|
+
findImportBlockEnd(content) {
|
|
515
|
+
const lines = content.split("\n");
|
|
516
|
+
let inMultilineComment = false;
|
|
517
|
+
let foundImport = false;
|
|
518
|
+
let position = 0;
|
|
519
|
+
for (let i = 0; i < lines.length; i++) {
|
|
520
|
+
const line = lines[i];
|
|
521
|
+
const trimmed = line.trim();
|
|
522
|
+
// Track multiline comments
|
|
523
|
+
if (trimmed.startsWith("/*"))
|
|
524
|
+
inMultilineComment = true;
|
|
525
|
+
if (trimmed.endsWith("*/"))
|
|
526
|
+
inMultilineComment = false;
|
|
527
|
+
// Skip comments and empty lines
|
|
528
|
+
if (inMultilineComment ||
|
|
529
|
+
trimmed.startsWith("//") ||
|
|
530
|
+
trimmed.startsWith("*") ||
|
|
531
|
+
trimmed === "") {
|
|
532
|
+
position += line.length + 1;
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
535
|
+
// Skip "use client" / "use server" directives
|
|
536
|
+
if (trimmed.startsWith('"use ') || trimmed.startsWith("'use ")) {
|
|
537
|
+
position += line.length + 1;
|
|
538
|
+
continue;
|
|
539
|
+
}
|
|
540
|
+
// Import statement
|
|
541
|
+
if (trimmed.startsWith("import ")) {
|
|
542
|
+
foundImport = true;
|
|
543
|
+
position += line.length + 1;
|
|
544
|
+
continue;
|
|
545
|
+
}
|
|
546
|
+
// First non-import line after we've seen imports
|
|
547
|
+
if (foundImport) {
|
|
548
|
+
return position;
|
|
549
|
+
}
|
|
550
|
+
position += line.length + 1;
|
|
551
|
+
}
|
|
552
|
+
return position;
|
|
553
|
+
}
|
|
554
|
+
extractNamedImports(content) {
|
|
555
|
+
const imports = [];
|
|
556
|
+
// Only match actual import statements (start of line, allowing whitespace).
|
|
557
|
+
// This avoids false positives from commented documentation examples like:
|
|
558
|
+
// * import { foo } from 'bar';
|
|
559
|
+
const regex = /^\s*import\s+\{([^}]+)\}\s+from\s+['"]([^'"]+)['"]/gm;
|
|
560
|
+
let match;
|
|
561
|
+
while ((match = regex.exec(content)) !== null) {
|
|
562
|
+
const names = match[1].split(",").map((n) => {
|
|
563
|
+
const parts = n.trim().split(/\s+as\s+/);
|
|
564
|
+
return { imported: parts[0].trim(), local: parts[1] ? parts[1].trim() : parts[0].trim() };
|
|
565
|
+
});
|
|
566
|
+
const line = content.slice(0, match.index).split("\n").length;
|
|
567
|
+
names.forEach((n) => {
|
|
568
|
+
if (!n.local)
|
|
569
|
+
return;
|
|
570
|
+
// Best-effort location for the local identifier on the import line.
|
|
571
|
+
// We search from the import statement start index.
|
|
572
|
+
const nameIndex = content.indexOf(n.local, match.index);
|
|
573
|
+
const loc = nameIndex >= 0 ? indexToLineCol(content, nameIndex) : { line, col: 1 };
|
|
574
|
+
imports.push({
|
|
575
|
+
local: n.local,
|
|
576
|
+
module: match[2],
|
|
577
|
+
line: loc.line,
|
|
578
|
+
column: loc.col,
|
|
579
|
+
endLine: loc.line,
|
|
580
|
+
endColumn: loc.col + n.local.length,
|
|
581
|
+
index: match.index,
|
|
582
|
+
snippet: match[0].trim().substring(0, 120),
|
|
583
|
+
});
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
return imports;
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Server-Only Imports in Client Components
|
|
590
|
+
* Detects when client components import server-only modules like Prisma
|
|
591
|
+
*/
|
|
592
|
+
async checkServerOnlyImports() {
|
|
593
|
+
const startTime = Date.now();
|
|
594
|
+
const issues = [];
|
|
595
|
+
const files = await this.getFiles("{app,components,lib,hooks}/**/*.{ts,tsx}");
|
|
596
|
+
const serverOnlyPatterns = [
|
|
597
|
+
{
|
|
598
|
+
pattern: "@/lib/prisma",
|
|
599
|
+
suggestion: "Move data fetching to server component or API route",
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
pattern: "@prisma/client",
|
|
603
|
+
suggestion: "Move data fetching to server component or API route",
|
|
604
|
+
},
|
|
605
|
+
{ pattern: "server-only", suggestion: "This module is server-only" },
|
|
606
|
+
{ pattern: "@/lib/auth-server", suggestion: "Use @/lib/auth for client components" },
|
|
607
|
+
{ pattern: "@/lib/auth-server-utils", suggestion: "Use client-safe auth utilities" },
|
|
608
|
+
// Note: @/lib/listing-utils is now client-safe (Prisma code moved to listing-utils.server.ts)
|
|
609
|
+
{
|
|
610
|
+
pattern: "@/lib/listing-utils.server",
|
|
611
|
+
suggestion: "Use @/lib/listing-utils for client components",
|
|
612
|
+
clientSafe: "@/lib/listing-utils",
|
|
613
|
+
},
|
|
614
|
+
];
|
|
615
|
+
for (const file of files) {
|
|
616
|
+
const content = fs.readFileSync(file, "utf8");
|
|
617
|
+
const lines = content.split("\n");
|
|
618
|
+
// Check if this is a client component
|
|
619
|
+
const isClientComponent = lines.some((line, index) => index < 10 && line.trim().startsWith('"use client"'));
|
|
620
|
+
if (!isClientComponent)
|
|
621
|
+
continue;
|
|
622
|
+
lines.forEach((line, index) => {
|
|
623
|
+
const trimmedLine = line.trim();
|
|
624
|
+
// Skip comments
|
|
625
|
+
if (trimmedLine.startsWith("//") || trimmedLine.startsWith("*"))
|
|
626
|
+
return;
|
|
627
|
+
// Check for import statements
|
|
628
|
+
if (trimmedLine.startsWith("import")) {
|
|
629
|
+
for (const serverPattern of serverOnlyPatterns) {
|
|
630
|
+
// Skip type-only imports (they're safe)
|
|
631
|
+
if (trimmedLine.includes("import type") &&
|
|
632
|
+
trimmedLine.includes(serverPattern.pattern)) {
|
|
633
|
+
continue;
|
|
634
|
+
}
|
|
635
|
+
// Check for the pattern (but not the client-safe version)
|
|
636
|
+
const clientSafe = serverPattern.clientSafe;
|
|
637
|
+
if (trimmedLine.includes(serverPattern.pattern) &&
|
|
638
|
+
(!clientSafe || !trimmedLine.includes(clientSafe))) {
|
|
639
|
+
const colIdx = trimmedLine.indexOf(serverPattern.pattern);
|
|
640
|
+
const startColumn = colIdx >= 0 ? colIdx + 1 : undefined;
|
|
641
|
+
const endColumn = typeof startColumn === "number"
|
|
642
|
+
? startColumn + serverPattern.pattern.length
|
|
643
|
+
: undefined;
|
|
644
|
+
issues.push({
|
|
645
|
+
file,
|
|
646
|
+
line: index + 1,
|
|
647
|
+
column: startColumn,
|
|
648
|
+
endLine: index + 1,
|
|
649
|
+
endColumn,
|
|
650
|
+
type: "server-only-import",
|
|
651
|
+
severity: "error",
|
|
652
|
+
message: `Server-only import "${serverPattern.pattern}" in client component`,
|
|
653
|
+
suggestion: serverPattern.suggestion,
|
|
654
|
+
snippet: trimmedLine.substring(0, 80),
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
return {
|
|
662
|
+
name: "Server-Only Imports",
|
|
663
|
+
passed: issues.length === 0,
|
|
664
|
+
blocking: true,
|
|
665
|
+
issues,
|
|
666
|
+
duration: Date.now() - startTime,
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Missing Hook Imports
|
|
671
|
+
*/
|
|
672
|
+
async checkMissingHookImports() {
|
|
673
|
+
const startTime = Date.now();
|
|
674
|
+
const issues = [];
|
|
675
|
+
const files = await this.getFiles("{app,components,lib,hooks}/**/*.{ts,tsx}");
|
|
676
|
+
for (const file of files) {
|
|
677
|
+
const content = fs.readFileSync(file, "utf8");
|
|
678
|
+
const imports = this.extractAllImportedNames(content);
|
|
679
|
+
const localHooks = this.extractLocalHooks(content);
|
|
680
|
+
const cleanContent = this.removeComments(content);
|
|
681
|
+
const hookPattern = /\b(use[A-Z][a-zA-Z0-9]*)\s*\(/g;
|
|
682
|
+
let match;
|
|
683
|
+
while ((match = hookPattern.exec(cleanContent)) !== null) {
|
|
684
|
+
const hookName = match[1];
|
|
685
|
+
if (EXTERNAL_HOOKS.has(hookName) || imports.has(hookName) || localHooks.has(hookName))
|
|
686
|
+
continue;
|
|
687
|
+
const line = cleanContent.slice(0, match.index).split("\n").length;
|
|
688
|
+
issues.push({
|
|
689
|
+
file,
|
|
690
|
+
line,
|
|
691
|
+
type: "missing-hook-import",
|
|
692
|
+
severity: "error",
|
|
693
|
+
message: `Custom hook '${hookName}' is used but not imported`,
|
|
694
|
+
suggestion: `Add: import { ${hookName} } from "@/hooks/${hookName}";
|
|
695
|
+
import * as path from 'path';`,
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
// Deduplicate
|
|
700
|
+
const seen = new Set();
|
|
701
|
+
const dedupedIssues = issues.filter((i) => {
|
|
702
|
+
const key = `${i.file}:${i.message}`;
|
|
703
|
+
if (seen.has(key))
|
|
704
|
+
return false;
|
|
705
|
+
seen.add(key);
|
|
706
|
+
return true;
|
|
707
|
+
});
|
|
708
|
+
return {
|
|
709
|
+
name: "Missing Hook Imports",
|
|
710
|
+
passed: dedupedIssues.filter((i) => i.severity === "error").length === 0,
|
|
711
|
+
blocking: true,
|
|
712
|
+
issues: dedupedIssues,
|
|
713
|
+
duration: Date.now() - startTime,
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
extractAllImportedNames(content) {
|
|
717
|
+
const names = new Set();
|
|
718
|
+
const regex = /import\s*\{([^}]+)\}\s*from/g;
|
|
719
|
+
let match;
|
|
720
|
+
while ((match = regex.exec(content)) !== null) {
|
|
721
|
+
match[1].split(",").forEach((n) => {
|
|
722
|
+
const local = n
|
|
723
|
+
.trim()
|
|
724
|
+
.split(/\s+as\s+/)
|
|
725
|
+
.pop()
|
|
726
|
+
?.trim();
|
|
727
|
+
if (local)
|
|
728
|
+
names.add(local);
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
return names;
|
|
732
|
+
}
|
|
733
|
+
extractLocalHooks(content) {
|
|
734
|
+
const hooks = new Set();
|
|
735
|
+
// Standard function declarations: function useHookName(...) or function useHookName<T>(...)
|
|
736
|
+
const funcRegex = /function\s+(use[A-Z][a-zA-Z0-9]*)(?:<[^>]*>)?\s*\(/g;
|
|
737
|
+
// Arrow function or const assignment: const useHookName = ...
|
|
738
|
+
const arrowRegex = /(?:const|let|var)\s+(use[A-Z][a-zA-Z0-9]*)\s*=/g;
|
|
739
|
+
// require() destructuring: const { useHookName } = require(...)
|
|
740
|
+
const requireRegex = /const\s*\{\s*([^}]+)\s*\}\s*=\s*require\s*\(/g;
|
|
741
|
+
// export function (with possible generics): export function useHookName<T>(...)
|
|
742
|
+
const exportFuncRegex = /export\s+function\s+(use[A-Z][a-zA-Z0-9]*)(?:<[^>]*>)?\s*\(/g;
|
|
743
|
+
let match;
|
|
744
|
+
while ((match = funcRegex.exec(content)) !== null)
|
|
745
|
+
hooks.add(match[1]);
|
|
746
|
+
while ((match = arrowRegex.exec(content)) !== null)
|
|
747
|
+
hooks.add(match[1]);
|
|
748
|
+
while ((match = exportFuncRegex.exec(content)) !== null)
|
|
749
|
+
hooks.add(match[1]);
|
|
750
|
+
// Extract hook names from require destructuring
|
|
751
|
+
while ((match = requireRegex.exec(content)) !== null) {
|
|
752
|
+
const names = match[1].split(",").map((n) => n.trim());
|
|
753
|
+
names.forEach((name) => {
|
|
754
|
+
if (name.match(/^use[A-Z]/))
|
|
755
|
+
hooks.add(name);
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
return hooks;
|
|
759
|
+
}
|
|
760
|
+
removeComments(content) {
|
|
761
|
+
return content
|
|
762
|
+
.replace(/\/\/.*$/gm, "")
|
|
763
|
+
.replace(/\/\*[\s\S]*?\*\//g, "")
|
|
764
|
+
.replace(/`[^`]*`/g, '""');
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Run all import checks
|
|
768
|
+
*/
|
|
769
|
+
async runAll() {
|
|
770
|
+
const startTime = Date.now();
|
|
771
|
+
console.log(`\n${console_chars_1.emoji.package} CONSOLIDATED IMPORT VALIDATION PREFLIGHT`);
|
|
772
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
773
|
+
let checks;
|
|
774
|
+
console.log(`\n${console_chars_1.emoji.search} Running import checks...\n`);
|
|
775
|
+
if (this.parallel) {
|
|
776
|
+
// Run checks in parallel
|
|
777
|
+
checks = await Promise.all([
|
|
778
|
+
this.checkImportValidation(),
|
|
779
|
+
this.checkImportConsistency(),
|
|
780
|
+
this.checkServerOnlyImports(),
|
|
781
|
+
this.checkImportOrganization(),
|
|
782
|
+
this.checkUnusedImports(),
|
|
783
|
+
this.checkMissingHookImports(),
|
|
784
|
+
]);
|
|
785
|
+
}
|
|
786
|
+
else {
|
|
787
|
+
// Sequential execution
|
|
788
|
+
checks = [];
|
|
789
|
+
checks.push(await this.checkImportValidation());
|
|
790
|
+
checks.push(await this.checkImportConsistency());
|
|
791
|
+
checks.push(await this.checkServerOnlyImports());
|
|
792
|
+
checks.push(await this.checkImportOrganization());
|
|
793
|
+
checks.push(await this.checkUnusedImports());
|
|
794
|
+
checks.push(await this.checkMissingHookImports());
|
|
795
|
+
}
|
|
796
|
+
const totalDuration = Date.now() - startTime;
|
|
797
|
+
const allIssues = checks.flatMap((c) => c.issues);
|
|
798
|
+
const errors = allIssues.filter((i) => i.severity === "error").length;
|
|
799
|
+
const warnings = allIssues.filter((i) => i.severity === "warning").length;
|
|
800
|
+
const blockingFailed = checks.some((c) => c.blocking && !c.passed);
|
|
801
|
+
const summary = {
|
|
802
|
+
total: checks.length,
|
|
803
|
+
passed: checks.filter((c) => c.passed).length,
|
|
804
|
+
failed: checks.filter((c) => !c.passed).length,
|
|
805
|
+
errors,
|
|
806
|
+
warnings,
|
|
807
|
+
};
|
|
808
|
+
this.printResults(checks, totalDuration, summary);
|
|
809
|
+
emitFindingsFromIssues(allIssues);
|
|
810
|
+
return { module: "imports", passed: !blockingFailed, totalDuration, checks, summary };
|
|
811
|
+
}
|
|
812
|
+
printResults(checks, totalDuration, summary) {
|
|
813
|
+
console.log("\n" + (0, console_chars_1.createDivider)(80, "heavy"));
|
|
814
|
+
console.log(`${console_chars_1.emoji.chart} IMPORT VALIDATION RESULTS`);
|
|
815
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
816
|
+
checks.forEach((check) => {
|
|
817
|
+
const icon = check.passed
|
|
818
|
+
? `${console_chars_1.emoji.success}`
|
|
819
|
+
: check.blocking
|
|
820
|
+
? `${console_chars_1.emoji.error}`
|
|
821
|
+
: `${console_chars_1.emoji.warning}`;
|
|
822
|
+
const time = `${(check.duration / 1000).toFixed(1)}s`;
|
|
823
|
+
const count = check.issues.length > 0 ? ` (${check.issues.length} issues)` : "";
|
|
824
|
+
const blocking = check.blocking ? " [BLOCKING]" : "";
|
|
825
|
+
console.log(`${icon} ${check.name.padEnd(35)} ${time.padStart(8)}${count}${blocking}`);
|
|
826
|
+
// Always show issues for unused imports and import organization (even without verbose)
|
|
827
|
+
if (check.issues.length > 0 &&
|
|
828
|
+
(this.verbose || check.name === "Unused Imports" || check.name === "Import Organization")) {
|
|
829
|
+
const maxToShow = this.verbose ? 5 : 3;
|
|
830
|
+
check.issues.slice(0, maxToShow).forEach((issue) => {
|
|
831
|
+
const sev = issue.severity === "error" ? `${console_chars_1.emoji.error}` : `${console_chars_1.emoji.warning}`;
|
|
832
|
+
console.log(` ${sev} ${issue.file}:${issue.line} - ${issue.message}`);
|
|
833
|
+
});
|
|
834
|
+
if (check.issues.length > maxToShow)
|
|
835
|
+
console.log(` ... and ${check.issues.length - maxToShow} more`);
|
|
836
|
+
}
|
|
837
|
+
});
|
|
838
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
839
|
+
console.log(`Total Checks: ${summary.total}`);
|
|
840
|
+
console.log(`${console_chars_1.emoji.success} Passed: ${summary.passed}`);
|
|
841
|
+
console.log(`${console_chars_1.emoji.error} Failed: ${summary.failed}`);
|
|
842
|
+
console.log(`${console_chars_1.emoji.stop} Errors: ${summary.errors}`);
|
|
843
|
+
console.log(`${console_chars_1.emoji.warning} Warnings: ${summary.warnings}`);
|
|
844
|
+
console.log(`${console_chars_1.emoji.clock} Total Time: ${(totalDuration / 1000).toFixed(1)}s`);
|
|
845
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
846
|
+
// Show specific warnings for unused imports and import order
|
|
847
|
+
const unusedCheck = checks.find((c) => c.name === "Unused Imports");
|
|
848
|
+
const orderCheck = checks.find((c) => c.name === "Import Organization");
|
|
849
|
+
if ((unusedCheck && unusedCheck.issues.length > 0) ||
|
|
850
|
+
(orderCheck && orderCheck.issues.length > 0)) {
|
|
851
|
+
console.log(`\n${console_chars_1.emoji.warning} IMPORT WARNINGS DETECTED:`);
|
|
852
|
+
if (unusedCheck && unusedCheck.issues.length > 0) {
|
|
853
|
+
console.log(` ${console_chars_1.chars.bullet} ${unusedCheck.issues.length} unused imports found`);
|
|
854
|
+
console.log(" Run: pnpm fix:unused-imports (or manually remove)");
|
|
855
|
+
}
|
|
856
|
+
if (orderCheck && orderCheck.issues.length > 0) {
|
|
857
|
+
console.log(` ${console_chars_1.chars.bullet} ${orderCheck.issues.length} import order issues found`);
|
|
858
|
+
console.log(" Run: pnpm fix:import-order (ESLint auto-fix)");
|
|
859
|
+
}
|
|
860
|
+
console.log("");
|
|
861
|
+
}
|
|
862
|
+
console.log(`\n${console_chars_1.emoji.clipboard} Import Best Practices:`);
|
|
863
|
+
console.log(` ${console_chars_1.chars.bullet} Import UI from @/components/ui (not @supercatch/ui)`);
|
|
864
|
+
console.log(" ${chars.bullet} Order: React ${chars.arrow} Third-party → @/components/ui → @/components → @/hooks → @/lib → Relative");
|
|
865
|
+
console.log(` ${console_chars_1.chars.bullet} Remove unused imports`);
|
|
866
|
+
console.log(` ${console_chars_1.chars.bullet} Import all custom hooks before using`);
|
|
867
|
+
if (summary.errors === 0) {
|
|
868
|
+
console.log(`\n${console_chars_1.emoji.success} IMPORT VALIDATION PASSED`);
|
|
869
|
+
if (summary.warnings > 0) {
|
|
870
|
+
console.log(` (${summary.warnings} warnings - consider fixing for cleaner code)`);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
else {
|
|
874
|
+
console.log(`\n${console_chars_1.emoji.error} IMPORT VALIDATION FAILED`);
|
|
875
|
+
console.log(` ${summary.errors} error(s) must be fixed`);
|
|
876
|
+
console.log(`\n${console_chars_1.emoji.hint} Auto-fix available: pnpm fix:import-consistency`);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
exports.ImportsPreflightModule = ImportsPreflightModule;
|
|
881
|
+
// CLI INTERFACE
|
|
882
|
+
async function main() {
|
|
883
|
+
const reporter = (0, universal_progress_reporter_1.createUniversalProgressReporter)(path.basename(__filename, ".ts"));
|
|
884
|
+
const args = process.argv.slice(2);
|
|
885
|
+
const mode = args.find((a) => !a.startsWith("-")) || "all";
|
|
886
|
+
const verbose = args.includes("--verbose") || args.includes("-v");
|
|
887
|
+
const parallel = args.includes("--parallel") || args.includes("-p");
|
|
888
|
+
const module = new ImportsPreflightModule({ verbose, parallel });
|
|
889
|
+
try {
|
|
890
|
+
let result;
|
|
891
|
+
const runSingle = async (name, checkFn) => {
|
|
892
|
+
console.log(`\n${console_chars_1.emoji.search} Running ${name} check...\n`);
|
|
893
|
+
const check = await checkFn();
|
|
894
|
+
// Print results for single check
|
|
895
|
+
const icon = check.passed
|
|
896
|
+
? `${console_chars_1.emoji.success}`
|
|
897
|
+
: check.blocking
|
|
898
|
+
? `${console_chars_1.emoji.error}`
|
|
899
|
+
: `${console_chars_1.emoji.warning}`;
|
|
900
|
+
const time = `${(check.duration / 1000).toFixed(1)}s`;
|
|
901
|
+
const count = check.issues.length > 0 ? ` (${check.issues.length} issues)` : "";
|
|
902
|
+
const blocking = check.blocking ? " [BLOCKING]" : "";
|
|
903
|
+
console.log((0, console_chars_1.createDivider)(70, "heavy"));
|
|
904
|
+
console.log(`${icon} ${check.name.padEnd(35)} ${time.padStart(8)}${count}${blocking}`);
|
|
905
|
+
console.log((0, console_chars_1.createDivider)(70, "heavy"));
|
|
906
|
+
if (check.issues.length > 0) {
|
|
907
|
+
console.log("\nIssues found:\n");
|
|
908
|
+
check.issues.slice(0, 20).forEach((issue) => {
|
|
909
|
+
const sev = issue.severity === "error" ? `${console_chars_1.emoji.error}` : `${console_chars_1.emoji.warning}`;
|
|
910
|
+
console.log(`${sev} ${issue.file}:${issue.line}`);
|
|
911
|
+
console.log(` ${issue.message}`);
|
|
912
|
+
if (issue.suggestion)
|
|
913
|
+
console.log(` ${console_chars_1.emoji.hint} ${issue.suggestion}`);
|
|
914
|
+
});
|
|
915
|
+
if (check.issues.length > 20) {
|
|
916
|
+
console.log(`\n... and ${check.issues.length - 20} more issues`);
|
|
917
|
+
}
|
|
918
|
+
// Show fix commands
|
|
919
|
+
if (check.name === "Unused Imports") {
|
|
920
|
+
console.log(`\n${console_chars_1.emoji.hint} Auto-fix: pnpm fix:unused-imports`);
|
|
921
|
+
console.log(" Preview: pnpm fix:unused-imports --dry-run");
|
|
922
|
+
}
|
|
923
|
+
else if (check.name === "Import Organization") {
|
|
924
|
+
console.log(`\n${console_chars_1.emoji.hint} Auto-fix: pnpm fix:import-order`);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
emitFindingsFromIssues(check.issues);
|
|
928
|
+
console.log("");
|
|
929
|
+
return {
|
|
930
|
+
module: `imports:${name}`,
|
|
931
|
+
passed: check.passed,
|
|
932
|
+
totalDuration: check.duration,
|
|
933
|
+
checks: [check],
|
|
934
|
+
summary: {
|
|
935
|
+
total: 1,
|
|
936
|
+
passed: check.passed ? 1 : 0,
|
|
937
|
+
failed: check.passed ? 0 : 1,
|
|
938
|
+
errors: check.issues.filter((i) => i.severity === "error").length,
|
|
939
|
+
warnings: check.issues.filter((i) => i.severity === "warning").length,
|
|
940
|
+
},
|
|
941
|
+
};
|
|
942
|
+
};
|
|
943
|
+
switch (mode) {
|
|
944
|
+
case "validation":
|
|
945
|
+
result = await runSingle("validation", () => module.checkImportValidation());
|
|
946
|
+
break;
|
|
947
|
+
case "consistency":
|
|
948
|
+
result = await runSingle("consistency", () => module.checkImportConsistency());
|
|
949
|
+
break;
|
|
950
|
+
case "server-only":
|
|
951
|
+
result = await runSingle("server-only", () => module.checkServerOnlyImports());
|
|
952
|
+
break;
|
|
953
|
+
case "organization":
|
|
954
|
+
result = await runSingle("organization", () => module.checkImportOrganization());
|
|
955
|
+
break;
|
|
956
|
+
case "unused":
|
|
957
|
+
result = await runSingle("unused", () => module.checkUnusedImports());
|
|
958
|
+
break;
|
|
959
|
+
case "hooks":
|
|
960
|
+
result = await runSingle("hooks", () => module.checkMissingHookImports());
|
|
961
|
+
break;
|
|
962
|
+
case "all":
|
|
963
|
+
default:
|
|
964
|
+
result = await module.runAll();
|
|
965
|
+
break;
|
|
966
|
+
}
|
|
967
|
+
process.exit(result.passed ? 0 : 1);
|
|
968
|
+
}
|
|
969
|
+
catch (error) {
|
|
970
|
+
console.error(`${console_chars_1.emoji.error} Fatal error:`, error);
|
|
971
|
+
process.exit(1);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
if (require.main === module) {
|
|
975
|
+
main();
|
|
976
|
+
}
|
|
977
|
+
//# sourceMappingURL=imports.js.map
|