driftdetect-detectors 0.1.0
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/accessibility/alt-text.d.ts +63 -0
- package/dist/accessibility/alt-text.d.ts.map +1 -0
- package/dist/accessibility/alt-text.js +100 -0
- package/dist/accessibility/alt-text.js.map +1 -0
- package/dist/accessibility/aria-roles.d.ts +65 -0
- package/dist/accessibility/aria-roles.d.ts.map +1 -0
- package/dist/accessibility/aria-roles.js +87 -0
- package/dist/accessibility/aria-roles.js.map +1 -0
- package/dist/accessibility/focus-management.d.ts +62 -0
- package/dist/accessibility/focus-management.d.ts.map +1 -0
- package/dist/accessibility/focus-management.js +88 -0
- package/dist/accessibility/focus-management.js.map +1 -0
- package/dist/accessibility/heading-hierarchy.d.ts +66 -0
- package/dist/accessibility/heading-hierarchy.d.ts.map +1 -0
- package/dist/accessibility/heading-hierarchy.js +94 -0
- package/dist/accessibility/heading-hierarchy.js.map +1 -0
- package/dist/accessibility/index.d.ts +25 -0
- package/dist/accessibility/index.d.ts.map +1 -0
- package/dist/accessibility/index.js +21 -0
- package/dist/accessibility/index.js.map +1 -0
- package/dist/accessibility/keyboard-nav.d.ts +63 -0
- package/dist/accessibility/keyboard-nav.d.ts.map +1 -0
- package/dist/accessibility/keyboard-nav.js +86 -0
- package/dist/accessibility/keyboard-nav.js.map +1 -0
- package/dist/accessibility/semantic-html.d.ts +76 -0
- package/dist/accessibility/semantic-html.d.ts.map +1 -0
- package/dist/accessibility/semantic-html.js +204 -0
- package/dist/accessibility/semantic-html.js.map +1 -0
- package/dist/api/client-patterns.d.ts +121 -0
- package/dist/api/client-patterns.d.ts.map +1 -0
- package/dist/api/client-patterns.js +478 -0
- package/dist/api/client-patterns.js.map +1 -0
- package/dist/api/error-format.d.ts +140 -0
- package/dist/api/error-format.d.ts.map +1 -0
- package/dist/api/error-format.js +614 -0
- package/dist/api/error-format.js.map +1 -0
- package/dist/api/http-methods.d.ts +255 -0
- package/dist/api/http-methods.d.ts.map +1 -0
- package/dist/api/http-methods.js +890 -0
- package/dist/api/http-methods.js.map +1 -0
- package/dist/api/index.d.ts +16 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +37 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/pagination.d.ts +133 -0
- package/dist/api/pagination.d.ts.map +1 -0
- package/dist/api/pagination.js +521 -0
- package/dist/api/pagination.js.map +1 -0
- package/dist/api/response-envelope.d.ts +261 -0
- package/dist/api/response-envelope.d.ts.map +1 -0
- package/dist/api/response-envelope.js +1050 -0
- package/dist/api/response-envelope.js.map +1 -0
- package/dist/api/retry-patterns.d.ts +117 -0
- package/dist/api/retry-patterns.d.ts.map +1 -0
- package/dist/api/retry-patterns.js +480 -0
- package/dist/api/retry-patterns.js.map +1 -0
- package/dist/api/route-structure.d.ts +128 -0
- package/dist/api/route-structure.d.ts.map +1 -0
- package/dist/api/route-structure.js +738 -0
- package/dist/api/route-structure.js.map +1 -0
- package/dist/auth/audit-logging.d.ts +80 -0
- package/dist/auth/audit-logging.d.ts.map +1 -0
- package/dist/auth/audit-logging.js +370 -0
- package/dist/auth/audit-logging.js.map +1 -0
- package/dist/auth/index.d.ts +33 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +49 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/middleware-usage.d.ts +65 -0
- package/dist/auth/middleware-usage.d.ts.map +1 -0
- package/dist/auth/middleware-usage.js +192 -0
- package/dist/auth/middleware-usage.js.map +1 -0
- package/dist/auth/permission-checks.d.ts +60 -0
- package/dist/auth/permission-checks.d.ts.map +1 -0
- package/dist/auth/permission-checks.js +159 -0
- package/dist/auth/permission-checks.js.map +1 -0
- package/dist/auth/rbac-patterns.d.ts +68 -0
- package/dist/auth/rbac-patterns.d.ts.map +1 -0
- package/dist/auth/rbac-patterns.js +143 -0
- package/dist/auth/rbac-patterns.js.map +1 -0
- package/dist/auth/resource-ownership.d.ts +77 -0
- package/dist/auth/resource-ownership.d.ts.map +1 -0
- package/dist/auth/resource-ownership.js +324 -0
- package/dist/auth/resource-ownership.js.map +1 -0
- package/dist/auth/token-handling.d.ts +64 -0
- package/dist/auth/token-handling.d.ts.map +1 -0
- package/dist/auth/token-handling.js +151 -0
- package/dist/auth/token-handling.js.map +1 -0
- package/dist/base/ast-detector.d.ts +421 -0
- package/dist/base/ast-detector.d.ts.map +1 -0
- package/dist/base/ast-detector.js +699 -0
- package/dist/base/ast-detector.js.map +1 -0
- package/dist/base/base-detector.d.ts +366 -0
- package/dist/base/base-detector.d.ts.map +1 -0
- package/dist/base/base-detector.js +170 -0
- package/dist/base/base-detector.js.map +1 -0
- package/dist/base/index.d.ts +12 -0
- package/dist/base/index.d.ts.map +1 -0
- package/dist/base/index.js +17 -0
- package/dist/base/index.js.map +1 -0
- package/dist/base/regex-detector.d.ts +421 -0
- package/dist/base/regex-detector.d.ts.map +1 -0
- package/dist/base/regex-detector.js +537 -0
- package/dist/base/regex-detector.js.map +1 -0
- package/dist/base/structural-detector.d.ts +424 -0
- package/dist/base/structural-detector.d.ts.map +1 -0
- package/dist/base/structural-detector.js +731 -0
- package/dist/base/structural-detector.js.map +1 -0
- package/dist/base/types.d.ts +53 -0
- package/dist/base/types.d.ts.map +1 -0
- package/dist/base/types.js +5 -0
- package/dist/base/types.js.map +1 -0
- package/dist/components/component-structure.d.ts +163 -0
- package/dist/components/component-structure.d.ts.map +1 -0
- package/dist/components/component-structure.js +500 -0
- package/dist/components/component-structure.js.map +1 -0
- package/dist/components/composition.d.ts +287 -0
- package/dist/components/composition.d.ts.map +1 -0
- package/dist/components/composition.js +1123 -0
- package/dist/components/composition.js.map +1 -0
- package/dist/components/duplicate-detection.d.ts +251 -0
- package/dist/components/duplicate-detection.d.ts.map +1 -0
- package/dist/components/duplicate-detection.js +804 -0
- package/dist/components/duplicate-detection.js.map +1 -0
- package/dist/components/index.d.ts +16 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +51 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/near-duplicate.d.ts +402 -0
- package/dist/components/near-duplicate.d.ts.map +1 -0
- package/dist/components/near-duplicate.js +1090 -0
- package/dist/components/near-duplicate.js.map +1 -0
- package/dist/components/props-patterns.d.ts +194 -0
- package/dist/components/props-patterns.d.ts.map +1 -0
- package/dist/components/props-patterns.js +795 -0
- package/dist/components/props-patterns.js.map +1 -0
- package/dist/components/ref-forwarding.d.ts +250 -0
- package/dist/components/ref-forwarding.d.ts.map +1 -0
- package/dist/components/ref-forwarding.js +832 -0
- package/dist/components/ref-forwarding.js.map +1 -0
- package/dist/components/state-patterns.d.ts +291 -0
- package/dist/components/state-patterns.d.ts.map +1 -0
- package/dist/components/state-patterns.js +970 -0
- package/dist/components/state-patterns.js.map +1 -0
- package/dist/config/config-validation.d.ts +74 -0
- package/dist/config/config-validation.d.ts.map +1 -0
- package/dist/config/config-validation.js +446 -0
- package/dist/config/config-validation.js.map +1 -0
- package/dist/config/default-values.d.ts +72 -0
- package/dist/config/default-values.d.ts.map +1 -0
- package/dist/config/default-values.js +386 -0
- package/dist/config/default-values.js.map +1 -0
- package/dist/config/env-naming.d.ts +73 -0
- package/dist/config/env-naming.d.ts.map +1 -0
- package/dist/config/env-naming.js +429 -0
- package/dist/config/env-naming.js.map +1 -0
- package/dist/config/environment-detection.d.ts +72 -0
- package/dist/config/environment-detection.d.ts.map +1 -0
- package/dist/config/environment-detection.js +400 -0
- package/dist/config/environment-detection.js.map +1 -0
- package/dist/config/feature-flags.d.ts +72 -0
- package/dist/config/feature-flags.d.ts.map +1 -0
- package/dist/config/feature-flags.js +384 -0
- package/dist/config/feature-flags.js.map +1 -0
- package/dist/config/index.d.ts +27 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +43 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/required-optional.d.ts +71 -0
- package/dist/config/required-optional.d.ts.map +1 -0
- package/dist/config/required-optional.js +344 -0
- package/dist/config/required-optional.js.map +1 -0
- package/dist/data-access/connection-pooling.d.ts +63 -0
- package/dist/data-access/connection-pooling.d.ts.map +1 -0
- package/dist/data-access/connection-pooling.js +297 -0
- package/dist/data-access/connection-pooling.js.map +1 -0
- package/dist/data-access/dto-patterns.d.ts +64 -0
- package/dist/data-access/dto-patterns.d.ts.map +1 -0
- package/dist/data-access/dto-patterns.js +291 -0
- package/dist/data-access/dto-patterns.js.map +1 -0
- package/dist/data-access/index.d.ts +31 -0
- package/dist/data-access/index.d.ts.map +1 -0
- package/dist/data-access/index.js +49 -0
- package/dist/data-access/index.js.map +1 -0
- package/dist/data-access/n-plus-one.d.ts +60 -0
- package/dist/data-access/n-plus-one.d.ts.map +1 -0
- package/dist/data-access/n-plus-one.js +264 -0
- package/dist/data-access/n-plus-one.js.map +1 -0
- package/dist/data-access/query-patterns.d.ts +64 -0
- package/dist/data-access/query-patterns.d.ts.map +1 -0
- package/dist/data-access/query-patterns.js +314 -0
- package/dist/data-access/query-patterns.js.map +1 -0
- package/dist/data-access/repository-pattern.d.ts +62 -0
- package/dist/data-access/repository-pattern.d.ts.map +1 -0
- package/dist/data-access/repository-pattern.js +257 -0
- package/dist/data-access/repository-pattern.js.map +1 -0
- package/dist/data-access/transaction-patterns.d.ts +61 -0
- package/dist/data-access/transaction-patterns.d.ts.map +1 -0
- package/dist/data-access/transaction-patterns.js +277 -0
- package/dist/data-access/transaction-patterns.js.map +1 -0
- package/dist/data-access/validation-patterns.d.ts +62 -0
- package/dist/data-access/validation-patterns.d.ts.map +1 -0
- package/dist/data-access/validation-patterns.js +301 -0
- package/dist/data-access/validation-patterns.js.map +1 -0
- package/dist/documentation/deprecation.d.ts +62 -0
- package/dist/documentation/deprecation.d.ts.map +1 -0
- package/dist/documentation/deprecation.js +83 -0
- package/dist/documentation/deprecation.js.map +1 -0
- package/dist/documentation/example-code.d.ts +64 -0
- package/dist/documentation/example-code.d.ts.map +1 -0
- package/dist/documentation/example-code.js +79 -0
- package/dist/documentation/example-code.js.map +1 -0
- package/dist/documentation/index.d.ts +22 -0
- package/dist/documentation/index.d.ts.map +1 -0
- package/dist/documentation/index.js +19 -0
- package/dist/documentation/index.js.map +1 -0
- package/dist/documentation/jsdoc-patterns.d.ts +72 -0
- package/dist/documentation/jsdoc-patterns.d.ts.map +1 -0
- package/dist/documentation/jsdoc-patterns.js +92 -0
- package/dist/documentation/jsdoc-patterns.js.map +1 -0
- package/dist/documentation/readme-structure.d.ts +67 -0
- package/dist/documentation/readme-structure.d.ts.map +1 -0
- package/dist/documentation/readme-structure.js +76 -0
- package/dist/documentation/readme-structure.js.map +1 -0
- package/dist/documentation/todo-patterns.d.ts +67 -0
- package/dist/documentation/todo-patterns.d.ts.map +1 -0
- package/dist/documentation/todo-patterns.js +73 -0
- package/dist/documentation/todo-patterns.js.map +1 -0
- package/dist/errors/async-errors.d.ts +72 -0
- package/dist/errors/async-errors.d.ts.map +1 -0
- package/dist/errors/async-errors.js +214 -0
- package/dist/errors/async-errors.js.map +1 -0
- package/dist/errors/circuit-breaker.d.ts +53 -0
- package/dist/errors/circuit-breaker.d.ts.map +1 -0
- package/dist/errors/circuit-breaker.js +241 -0
- package/dist/errors/circuit-breaker.js.map +1 -0
- package/dist/errors/error-codes.d.ts +73 -0
- package/dist/errors/error-codes.d.ts.map +1 -0
- package/dist/errors/error-codes.js +211 -0
- package/dist/errors/error-codes.js.map +1 -0
- package/dist/errors/error-logging.d.ts +73 -0
- package/dist/errors/error-logging.d.ts.map +1 -0
- package/dist/errors/error-logging.js +256 -0
- package/dist/errors/error-logging.js.map +1 -0
- package/dist/errors/error-propagation.d.ts +73 -0
- package/dist/errors/error-propagation.d.ts.map +1 -0
- package/dist/errors/error-propagation.js +244 -0
- package/dist/errors/error-propagation.js.map +1 -0
- package/dist/errors/exception-hierarchy.d.ts +75 -0
- package/dist/errors/exception-hierarchy.d.ts.map +1 -0
- package/dist/errors/exception-hierarchy.js +259 -0
- package/dist/errors/exception-hierarchy.js.map +1 -0
- package/dist/errors/index.d.ts +31 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +49 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/try-catch-placement.d.ts +73 -0
- package/dist/errors/try-catch-placement.d.ts.map +1 -0
- package/dist/errors/try-catch-placement.js +214 -0
- package/dist/errors/try-catch-placement.js.map +1 -0
- package/dist/index.d.ts +221 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +245 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/context-fields.d.ts +48 -0
- package/dist/logging/context-fields.d.ts.map +1 -0
- package/dist/logging/context-fields.js +160 -0
- package/dist/logging/context-fields.js.map +1 -0
- package/dist/logging/correlation-ids.d.ts +44 -0
- package/dist/logging/correlation-ids.d.ts.map +1 -0
- package/dist/logging/correlation-ids.js +144 -0
- package/dist/logging/correlation-ids.js.map +1 -0
- package/dist/logging/health-checks.d.ts +45 -0
- package/dist/logging/health-checks.d.ts.map +1 -0
- package/dist/logging/health-checks.js +165 -0
- package/dist/logging/health-checks.js.map +1 -0
- package/dist/logging/index.d.ts +31 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +49 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/log-levels.d.ts +46 -0
- package/dist/logging/log-levels.d.ts.map +1 -0
- package/dist/logging/log-levels.js +178 -0
- package/dist/logging/log-levels.js.map +1 -0
- package/dist/logging/metric-naming.d.ts +46 -0
- package/dist/logging/metric-naming.d.ts.map +1 -0
- package/dist/logging/metric-naming.js +157 -0
- package/dist/logging/metric-naming.js.map +1 -0
- package/dist/logging/pii-redaction.d.ts +44 -0
- package/dist/logging/pii-redaction.d.ts.map +1 -0
- package/dist/logging/pii-redaction.js +166 -0
- package/dist/logging/pii-redaction.js.map +1 -0
- package/dist/logging/structured-format.d.ts +53 -0
- package/dist/logging/structured-format.d.ts.map +1 -0
- package/dist/logging/structured-format.js +235 -0
- package/dist/logging/structured-format.js.map +1 -0
- package/dist/performance/bundle-size.d.ts +79 -0
- package/dist/performance/bundle-size.d.ts.map +1 -0
- package/dist/performance/bundle-size.js +276 -0
- package/dist/performance/bundle-size.js.map +1 -0
- package/dist/performance/caching-patterns.d.ts +78 -0
- package/dist/performance/caching-patterns.d.ts.map +1 -0
- package/dist/performance/caching-patterns.js +257 -0
- package/dist/performance/caching-patterns.js.map +1 -0
- package/dist/performance/code-splitting.d.ts +86 -0
- package/dist/performance/code-splitting.d.ts.map +1 -0
- package/dist/performance/code-splitting.js +447 -0
- package/dist/performance/code-splitting.js.map +1 -0
- package/dist/performance/debounce-throttle.d.ts +75 -0
- package/dist/performance/debounce-throttle.d.ts.map +1 -0
- package/dist/performance/debounce-throttle.js +232 -0
- package/dist/performance/debounce-throttle.js.map +1 -0
- package/dist/performance/index.d.ts +28 -0
- package/dist/performance/index.d.ts.map +1 -0
- package/dist/performance/index.js +39 -0
- package/dist/performance/index.js.map +1 -0
- package/dist/performance/lazy-loading.d.ts +75 -0
- package/dist/performance/lazy-loading.d.ts.map +1 -0
- package/dist/performance/lazy-loading.js +233 -0
- package/dist/performance/lazy-loading.js.map +1 -0
- package/dist/performance/memoization.d.ts +75 -0
- package/dist/performance/memoization.d.ts.map +1 -0
- package/dist/performance/memoization.js +251 -0
- package/dist/performance/memoization.js.map +1 -0
- package/dist/registry/detector-registry.d.ts +266 -0
- package/dist/registry/detector-registry.d.ts.map +1 -0
- package/dist/registry/detector-registry.js +526 -0
- package/dist/registry/detector-registry.js.map +1 -0
- package/dist/registry/index.d.ts +10 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +10 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/loader.d.ts +232 -0
- package/dist/registry/loader.d.ts.map +1 -0
- package/dist/registry/loader.js +419 -0
- package/dist/registry/loader.js.map +1 -0
- package/dist/registry/types.d.ts +111 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +19 -0
- package/dist/registry/types.js.map +1 -0
- package/dist/security/csp-headers.d.ts +78 -0
- package/dist/security/csp-headers.d.ts.map +1 -0
- package/dist/security/csp-headers.js +401 -0
- package/dist/security/csp-headers.js.map +1 -0
- package/dist/security/csrf-protection.d.ts +72 -0
- package/dist/security/csrf-protection.d.ts.map +1 -0
- package/dist/security/csrf-protection.js +344 -0
- package/dist/security/csrf-protection.js.map +1 -0
- package/dist/security/index.d.ts +30 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +48 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/input-sanitization.d.ts +74 -0
- package/dist/security/input-sanitization.d.ts.map +1 -0
- package/dist/security/input-sanitization.js +373 -0
- package/dist/security/input-sanitization.js.map +1 -0
- package/dist/security/rate-limiting.d.ts +81 -0
- package/dist/security/rate-limiting.d.ts.map +1 -0
- package/dist/security/rate-limiting.js +535 -0
- package/dist/security/rate-limiting.js.map +1 -0
- package/dist/security/secret-management.d.ts +83 -0
- package/dist/security/secret-management.d.ts.map +1 -0
- package/dist/security/secret-management.js +547 -0
- package/dist/security/secret-management.js.map +1 -0
- package/dist/security/sql-injection.d.ts +76 -0
- package/dist/security/sql-injection.d.ts.map +1 -0
- package/dist/security/sql-injection.js +383 -0
- package/dist/security/sql-injection.js.map +1 -0
- package/dist/security/xss-prevention.d.ts +80 -0
- package/dist/security/xss-prevention.d.ts.map +1 -0
- package/dist/security/xss-prevention.js +416 -0
- package/dist/security/xss-prevention.js.map +1 -0
- package/dist/structural/barrel-exports.d.ts +178 -0
- package/dist/structural/barrel-exports.d.ts.map +1 -0
- package/dist/structural/barrel-exports.js +553 -0
- package/dist/structural/barrel-exports.js.map +1 -0
- package/dist/structural/circular-deps.d.ts +140 -0
- package/dist/structural/circular-deps.d.ts.map +1 -0
- package/dist/structural/circular-deps.js +422 -0
- package/dist/structural/circular-deps.js.map +1 -0
- package/dist/structural/co-location.d.ts +202 -0
- package/dist/structural/co-location.d.ts.map +1 -0
- package/dist/structural/co-location.js +640 -0
- package/dist/structural/co-location.js.map +1 -0
- package/dist/structural/directory-structure.d.ts +151 -0
- package/dist/structural/directory-structure.d.ts.map +1 -0
- package/dist/structural/directory-structure.js +457 -0
- package/dist/structural/directory-structure.js.map +1 -0
- package/dist/structural/file-naming.d.ts +61 -0
- package/dist/structural/file-naming.d.ts.map +1 -0
- package/dist/structural/file-naming.js +231 -0
- package/dist/structural/file-naming.js.map +1 -0
- package/dist/structural/import-ordering.d.ts +212 -0
- package/dist/structural/import-ordering.d.ts.map +1 -0
- package/dist/structural/import-ordering.js +821 -0
- package/dist/structural/import-ordering.js.map +1 -0
- package/dist/structural/index.d.ts +23 -0
- package/dist/structural/index.d.ts.map +1 -0
- package/dist/structural/index.js +26 -0
- package/dist/structural/index.js.map +1 -0
- package/dist/structural/module-boundaries.d.ts +164 -0
- package/dist/structural/module-boundaries.d.ts.map +1 -0
- package/dist/structural/module-boundaries.js +616 -0
- package/dist/structural/module-boundaries.js.map +1 -0
- package/dist/structural/package-boundaries.d.ts +182 -0
- package/dist/structural/package-boundaries.d.ts.map +1 -0
- package/dist/structural/package-boundaries.js +602 -0
- package/dist/structural/package-boundaries.js.map +1 -0
- package/dist/styling/class-naming.d.ts +263 -0
- package/dist/styling/class-naming.d.ts.map +1 -0
- package/dist/styling/class-naming.js +892 -0
- package/dist/styling/class-naming.js.map +1 -0
- package/dist/styling/color-usage.d.ts +213 -0
- package/dist/styling/color-usage.d.ts.map +1 -0
- package/dist/styling/color-usage.js +732 -0
- package/dist/styling/color-usage.js.map +1 -0
- package/dist/styling/design-tokens.d.ts +212 -0
- package/dist/styling/design-tokens.d.ts.map +1 -0
- package/dist/styling/design-tokens.js +748 -0
- package/dist/styling/design-tokens.js.map +1 -0
- package/dist/styling/index.d.ts +16 -0
- package/dist/styling/index.d.ts.map +1 -0
- package/dist/styling/index.js +56 -0
- package/dist/styling/index.js.map +1 -0
- package/dist/styling/responsive.d.ts +304 -0
- package/dist/styling/responsive.d.ts.map +1 -0
- package/dist/styling/responsive.js +888 -0
- package/dist/styling/responsive.js.map +1 -0
- package/dist/styling/spacing-scale.d.ts +248 -0
- package/dist/styling/spacing-scale.d.ts.map +1 -0
- package/dist/styling/spacing-scale.js +865 -0
- package/dist/styling/spacing-scale.js.map +1 -0
- package/dist/styling/tailwind-patterns.d.ts +305 -0
- package/dist/styling/tailwind-patterns.d.ts.map +1 -0
- package/dist/styling/tailwind-patterns.js +1181 -0
- package/dist/styling/tailwind-patterns.js.map +1 -0
- package/dist/styling/typography.d.ts +281 -0
- package/dist/styling/typography.d.ts.map +1 -0
- package/dist/styling/typography.js +1004 -0
- package/dist/styling/typography.js.map +1 -0
- package/dist/styling/z-index-scale.d.ts +270 -0
- package/dist/styling/z-index-scale.d.ts.map +1 -0
- package/dist/styling/z-index-scale.js +714 -0
- package/dist/styling/z-index-scale.js.map +1 -0
- package/dist/testing/co-location.d.ts +42 -0
- package/dist/testing/co-location.d.ts.map +1 -0
- package/dist/testing/co-location.js +134 -0
- package/dist/testing/co-location.js.map +1 -0
- package/dist/testing/describe-naming.d.ts +47 -0
- package/dist/testing/describe-naming.d.ts.map +1 -0
- package/dist/testing/describe-naming.js +150 -0
- package/dist/testing/describe-naming.js.map +1 -0
- package/dist/testing/file-naming.d.ts +44 -0
- package/dist/testing/file-naming.d.ts.map +1 -0
- package/dist/testing/file-naming.js +131 -0
- package/dist/testing/file-naming.js.map +1 -0
- package/dist/testing/fixture-patterns.d.ts +52 -0
- package/dist/testing/fixture-patterns.d.ts.map +1 -0
- package/dist/testing/fixture-patterns.js +228 -0
- package/dist/testing/fixture-patterns.js.map +1 -0
- package/dist/testing/index.d.ts +31 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +49 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/mock-patterns.d.ts +53 -0
- package/dist/testing/mock-patterns.d.ts.map +1 -0
- package/dist/testing/mock-patterns.js +264 -0
- package/dist/testing/mock-patterns.js.map +1 -0
- package/dist/testing/setup-teardown.d.ts +55 -0
- package/dist/testing/setup-teardown.d.ts.map +1 -0
- package/dist/testing/setup-teardown.js +262 -0
- package/dist/testing/setup-teardown.js.map +1 -0
- package/dist/testing/test-structure.d.ts +51 -0
- package/dist/testing/test-structure.d.ts.map +1 -0
- package/dist/testing/test-structure.js +225 -0
- package/dist/testing/test-structure.js.map +1 -0
- package/dist/types/any-usage.d.ts +99 -0
- package/dist/types/any-usage.d.ts.map +1 -0
- package/dist/types/any-usage.js +641 -0
- package/dist/types/any-usage.js.map +1 -0
- package/dist/types/file-location.d.ts +76 -0
- package/dist/types/file-location.d.ts.map +1 -0
- package/dist/types/file-location.js +395 -0
- package/dist/types/file-location.js.map +1 -0
- package/dist/types/generic-patterns.d.ts +97 -0
- package/dist/types/generic-patterns.d.ts.map +1 -0
- package/dist/types/generic-patterns.js +615 -0
- package/dist/types/generic-patterns.js.map +1 -0
- package/dist/types/index.d.ts +31 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +43 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/interface-vs-type.d.ts +81 -0
- package/dist/types/interface-vs-type.d.ts.map +1 -0
- package/dist/types/interface-vs-type.js +440 -0
- package/dist/types/interface-vs-type.js.map +1 -0
- package/dist/types/naming-conventions.d.ts +84 -0
- package/dist/types/naming-conventions.d.ts.map +1 -0
- package/dist/types/naming-conventions.js +455 -0
- package/dist/types/naming-conventions.js.map +1 -0
- package/dist/types/type-assertions.d.ts +98 -0
- package/dist/types/type-assertions.d.ts.map +1 -0
- package/dist/types/type-assertions.js +639 -0
- package/dist/types/type-assertions.js.map +1 -0
- package/dist/types/utility-types.d.ts +110 -0
- package/dist/types/utility-types.d.ts.map +1 -0
- package/dist/types/utility-types.js +547 -0
- package/dist/types/utility-types.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel Exports Detector - Index file pattern detection
|
|
3
|
+
*
|
|
4
|
+
* Detects index.ts/index.js usage patterns and export patterns.
|
|
5
|
+
* Identifies barrel files that re-export from other modules and
|
|
6
|
+
* analyzes consistency of barrel file usage across the project.
|
|
7
|
+
*
|
|
8
|
+
* @requirements 7.4 - THE Structural_Detector SHALL detect barrel/index file usage patterns
|
|
9
|
+
*/
|
|
10
|
+
import { StructuralDetector } from '../base/index.js';
|
|
11
|
+
/**
|
|
12
|
+
* Common barrel file names
|
|
13
|
+
*/
|
|
14
|
+
export const BARREL_FILE_NAMES = [
|
|
15
|
+
'index.ts',
|
|
16
|
+
'index.tsx',
|
|
17
|
+
'index.js',
|
|
18
|
+
'index.jsx',
|
|
19
|
+
'index.mjs',
|
|
20
|
+
'index.cjs',
|
|
21
|
+
];
|
|
22
|
+
/**
|
|
23
|
+
* Directories that typically should have barrel files
|
|
24
|
+
*/
|
|
25
|
+
export const BARREL_EXPECTED_DIRECTORIES = [
|
|
26
|
+
'components',
|
|
27
|
+
'hooks',
|
|
28
|
+
'utils',
|
|
29
|
+
'helpers',
|
|
30
|
+
'services',
|
|
31
|
+
'lib',
|
|
32
|
+
'types',
|
|
33
|
+
'models',
|
|
34
|
+
'features',
|
|
35
|
+
'modules',
|
|
36
|
+
'pages',
|
|
37
|
+
'api',
|
|
38
|
+
'store',
|
|
39
|
+
'contexts',
|
|
40
|
+
'providers',
|
|
41
|
+
];
|
|
42
|
+
// ============================================================================
|
|
43
|
+
// Helper Functions
|
|
44
|
+
// ============================================================================
|
|
45
|
+
/**
|
|
46
|
+
* Check if a file is a barrel/index file
|
|
47
|
+
*/
|
|
48
|
+
export function isBarrelFile(filePath) {
|
|
49
|
+
const normalizedPath = filePath.replace(/\\/g, '/');
|
|
50
|
+
const fileName = normalizedPath.split('/').pop() || '';
|
|
51
|
+
const lowerFileName = fileName.toLowerCase();
|
|
52
|
+
return BARREL_FILE_NAMES.some(name => lowerFileName === name.toLowerCase());
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Get the directory of a file
|
|
56
|
+
*/
|
|
57
|
+
export function getFileDirectory(filePath) {
|
|
58
|
+
const normalizedPath = filePath.replace(/\\/g, '/');
|
|
59
|
+
const lastSlash = normalizedPath.lastIndexOf('/');
|
|
60
|
+
return lastSlash === -1 ? '' : normalizedPath.slice(0, lastSlash);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get the file name from a path
|
|
64
|
+
*/
|
|
65
|
+
export function getFileName(filePath) {
|
|
66
|
+
const normalizedPath = filePath.replace(/\\/g, '/');
|
|
67
|
+
return normalizedPath.split('/').pop() || '';
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Check if a directory name suggests it should have a barrel file
|
|
71
|
+
*/
|
|
72
|
+
export function shouldDirectoryHaveBarrel(directoryPath) {
|
|
73
|
+
const normalizedPath = directoryPath.replace(/\\/g, '/');
|
|
74
|
+
const dirName = normalizedPath.split('/').pop()?.toLowerCase() || '';
|
|
75
|
+
return BARREL_EXPECTED_DIRECTORIES.some(expected => dirName === expected ||
|
|
76
|
+
dirName === `${expected}s` ||
|
|
77
|
+
dirName.endsWith(expected));
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Parse export patterns from file content
|
|
81
|
+
*/
|
|
82
|
+
export function parseExportPatterns(content) {
|
|
83
|
+
const patterns = [];
|
|
84
|
+
const lines = content.split('\n');
|
|
85
|
+
for (let i = 0; i < lines.length; i++) {
|
|
86
|
+
const line = lines[i];
|
|
87
|
+
const lineNumber = i + 1;
|
|
88
|
+
// Skip comments and empty lines
|
|
89
|
+
const trimmedLine = line.trim();
|
|
90
|
+
if (!trimmedLine || trimmedLine.startsWith('//') || trimmedLine.startsWith('/*')) {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
// Namespace re-export: export * from './module'
|
|
94
|
+
const namespaceMatch = line.match(/export\s+\*\s+from\s+['"]([^'"]+)['"]/);
|
|
95
|
+
if (namespaceMatch) {
|
|
96
|
+
patterns.push({
|
|
97
|
+
type: 'namespace-export',
|
|
98
|
+
names: ['*'],
|
|
99
|
+
source: namespaceMatch[1] || null,
|
|
100
|
+
line: lineNumber,
|
|
101
|
+
});
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
// Named re-export: export { foo, bar } from './module'
|
|
105
|
+
const namedReexportMatch = line.match(/export\s+\{([^}]+)\}\s+from\s+['"]([^'"]+)['"]/);
|
|
106
|
+
if (namedReexportMatch) {
|
|
107
|
+
const names = namedReexportMatch[1]
|
|
108
|
+
.split(',')
|
|
109
|
+
.map(n => n.trim())
|
|
110
|
+
.filter(n => n.length > 0);
|
|
111
|
+
const hasDefault = names.some(n => n === 'default' || n.startsWith('default '));
|
|
112
|
+
const hasRename = names.some(n => n.includes(' as '));
|
|
113
|
+
let type = 'named-export';
|
|
114
|
+
if (hasDefault) {
|
|
115
|
+
type = 'default-reexport';
|
|
116
|
+
}
|
|
117
|
+
else if (hasRename) {
|
|
118
|
+
type = 'named-reexport';
|
|
119
|
+
}
|
|
120
|
+
patterns.push({
|
|
121
|
+
type,
|
|
122
|
+
names,
|
|
123
|
+
source: namedReexportMatch[2] || null,
|
|
124
|
+
line: lineNumber,
|
|
125
|
+
});
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
// Direct named export: export const/let/var/function/class
|
|
129
|
+
const directExportMatch = line.match(/export\s+(const|let|var|function|class|interface|type|enum)\s+(\w+)/);
|
|
130
|
+
if (directExportMatch) {
|
|
131
|
+
patterns.push({
|
|
132
|
+
type: 'direct-export',
|
|
133
|
+
names: [directExportMatch[2]],
|
|
134
|
+
source: null,
|
|
135
|
+
line: lineNumber,
|
|
136
|
+
});
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
// Default export: export default
|
|
140
|
+
if (line.match(/export\s+default\s+/)) {
|
|
141
|
+
patterns.push({
|
|
142
|
+
type: 'default-export',
|
|
143
|
+
names: ['default'],
|
|
144
|
+
source: null,
|
|
145
|
+
line: lineNumber,
|
|
146
|
+
});
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
// Named export without from: export { foo, bar }
|
|
150
|
+
const namedExportMatch = line.match(/export\s+\{([^}]+)\}(?!\s+from)/);
|
|
151
|
+
if (namedExportMatch && !line.includes('from')) {
|
|
152
|
+
const names = namedExportMatch[1]
|
|
153
|
+
.split(',')
|
|
154
|
+
.map(n => n.trim())
|
|
155
|
+
.filter(n => n.length > 0);
|
|
156
|
+
patterns.push({
|
|
157
|
+
type: 'direct-export',
|
|
158
|
+
names,
|
|
159
|
+
source: null,
|
|
160
|
+
line: lineNumber,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return patterns;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Analyze a barrel file's content
|
|
168
|
+
*/
|
|
169
|
+
export function analyzeBarrelFile(filePath, content) {
|
|
170
|
+
const directory = getFileDirectory(filePath);
|
|
171
|
+
const exportPatterns = parseExportPatterns(content);
|
|
172
|
+
const exportTypes = [...new Set(exportPatterns.map(p => p.type))];
|
|
173
|
+
const reexportedFiles = exportPatterns
|
|
174
|
+
.filter(p => p.source !== null)
|
|
175
|
+
.map(p => p.source)
|
|
176
|
+
.filter((v, i, a) => a.indexOf(v) === i); // unique
|
|
177
|
+
// A valid barrel file should have re-exports (not just direct exports)
|
|
178
|
+
const hasReexports = exportPatterns.some(p => p.source !== null);
|
|
179
|
+
return {
|
|
180
|
+
path: filePath,
|
|
181
|
+
directory,
|
|
182
|
+
exportCount: exportPatterns.length,
|
|
183
|
+
exportTypes,
|
|
184
|
+
reexportedFiles,
|
|
185
|
+
isValidBarrel: hasReexports,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Extract unique directories from file paths
|
|
190
|
+
*/
|
|
191
|
+
export function extractDirectories(files) {
|
|
192
|
+
const directories = new Map();
|
|
193
|
+
for (const file of files) {
|
|
194
|
+
const normalizedPath = file.replace(/\\/g, '/');
|
|
195
|
+
const directory = getFileDirectory(normalizedPath);
|
|
196
|
+
if (directory) {
|
|
197
|
+
if (!directories.has(directory)) {
|
|
198
|
+
directories.set(directory, []);
|
|
199
|
+
}
|
|
200
|
+
directories.get(directory).push(normalizedPath);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return directories;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Analyze barrel file patterns in a project
|
|
207
|
+
*/
|
|
208
|
+
export function analyzeBarrelPatterns(files, fileContents = new Map()) {
|
|
209
|
+
const directories = extractDirectories(files);
|
|
210
|
+
const barrelFiles = [];
|
|
211
|
+
const directoriesWithBarrels = [];
|
|
212
|
+
const directoriesMissingBarrels = [];
|
|
213
|
+
// Find all barrel files
|
|
214
|
+
for (const file of files) {
|
|
215
|
+
if (isBarrelFile(file)) {
|
|
216
|
+
const content = fileContents.get(file) || '';
|
|
217
|
+
const barrelInfo = analyzeBarrelFile(file, content);
|
|
218
|
+
barrelFiles.push(barrelInfo);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
// Analyze each directory
|
|
222
|
+
for (const [directory, directoryFiles] of directories) {
|
|
223
|
+
const barrelFile = directoryFiles.find(f => isBarrelFile(f)) || null;
|
|
224
|
+
const siblingFileCount = directoryFiles.filter(f => !isBarrelFile(f)).length;
|
|
225
|
+
const shouldHaveBarrel = shouldDirectoryHaveBarrel(directory) && siblingFileCount > 0;
|
|
226
|
+
const info = {
|
|
227
|
+
directory,
|
|
228
|
+
hasBarrel: barrelFile !== null,
|
|
229
|
+
barrelFile,
|
|
230
|
+
siblingFileCount,
|
|
231
|
+
shouldHaveBarrel,
|
|
232
|
+
};
|
|
233
|
+
if (barrelFile) {
|
|
234
|
+
directoriesWithBarrels.push(info);
|
|
235
|
+
}
|
|
236
|
+
else if (shouldHaveBarrel) {
|
|
237
|
+
directoriesMissingBarrels.push(info);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
// Calculate barrel coverage
|
|
241
|
+
const relevantDirectories = [...directoriesWithBarrels, ...directoriesMissingBarrels];
|
|
242
|
+
const barrelCoverage = relevantDirectories.length > 0
|
|
243
|
+
? directoriesWithBarrels.length / relevantDirectories.length
|
|
244
|
+
: 0;
|
|
245
|
+
// Determine pattern type
|
|
246
|
+
let pattern;
|
|
247
|
+
let confidence;
|
|
248
|
+
if (barrelFiles.length === 0) {
|
|
249
|
+
pattern = 'none';
|
|
250
|
+
confidence = 0.5;
|
|
251
|
+
}
|
|
252
|
+
else if (barrelCoverage >= 0.8) {
|
|
253
|
+
pattern = 'consistent';
|
|
254
|
+
confidence = barrelCoverage;
|
|
255
|
+
}
|
|
256
|
+
else if (barrelCoverage >= 0.3) {
|
|
257
|
+
pattern = 'inconsistent';
|
|
258
|
+
confidence = 0.5 + (barrelCoverage * 0.3);
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
pattern = 'unknown';
|
|
262
|
+
confidence = 0.3;
|
|
263
|
+
}
|
|
264
|
+
// Determine dominant export style
|
|
265
|
+
const exportTypeCounts = new Map();
|
|
266
|
+
for (const barrel of barrelFiles) {
|
|
267
|
+
for (const exportType of barrel.exportTypes) {
|
|
268
|
+
exportTypeCounts.set(exportType, (exportTypeCounts.get(exportType) || 0) + 1);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
let dominantExportStyle = null;
|
|
272
|
+
let maxCount = 0;
|
|
273
|
+
for (const [type, count] of exportTypeCounts) {
|
|
274
|
+
if (count > maxCount) {
|
|
275
|
+
maxCount = count;
|
|
276
|
+
dominantExportStyle = type;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return {
|
|
280
|
+
pattern,
|
|
281
|
+
confidence,
|
|
282
|
+
barrelFiles,
|
|
283
|
+
directoriesWithBarrels,
|
|
284
|
+
directoriesMissingBarrels,
|
|
285
|
+
totalDirectories: directories.size,
|
|
286
|
+
barrelCoverage,
|
|
287
|
+
dominantExportStyle,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Check if a directory should have a barrel file based on project patterns
|
|
292
|
+
*/
|
|
293
|
+
export function checkDirectoryNeedsBarrel(directory, files, analysis) {
|
|
294
|
+
// If project doesn't use barrels consistently, don't enforce
|
|
295
|
+
if (analysis.pattern !== 'consistent') {
|
|
296
|
+
return false;
|
|
297
|
+
}
|
|
298
|
+
// Check if directory has multiple exportable files
|
|
299
|
+
const directoryFiles = files.filter(f => {
|
|
300
|
+
const fileDir = getFileDirectory(f);
|
|
301
|
+
return fileDir === directory && !isBarrelFile(f);
|
|
302
|
+
});
|
|
303
|
+
// Need at least 2 files to warrant a barrel
|
|
304
|
+
if (directoryFiles.length < 2) {
|
|
305
|
+
return false;
|
|
306
|
+
}
|
|
307
|
+
// Check if this is a type of directory that typically has barrels
|
|
308
|
+
return shouldDirectoryHaveBarrel(directory);
|
|
309
|
+
}
|
|
310
|
+
// ============================================================================
|
|
311
|
+
// Barrel Exports Detector Class
|
|
312
|
+
// ============================================================================
|
|
313
|
+
/**
|
|
314
|
+
* Detector for barrel/index file patterns
|
|
315
|
+
*
|
|
316
|
+
* Identifies barrel files (index.ts/index.js) that re-export from other modules
|
|
317
|
+
* and analyzes consistency of barrel file usage across the project.
|
|
318
|
+
*
|
|
319
|
+
* @requirements 7.4 - THE Structural_Detector SHALL detect barrel/index file usage patterns
|
|
320
|
+
*/
|
|
321
|
+
export class BarrelExportsDetector extends StructuralDetector {
|
|
322
|
+
id = 'structural/barrel-exports';
|
|
323
|
+
category = 'structural';
|
|
324
|
+
subcategory = 'barrel-exports';
|
|
325
|
+
name = 'Barrel Exports Detector';
|
|
326
|
+
description = 'Detects barrel/index file usage patterns and export consistency';
|
|
327
|
+
supportedLanguages = [
|
|
328
|
+
'typescript',
|
|
329
|
+
'javascript',
|
|
330
|
+
];
|
|
331
|
+
/**
|
|
332
|
+
* Detect barrel file patterns in the project
|
|
333
|
+
*/
|
|
334
|
+
async detect(context) {
|
|
335
|
+
const patterns = [];
|
|
336
|
+
const violations = [];
|
|
337
|
+
// Build file contents map for barrel files
|
|
338
|
+
const fileContents = new Map();
|
|
339
|
+
if (isBarrelFile(context.file)) {
|
|
340
|
+
fileContents.set(context.file, context.content);
|
|
341
|
+
}
|
|
342
|
+
// Analyze the entire project's barrel patterns
|
|
343
|
+
const analysis = analyzeBarrelPatterns(context.projectContext.files, fileContents);
|
|
344
|
+
// Create pattern match for the detected barrel usage
|
|
345
|
+
if (analysis.pattern !== 'unknown') {
|
|
346
|
+
patterns.push(this.createBarrelPattern(context.file, analysis));
|
|
347
|
+
}
|
|
348
|
+
// Create pattern for dominant export style
|
|
349
|
+
if (analysis.dominantExportStyle) {
|
|
350
|
+
patterns.push(this.createExportStylePattern(context.file, analysis));
|
|
351
|
+
}
|
|
352
|
+
// Check if current file is a barrel file
|
|
353
|
+
if (isBarrelFile(context.file)) {
|
|
354
|
+
const barrelInfo = analyzeBarrelFile(context.file, context.content);
|
|
355
|
+
// Check for empty or invalid barrel files
|
|
356
|
+
if (!barrelInfo.isValidBarrel && barrelInfo.exportCount === 0) {
|
|
357
|
+
violations.push(this.createEmptyBarrelViolation(context.file));
|
|
358
|
+
}
|
|
359
|
+
// Check for inconsistent export style
|
|
360
|
+
const styleViolation = this.checkExportStyleConsistency(context.file, barrelInfo, analysis);
|
|
361
|
+
if (styleViolation) {
|
|
362
|
+
violations.push(styleViolation);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
// Check if current file's directory is missing a barrel file
|
|
366
|
+
const missingBarrelViolation = this.checkMissingBarrel(context.file, analysis);
|
|
367
|
+
if (missingBarrelViolation) {
|
|
368
|
+
violations.push(missingBarrelViolation);
|
|
369
|
+
}
|
|
370
|
+
return this.createResult(patterns, violations, analysis.confidence);
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Generate a quick fix for barrel export violations
|
|
374
|
+
*/
|
|
375
|
+
generateQuickFix(violation) {
|
|
376
|
+
if (violation.patternId === 'structural/barrel-exports-missing') {
|
|
377
|
+
return {
|
|
378
|
+
title: 'Create barrel file (index.ts)',
|
|
379
|
+
kind: 'quickfix',
|
|
380
|
+
edit: {
|
|
381
|
+
changes: {},
|
|
382
|
+
documentChanges: [],
|
|
383
|
+
},
|
|
384
|
+
isPreferred: true,
|
|
385
|
+
confidence: 0.7,
|
|
386
|
+
preview: 'Create an index.ts file to re-export modules from this directory',
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
if (violation.patternId === 'structural/barrel-exports-empty') {
|
|
390
|
+
return {
|
|
391
|
+
title: 'Add exports to barrel file',
|
|
392
|
+
kind: 'quickfix',
|
|
393
|
+
edit: {
|
|
394
|
+
changes: {},
|
|
395
|
+
documentChanges: [],
|
|
396
|
+
},
|
|
397
|
+
isPreferred: true,
|
|
398
|
+
confidence: 0.6,
|
|
399
|
+
preview: 'Add re-exports for sibling modules',
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
if (violation.patternId === 'structural/barrel-exports-style') {
|
|
403
|
+
return {
|
|
404
|
+
title: 'Update export style to match project pattern',
|
|
405
|
+
kind: 'refactor',
|
|
406
|
+
edit: {
|
|
407
|
+
changes: {},
|
|
408
|
+
documentChanges: [],
|
|
409
|
+
},
|
|
410
|
+
isPreferred: false,
|
|
411
|
+
confidence: 0.5,
|
|
412
|
+
preview: `Consider using ${violation.expected} for consistency`,
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
return null;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Create a pattern match for barrel file usage
|
|
419
|
+
*/
|
|
420
|
+
createBarrelPattern(file, analysis) {
|
|
421
|
+
return {
|
|
422
|
+
patternId: `barrel-exports-${analysis.pattern}`,
|
|
423
|
+
location: { file, line: 1, column: 1 },
|
|
424
|
+
confidence: analysis.confidence,
|
|
425
|
+
isOutlier: false,
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Create a pattern match for export style
|
|
430
|
+
*/
|
|
431
|
+
createExportStylePattern(file, analysis) {
|
|
432
|
+
return {
|
|
433
|
+
patternId: `barrel-exports-style-${analysis.dominantExportStyle}`,
|
|
434
|
+
location: { file, line: 1, column: 1 },
|
|
435
|
+
confidence: analysis.confidence * 0.8,
|
|
436
|
+
isOutlier: false,
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Create a violation for an empty barrel file
|
|
441
|
+
*/
|
|
442
|
+
createEmptyBarrelViolation(file) {
|
|
443
|
+
const range = {
|
|
444
|
+
start: { line: 1, character: 1 },
|
|
445
|
+
end: { line: 1, character: 1 },
|
|
446
|
+
};
|
|
447
|
+
return {
|
|
448
|
+
id: `barrel-exports-empty-${file.replace(/[^a-zA-Z0-9]/g, '-')}`,
|
|
449
|
+
patternId: 'structural/barrel-exports-empty',
|
|
450
|
+
severity: 'warning',
|
|
451
|
+
file,
|
|
452
|
+
range,
|
|
453
|
+
message: `Barrel file '${getFileName(file)}' is empty or has no re-exports. Consider adding exports or removing the file.`,
|
|
454
|
+
expected: 'Barrel file with re-exports (e.g., export * from "./module")',
|
|
455
|
+
actual: 'Empty or non-functional barrel file',
|
|
456
|
+
aiExplainAvailable: true,
|
|
457
|
+
aiFixAvailable: true,
|
|
458
|
+
firstSeen: new Date(),
|
|
459
|
+
occurrences: 1,
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Check for inconsistent export style in a barrel file
|
|
464
|
+
*/
|
|
465
|
+
checkExportStyleConsistency(file, barrelInfo, analysis) {
|
|
466
|
+
// Skip if no dominant style or barrel has no exports
|
|
467
|
+
if (!analysis.dominantExportStyle || barrelInfo.exportCount === 0) {
|
|
468
|
+
return null;
|
|
469
|
+
}
|
|
470
|
+
// Skip if pattern is not consistent (no clear style to enforce)
|
|
471
|
+
if (analysis.pattern !== 'consistent') {
|
|
472
|
+
return null;
|
|
473
|
+
}
|
|
474
|
+
// Check if this barrel uses the dominant style
|
|
475
|
+
const usesDominantStyle = barrelInfo.exportTypes.includes(analysis.dominantExportStyle);
|
|
476
|
+
// If it uses the dominant style, no violation
|
|
477
|
+
if (usesDominantStyle) {
|
|
478
|
+
return null;
|
|
479
|
+
}
|
|
480
|
+
// If it only has direct exports (not re-exports), skip
|
|
481
|
+
const hasReexports = barrelInfo.exportTypes.some(t => t === 'namespace-export' || t === 'named-export' || t === 'named-reexport' || t === 'default-reexport');
|
|
482
|
+
if (!hasReexports) {
|
|
483
|
+
return null;
|
|
484
|
+
}
|
|
485
|
+
const range = {
|
|
486
|
+
start: { line: 1, character: 1 },
|
|
487
|
+
end: { line: 1, character: 1 },
|
|
488
|
+
};
|
|
489
|
+
const actualStyles = barrelInfo.exportTypes.join(', ');
|
|
490
|
+
return {
|
|
491
|
+
id: `barrel-exports-style-${file.replace(/[^a-zA-Z0-9]/g, '-')}`,
|
|
492
|
+
patternId: 'structural/barrel-exports-style',
|
|
493
|
+
severity: 'info',
|
|
494
|
+
file,
|
|
495
|
+
range,
|
|
496
|
+
message: `Barrel file uses '${actualStyles}' but project predominantly uses '${analysis.dominantExportStyle}'. Consider using consistent export style.`,
|
|
497
|
+
expected: `${analysis.dominantExportStyle} export style`,
|
|
498
|
+
actual: `${actualStyles} export style`,
|
|
499
|
+
aiExplainAvailable: true,
|
|
500
|
+
aiFixAvailable: false,
|
|
501
|
+
firstSeen: new Date(),
|
|
502
|
+
occurrences: 1,
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Check if the current file's directory is missing a barrel file
|
|
507
|
+
*/
|
|
508
|
+
checkMissingBarrel(file, analysis) {
|
|
509
|
+
// Skip if project doesn't use barrels consistently
|
|
510
|
+
if (analysis.pattern !== 'consistent') {
|
|
511
|
+
return null;
|
|
512
|
+
}
|
|
513
|
+
// Skip if this file is itself a barrel file
|
|
514
|
+
if (isBarrelFile(file)) {
|
|
515
|
+
return null;
|
|
516
|
+
}
|
|
517
|
+
const directory = getFileDirectory(file);
|
|
518
|
+
// Check if this directory is in the missing barrels list
|
|
519
|
+
const missingInfo = analysis.directoriesMissingBarrels.find(d => d.directory === directory);
|
|
520
|
+
if (!missingInfo) {
|
|
521
|
+
return null;
|
|
522
|
+
}
|
|
523
|
+
const range = {
|
|
524
|
+
start: { line: 1, character: 1 },
|
|
525
|
+
end: { line: 1, character: 1 },
|
|
526
|
+
};
|
|
527
|
+
const dirName = directory.split('/').pop() || directory;
|
|
528
|
+
return {
|
|
529
|
+
id: `barrel-exports-missing-${directory.replace(/[^a-zA-Z0-9]/g, '-')}`,
|
|
530
|
+
patternId: 'structural/barrel-exports-missing',
|
|
531
|
+
severity: 'info',
|
|
532
|
+
file,
|
|
533
|
+
range,
|
|
534
|
+
message: `Directory '${dirName}' has ${missingInfo.siblingFileCount} files but no barrel file. Consider adding an index.ts to re-export modules.`,
|
|
535
|
+
expected: 'Directory with barrel file (index.ts) for re-exports',
|
|
536
|
+
actual: `Directory with ${missingInfo.siblingFileCount} files and no barrel`,
|
|
537
|
+
aiExplainAvailable: true,
|
|
538
|
+
aiFixAvailable: true,
|
|
539
|
+
firstSeen: new Date(),
|
|
540
|
+
occurrences: 1,
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
// ============================================================================
|
|
545
|
+
// Factory Function
|
|
546
|
+
// ============================================================================
|
|
547
|
+
/**
|
|
548
|
+
* Create a new BarrelExportsDetector instance
|
|
549
|
+
*/
|
|
550
|
+
export function createBarrelExportsDetector() {
|
|
551
|
+
return new BarrelExportsDetector();
|
|
552
|
+
}
|
|
553
|
+
//# sourceMappingURL=barrel-exports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barrel-exports.js","sourceRoot":"","sources":["../../src/structural/barrel-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,kBAAkB,EAA+C,MAAM,kBAAkB,CAAC;AAsBnG;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,UAAU;IACV,WAAW;IACX,UAAU;IACV,WAAW;IACX,W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