You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** @type {import('dependency-cruiser').IRuleSetType} */module.exports={required: [{name: 'tsx-must-require-react',comment: 'tsx modules must require react, otherwise, they should be .ts',severity: 'info',module: {path: '\\.[tj]sx$',},to: {path: 'node_modules/react/'}}],
i'd like to only show modules that pass this rule
Expected Behavior
these non-react modules are hidden in the dependency graph
Current Behavior
the modules are shown in the dependency graph
Possible Solution
Update IReporterFiltersType
exportinterfaceIReporterFiltersType{exclude: IExcludeType;includeOnly: IIncludeOnlyFilterType;focus: IFocusType;pass: string|string[];/** this would include only those modules that fail rules */fail: string|string[];}
Current workaround is to run depcruise --config .dependency-cruiser.js src|grep tsx-must-require-react | cut -d: -f2
and paste that into reporterOptions.dot.filters.exclude. not the worst.
The text was updated successfully, but these errors were encountered:
Hi @forivall thanks for this suggestion (and the research), sorry for the slow reaction - I needed some time to reflect on this and see the general applicability and usability - and now see 'show me a graph focussing on all modules (& dependencies) that fail (/ pass) rule x' could be useful especially if the repo is larger.
Context
I want to show only tsx files that actually require
react
in my dependency graph visualization.see #343 for more context
For the given rule
i'd like to only show modules that pass this rule
Expected Behavior
these non-react modules are hidden in the dependency graph
Current Behavior
the modules are shown in the dependency graph
Possible Solution
Update IReporterFiltersType
where, in my example, i would use
Considered alternatives
Current workaround is to run
depcruise --config .dependency-cruiser.js src|grep tsx-must-require-react | cut -d: -f2
and paste that into
reporterOptions.dot.filters.exclude
. not the worst.The text was updated successfully, but these errors were encountered: