forked from sverweij/dependency-cruiser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(validate): adds a dependents count validation (sverweij#449)
- Loading branch information
Showing
55 changed files
with
1,441 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
doc/recipes/internal-orphans/.dependency-cruiser-options-only.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** @type {import('dependency-cruiser').IConfiguration} */ | ||
/** @type {import('../../..').IConfiguration} */ | ||
module.exports = { | ||
options: { | ||
tsPreCompilationDeps: true, | ||
baseDir: "src", | ||
|
||
reporterOptions: { | ||
dot: { | ||
collapsePattern: "node_modules/[^/]+", | ||
theme: { | ||
graph: { | ||
splines: "ortho", | ||
rankdir: "TD", | ||
}, | ||
modules: [ | ||
{ | ||
criteria: { source: "^common" }, | ||
attributes: { fillcolor: "#cccccc" }, | ||
}, | ||
], | ||
dependencies: [ | ||
{ | ||
criteria: { "rules[0].severity": "error" }, | ||
attributes: { fontcolor: "red", color: "red" }, | ||
}, | ||
{ | ||
criteria: { "rules[0].severity": "warn" }, | ||
attributes: { fontcolor: "orange", color: "orange" }, | ||
}, | ||
{ | ||
criteria: { "rules[0].severity": "info" }, | ||
attributes: { fontcolor: "blue", color: "blue" }, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; |
17 changes: 17 additions & 0 deletions
17
doc/recipes/internal-orphans/.dependency-cruiser-with-rules.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const options = require("./.dependency-cruiser-options-only"); | ||
|
||
/** @type {import('dependency-cruiser').IConfiguration} */ | ||
module.exports = { | ||
forbidden: [ | ||
{ | ||
name: "no-unshared-utl", | ||
severity: "error", | ||
from: {}, | ||
module: { | ||
path: "^do-things/", | ||
numberOfDependentsLessThan: 1, | ||
}, | ||
}, | ||
], | ||
...options, | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.