{"id":14978279,"url":"https://github.com/joshuajaco/eslint-plugin-workspaces","last_synced_at":"2025-04-06T07:12:48.496Z","repository":{"id":35090241,"uuid":"202746422","full_name":"joshuajaco/eslint-plugin-workspaces","owner":"joshuajaco","description":"An ESLint plugin for enforcing consistent imports across monorepo packages. ","archived":false,"fork":false,"pushed_at":"2024-07-28T18:18:51.000Z","size":455,"stargazers_count":79,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T06:10:02.490Z","etag":null,"topics":["bolt","eslint","eslint-plugin","lerna-monorepo","monorepo","npm-workspaces","pnpm-workspace","workspaces","yarn-workspaces"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/eslint-plugin-workspaces","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joshuajaco.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2019-08-16T14:53:58.000Z","updated_at":"2025-03-06T20:49:32.000Z","dependencies_parsed_at":"2023-11-19T12:31:07.043Z","dependency_job_id":"2e5363b4-af40-448a-953e-498ed12ed42d","html_url":"https://github.com/joshuajaco/eslint-plugin-workspaces","commit_stats":{"total_commits":172,"total_committers":9,"mean_commits":19.11111111111111,"dds":0.4593023255813954,"last_synced_commit":"606e87f6a5f56397028d6506dd2c180281e3b5ae"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshuajaco%2Feslint-plugin-workspaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshuajaco%2Feslint-plugin-workspaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshuajaco%2Feslint-plugin-workspaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshuajaco%2Feslint-plugin-workspaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshuajaco","download_url":"https://codeload.github.com/joshuajaco/eslint-plugin-workspaces/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247092372,"owners_count":20882218,"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":["bolt","eslint","eslint-plugin","lerna-monorepo","monorepo","npm-workspaces","pnpm-workspace","workspaces","yarn-workspaces"],"created_at":"2024-09-24T13:57:17.190Z","updated_at":"2025-04-06T07:12:48.476Z","avatar_url":"https://github.com/joshuajaco.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-workspaces ![npm downloads](https://img.shields.io/npm/dw/eslint-plugin-workspaces) [![Coverage Status](https://coveralls.io/repos/github/joshuajaco/eslint-plugin-workspaces/badge.svg)](https://coveralls.io/github/joshuajaco/eslint-plugin-workspaces) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\nAn ESLint plugin for enforcing consistent imports across monorepo packages.\n\nIt supports:\n\n- [Yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces)\n- [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces)\n- [pnpm workspaces](https://pnpm.io/workspaces)\n- [lerna](https://github.com/lerna/lerna)\n- [bolt](https://github.com/boltpkg/bolt)\n\n## Installation\n\n```sh\n# npm\nnpm install eslint-plugin-workspaces --save-dev\n\n# yarn\nyarn add eslint-plugin-workspaces --dev\n```\n\n## Configuration\n\nEnable the rules in your ESLint configuration file:\n\n```json\n{\n  \"plugins\": [\"workspaces\"],\n  \"rules\": {\n    \"workspaces/no-relative-imports\": \"error\",\n    \"workspaces/require-dependency\": \"warn\"\n  }\n}\n```\n\nOr add the \"recommended\" preset:\n\n```json\n{\n  \"extends\": [\"plugin:workspaces/recommended\"]\n}\n```\n\n## Rules\n\n✔ included in the \"recommended\" preset\n\n🔧 fixable using the `--fix` command line option\n\n|     |     | Name                                                                                                                      | Description                                                                |\n| --- | --- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |\n| ✔  | 🔧  | [no-absolute-imports](https://github.com/joshuajaco/eslint-plugin-workspaces/blob/main/docs/rules/no-absolute-imports.md) | disallow absolute imports for files that are within the current package    |\n|     |     | [no-cross-imports](https://github.com/joshuajaco/eslint-plugin-workspaces/blob/main/docs/rules/no-cross-imports.md)       | disallow imports of files that are inside another package                  |\n| ✔  | 🔧  | [no-relative-imports](https://github.com/joshuajaco/eslint-plugin-workspaces/blob/main/docs/rules/no-relative-imports.md) | disallow relative imports of files that are outside of the current package |\n| ✔  |     | [require-dependency](https://github.com/joshuajaco/eslint-plugin-workspaces/blob/main/docs/rules/require-dependency.md)   | disallow importing from packages that are not listed as a dependency       |\n\n## Presets\n\n- `recommended` enables rules recommended for all users\n- `all` enables all rules\n\n# License\n\n[MIT](https://github.com/joshuajaco/eslint-plugin-workspaces/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshuajaco%2Feslint-plugin-workspaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshuajaco%2Feslint-plugin-workspaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshuajaco%2Feslint-plugin-workspaces/lists"}