{"id":13498264,"url":"https://github.com/feature-sliced/steiger","last_synced_at":"2025-04-04T20:03:12.461Z","repository":{"id":243368055,"uuid":"796552054","full_name":"feature-sliced/steiger","owner":"feature-sliced","description":"Universal file structure and project architecture linter","archived":false,"fork":false,"pushed_at":"2025-03-24T22:45:11.000Z","size":710,"stargazers_count":178,"open_issues_count":36,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-28T19:05:08.894Z","etag":null,"topics":["architecture","folders","hacktoberfest","imports","linter","naming-conventions"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/steiger","language":"TypeScript","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/feature-sliced.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2024-05-06T07:06:17.000Z","updated_at":"2025-03-27T09:43:05.000Z","dependencies_parsed_at":"2024-07-25T23:58:54.497Z","dependency_job_id":"cf2c0c51-902a-4b69-a523-a9d0177605b6","html_url":"https://github.com/feature-sliced/steiger","commit_stats":{"total_commits":168,"total_committers":7,"mean_commits":24.0,"dds":"0.20833333333333337","last_synced_commit":"cb661a9172141f112ac6f6249e2aee532ee9c9d2"},"previous_names":["feature-sliced/steiger"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feature-sliced%2Fsteiger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feature-sliced%2Fsteiger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feature-sliced%2Fsteiger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feature-sliced%2Fsteiger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feature-sliced","download_url":"https://codeload.github.com/feature-sliced/steiger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242658,"owners_count":20907131,"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":["architecture","folders","hacktoberfest","imports","linter","naming-conventions"],"created_at":"2024-07-31T21:00:21.085Z","updated_at":"2025-04-04T20:03:12.428Z","avatar_url":"https://github.com/feature-sliced.png","language":"TypeScript","readme":"# Steiger\n\n[![NPM Version](https://img.shields.io/npm/v/steiger)](https://www.npmjs.com/package/steiger)\n\nUniversal file structure and project architecture linter.\n\n\u003e [!NOTE]\n\u003e The project is in beta and in active development. Some APIs may change.\n\n\u003e [!NOTE]\n\u003e Version 0.5.0 introduced a new config file format. We have a codemod to automatically update your config, see the [migration guide](./MIGRATION_GUIDE.md).\n\n## Features\n\n- Built-in set of rules to validate adherence to [Feature-Sliced Design](https://feature-sliced.design/)\n- Watch mode\n- Rule configurability\n\n## Installation\n\n```bash\nnpm i -D steiger\n\n# If you want to check compliance to Feature-Sliced Design, also install this:\nnpm i -D @feature-sliced/steiger-plugin\n```\n\n## Usage\n\n```bash\nnpx steiger ./src\n```\n\nTo run in watch mode, add `-w`/`--watch` to the command:\n\n```bash\nnpx steiger ./src --watch\n```\n\n## Configuration\n\nSteiger is zero-config! If you don't want to disable certain rules, you can safely skip this section.\n\nSteiger is configurable via `cosmiconfig`. That means that you can create a `steiger.config.ts` or `steiger.config.js` file in the root of your project to configure the rules. Import `{ defineConfig } from \"steiger\"` to get autocompletion.\n\nThe config file shape is highly inspired by ESLint's config file, so if you have configured ESLint before, you'll find it easy to configure Steiger.\n\n### Example\n\n```javascript\n// ./steiger.config.js\nimport { defineConfig } from 'steiger'\nimport fsd from '@feature-sliced/steiger-plugin'\n\nexport default defineConfig([\n  ...fsd.configs.recommended,\n  {\n    // disable the `public-api` rule for files in the Shared layer\n    files: ['./src/shared/**'],\n    rules: {\n      'fsd/public-api': 'off',\n    },\n  },\n])\n```\n\n\u003e [!TIP]\n\u003e If you want Steiger to ignore certain files, add an object like this to the config array:\n\u003e\n\u003e ```js\n\u003e defineConfig([, /* … */ { ignores: ['**/__mocks__/**'] }])\n\u003e ```\n\n\u003cdetails\u003e\n  \u003csummary\u003eComprehensive showcase of the config file syntax\u003c/summary\u003e\n  \n  ```javascript\n    // ./steiger.config.ts\n    import { defineConfig } from 'steiger'\n    import fsd from '@feature-sliced/steiger-plugin'\n    \n    export default defineConfig([\n      ...fsd.configs.recommended,\n      {\n        // ignore all mock files for all rules\n        ignores: ['**/__mocks__/**'],\n      },\n      {\n        files: ['./src/shared/**'],\n        rules: {\n          // disable public-api rule for files in /shared folder\n          'fsd/public-api': 'off',\n        },\n      },\n      {\n        files: ['./src/widgets/**'],\n        ignores: ['**/discount-offers/**'],\n        rules: {\n          // disable no-segmentless-slices rule for all widgets except /discount-offers\n          'fsd/no-segmentless-slices': 'off',\n        },\n      },\n    ])\n  ```\n  [You can see more examples here](CONFIG_EXAMPLES.md)\n\u003c/details\u003e\n\n### Migration from 0.4.0\n\nVersion 0.5.0 introduced a new config file format. Follow the [instructions](MIGRATION_GUIDE.md) to migrate your config file.\n\n## Rules\n\nCurrently, Steiger is not extendable with more rules, though that will change in the near future. The built-in rules check for the project's adherence to [Feature-Sliced Design](https://feature-sliced.design/).\n\n\u003ctable\u003e\n\u003cthead\u003e\n  \u003ctr\u003e\n    \u003cth\u003eRule\u003c/th\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n  \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/ambiguous-slice-names/README.md\"\u003e\u003ccode\u003efsd/ambiguous-slice-names\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eForbid slice names that that match some segment’s name in the Shared layer.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/excessive-slicing/README.md\"\u003e\u003ccode\u003efsd/excessive-slicing\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eForbid having too many ungrouped slices or too many slices in a group.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/forbidden-imports/README.md\"\u003e\u003ccode\u003efsd/forbidden-imports\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eForbid imports from higher layers and cross-imports between slices on the same layer.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/inconsistent-naming/README.md\"\u003e\u003ccode\u003efsd/inconsistent-naming\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eEnsure that all entities are named consistently in terms of pluralization.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/insignificant-slice/README.md\"\u003e\u003ccode\u003efsd/insignificant-slice\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eDetect slices that have just one reference or no references to them at all.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/no-layer-public-api/README.md\"\u003e\u003ccode\u003efsd/no-layer-public-api\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eForbid index files on the layer level.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/no-public-api-sidestep/README.md\"\u003e\u003ccode\u003efsd/no-public-api-sidestep\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eForbid going around the public API of a slice to import directly from an internal module in a slice.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/no-reserved-folder-names/README.md\"\u003e\u003ccode\u003efsd/no-reserved-folder-names\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eForbid subfolders in segments that have the same name as other conventional segments.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/no-segmentless-slices/README.md\"\u003e\u003ccode\u003efsd/no-segmentless-slices\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eForbid slices that don't have any segments.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/no-segments-on-sliced-layers/README.md\"\u003e\u003ccode\u003efsd/no-segments-on-sliced-layers\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eForbid segments (like ui, lib, api ...) that appear directly in sliced layer folders (entities, features, ...)\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/no-ui-in-app/README.md\"\u003e\u003ccode\u003efsd/no-ui-in-app\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eForbid having the \u003ccode\u003eui\u003c/code\u003e segment on the App layer.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/public-api/README.md\"\u003e\u003ccode\u003efsd/public-api\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eRequire slices (and segments on sliceless layers like Shared) to have a public API definition.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/repetitive-naming/README.md\"\u003e\u003ccode\u003efsd/repetitive-naming\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eEnsure that all entities are named consistently in terms of pluralization.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/segments-by-purpose/README.md\"\u003e\u003ccode\u003efsd/segments-by-purpose\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eDiscourage the use of segment names that group code by its essence, and instead encourage grouping by purpose\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/shared-lib-grouping/README.md\"\u003e\u003ccode\u003efsd/shared-lib-grouping\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eForbid having too many ungrouped modules in \u003ccode\u003eshared/lib\u003c/code\u003e.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/typo-in-layer-name/README.md\"\u003e\u003ccode\u003efsd/typo-in-layer-name\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eEnsure that all layers are named without any typos.\u003c/td\u003e \u003c/tr\u003e\n  \u003ctr\u003e \u003ctd\u003e\u003ca href=\"./packages/steiger-plugin-fsd/src/no-processes/README.md\"\u003e\u003ccode\u003efsd/no-processes\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e \u003ctd\u003eDiscourage the use of the deprecated Processes layer.\u003c/td\u003e \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n## Contribution\n\nFeel free to report an issue or open a discussion. Ensure you read our [Code of Conduct](CODE_OF_CONDUCT.md) first though :)\n\nTo get started with the codebase, see our [Contributing guide](CONTRIBUTING.md).\n\n## Legal info\n\nProject licensed under [MIT License](LICENSE.md). [Here's what it means](https://choosealicense.com/licenses/mit/)\n","funding_links":[],"categories":["DevExp"],"sub_categories":["Linting"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeature-sliced%2Fsteiger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeature-sliced%2Fsteiger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeature-sliced%2Fsteiger/lists"}