← Back to Pull requests

feat(no-extraneous-dependencies): add transitiveDependencies option for metapackages #628

Open
unknown opened this pull request with 174 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 12, 2026 09:11 UTC
Author

Closes #158

Adds transitiveDependencies option, shape from the issue:

"import-x/no-extraneous-dependencies": ["error", {"transitiveDependencies": {"foo-metapackage": ["foo-1", "foo-2", "foo-3"]}}]

Listed packages count as declared only while the metapackage is in package.json, and in the same field as it, so metapackage in devDependencies gives dev deps and devDependencies: false still reports them. That is the conditional part whitelist cant do

The allowed-status check was spelled out twice already, third use made me pull it into isAllowed, no behavior change there. New specs fail without the change, full suite 4030 pass

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->

Summary by CodeRabbit

New Features
The no-extraneous-dependencies rule now supports a transitiveDependencies option. Configure provider packages and the packages they supply to allow imports when the provider is declared in an applicable dependency field. Existing dependency-field settings, including whether development dependencies are checked, continue to apply.
Bug Fixes
Inherited properties no longer count as declared dependencies.
Documentation
Added configuration guidance and an example for the new option.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Diff: 174 lines (+130 / -44) across 2 files Reviewer: thekhegay Review duration: 3088m
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.40) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 174 lines diff across 2 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.309
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #628"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 46.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 40.4% (MEDIUM) · Higher = larger blast radius
40.4%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 46.7% · Lower = rushed or shallow review
46.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 21.5% · Safe to merge
21.5%