Installations
npm install eslint-plugin-dependency-cruiser
Developer Guide
Typescript
No
Module System
CommonJS
Score
59.1
Supply Chain
76.6
Quality
72
Maintenance
50
Vulnerability
97
License
Releases
Unable to fetch releases
Love this project? Help keep it running — sponsor us today! 🚀
Download Statistics
Total Downloads
10,769
Last Day
1
Last Week
335
Last Month
1,177
Last Year
8,381
Package Meta Information
Latest Version
0.1.1
Package Id
eslint-plugin-dependency-cruiser@0.1.1
Unpacked Size
35.20 kB
Size
13.05 kB
File Count
40
Total Downloads
Cumulative downloads
Total Downloads
10,769
Last Day
-66.7%
1
Compared to previous day
Last Week
25.9%
335
Compared to previous week
Last Month
20.1%
1,177
Compared to previous month
Last Year
408.6%
8,381
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Peer Dependencies
2
eslint-plugin-dependency-cruiser
Runs Dependency Cruiser as an ESLint rule and reports import rule violations.
Installation
1npm install --save-dev eslint-plugin
or
1yarn add --dev eslint-plugin-dependency-cruiser
eslint-plugin-dependency-cruiser
does not install Dependency Cruiser or ESLint
for you. You must install these yourself.
Then, in your .eslintrc.js
or .eslintrc.json
:
1{ 2 "plugins": ["dependency-cruiser"], 3 "extends": ["plugin:dependency-cruiser/all"] 4}
Configuration
By default the plugin looks for the Dependency Cruiser configuration and the
baseline file in the default locations (.dependency-cruiser.js
and
.dependency-cruiser-known-violations.json
). You can configure that using
ESLint's settings, specifying dependency-cruiser
key with a value of an object
with config
and knownViolations
. Paths are relative to the project's root.
For example:
1{ 2 "plugins": ["dependency-cruiser"], 3 "extends": ["plugin:dependency-cruiser/all"], 4 "settings": { 5 "dependency-cruiser": { 6 "knownViolations": ".dependency-cruiser-baseline.json", 7 "config": ".dependency-cruiser.cjs" 8 } 9 } 10}
Limitations
The plugin is not exposing all validation features or configuration options of Dependency Cruiser's. Some things missing:
- Support for loading webpack configuration
- Support for detecting violations that require cruising the whole dependency tree, e.g. circular dependencies
- Support for rule types other than
forbidden
(i.e.allowed
andrequired
)

No vulnerabilities found.

No security vulnerabilities found.