{"id":21673670,"url":"https://github.com/pekala/eslint-plugin-dependency-cruiser","last_synced_at":"2025-04-12T04:11:52.942Z","repository":{"id":78668282,"uuid":"514588024","full_name":"pekala/eslint-plugin-dependency-cruiser","owner":"pekala","description":"ESLint plugin for Dependency Cruiser","archived":false,"fork":false,"pushed_at":"2022-07-20T21:15:42.000Z","size":113,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T04:11:45.854Z","etag":null,"topics":["dependency-cruiser","eslint","eslint-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pekala.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-16T13:38:34.000Z","updated_at":"2024-10-26T11:39:07.000Z","dependencies_parsed_at":"2023-03-12T05:00:30.512Z","dependency_job_id":null,"html_url":"https://github.com/pekala/eslint-plugin-dependency-cruiser","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pekala%2Feslint-plugin-dependency-cruiser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pekala%2Feslint-plugin-dependency-cruiser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pekala%2Feslint-plugin-dependency-cruiser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pekala%2Feslint-plugin-dependency-cruiser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pekala","download_url":"https://codeload.github.com/pekala/eslint-plugin-dependency-cruiser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514206,"owners_count":21116903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dependency-cruiser","eslint","eslint-plugin"],"created_at":"2024-11-25T13:40:29.480Z","updated_at":"2025-04-12T04:11:52.934Z","avatar_url":"https://github.com/pekala.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-dependency-cruiser\n\nRuns [Dependency Cruiser](https://github.com/sverweij/dependency-cruiser) as an\n[ESLint](https://eslint.org) rule and reports import rule violations.\n\n\u003cimg width=\"500\" alt=\"ESLint Dependency Cruiser displaying an error in VSCode\" src=\"https://user-images.githubusercontent.com/4643658/179498433-8c691601-9e47-4fe2-a85c-ef56693903f1.png\"\u003e\n\n## Installation\n\n```console\nnpm install --save-dev eslint-plugin-dependency-cruiser\n```\n\nor\n\n```console\nyarn add --dev eslint-plugin-dependency-cruiser\n```\n\n`eslint-plugin-dependency-cruiser` does not install Dependency Cruiser or ESLint\nfor you. You must install these yourself.\n\nThen, in your `.eslintrc.js` or `.eslintrc.json`:\n\n```json\n{\n  \"plugins\": [\"dependency-cruiser\"],\n  \"extends\": [\"plugin:dependency-cruiser/all\"]\n}\n```\n\n## Configuration\n\nBy default the plugin looks for the Dependency Cruiser configuration and the\nbaseline file in the default locations (`.dependency-cruiser.js` and\n`.dependency-cruiser-known-violations.json`). You can configure that using\nESLint's settings, specifying `dependency-cruiser` key with a value of an object\nwith `config` and `knownViolations`. Paths are relative to the project's root.\nFor example:\n\n```json\n{\n  \"plugins\": [\"dependency-cruiser\"],\n  \"extends\": [\"plugin:dependency-cruiser/all\"],\n  \"settings\": {\n    \"dependency-cruiser\": {\n      \"knownViolations\": \".dependency-cruiser-baseline.json\",\n      \"config\": \".dependency-cruiser.cjs\"\n    }\n  }\n}\n```\n\n## Limitations\n\nThe plugin is not exposing all validation features or configuration options of\nDependency Cruiser's. Some things missing:\n\n- Support for loading webpack configuration\n- Support for detecting violations that require cruising the whole dependency\n  tree, e.g. circular dependencies\n- Support for rule types other than `forbidden` (i.e. `allowed` and `required`)\n\n## Performance\n\nIn the current iteration, this plugin is fairly slow. It runs Dependency Cruiser to analyse \ndependencies of each file. This makes it perform OK in development when ran by the editor on \na single file, but adds up quickly if running a full ESLint check for a large codebase.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpekala%2Feslint-plugin-dependency-cruiser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpekala%2Feslint-plugin-dependency-cruiser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpekala%2Feslint-plugin-dependency-cruiser/lists"}