{"id":13493303,"url":"https://github.com/feature-sliced/eslint-config","last_synced_at":"2025-05-16T03:03:27.122Z","repository":{"id":43081318,"uuid":"327711624","full_name":"feature-sliced/eslint-config","owner":"feature-sliced","description":"🍰 Lint feature-sliced concepts by existing eslint plugins","archived":false,"fork":false,"pushed_at":"2024-10-17T12:44:57.000Z","size":382,"stargazers_count":145,"open_issues_count":22,"forks_count":4,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-09T17:55:46.641Z","etag":null,"topics":["absolute-imports","co-location","decoupling","domain-driven","domain-first","eslint-config","feature-based","feature-sliced","feature-slices"],"latest_commit_sha":null,"homepage":"https://npmjs.com/@feature-sliced/eslint-config","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/feature-sliced.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2021-01-07T19:56:18.000Z","updated_at":"2025-05-08T13:53:09.000Z","dependencies_parsed_at":"2024-12-08T10:04:14.512Z","dependency_job_id":"8026b473-d041-4db8-8f31-18fc55f6f110","html_url":"https://github.com/feature-sliced/eslint-config","commit_stats":{"total_commits":271,"total_committers":4,"mean_commits":67.75,"dds":0.4833948339483395,"last_synced_commit":"fa3ad7687e09880e83932a14a78d2fb80bf0d4bc"},"previous_names":["feature-driven/eslint-config"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feature-sliced%2Feslint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feature-sliced%2Feslint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feature-sliced%2Feslint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feature-sliced%2Feslint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feature-sliced","download_url":"https://codeload.github.com/feature-sliced/eslint-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459083,"owners_count":22074604,"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":["absolute-imports","co-location","decoupling","domain-driven","domain-first","eslint-config","feature-based","feature-sliced","feature-slices"],"created_at":"2024-07-31T19:01:14.018Z","updated_at":"2025-05-16T03:03:22.113Z","avatar_url":"https://github.com/feature-sliced.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","DevExp"],"sub_categories":["Linting"],"readme":"# [@feature-sliced/eslint-config](https://www.npmjs.com/package/@feature-sliced/eslint-config)\n\n\u003e `WIP:` At the moment at beta-testing - [use carefully](https://github.com/feature-sliced/eslint-config/discussions/75)\n\n[npm]: https://www.npmjs.com/package/@feature-sliced/eslint-config\n\n[![npm](https://img.shields.io/npm/v/@feature-sliced/eslint-config?style=flat-square)][npm]\n[![npm](https://img.shields.io/npm/dw/@feature-sliced/eslint-config?style=flat-square)][npm]\n[![npm bundle size](https://img.shields.io/bundlephobia/min/@feature-sliced/eslint-config?style=flat-square)][npm]\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/feature-sliced/eslint-config/Test%20current%20build?label=tests\u0026style=flat-square)](https://github.com/feature-sliced/eslint-config/actions)\n\n\u003cimg src=\"https://avatars.githubusercontent.com/u/60469024?s=120\u0026v=4\" align=\"right\"\u003e\n\nLinting of [FeatureSliced](https://github.com/feature-sliced/documentation) concepts *by existing eslint-plugins*\n\n- Control [**Isolation**](https://feature-sliced.design/docs/concepts/low-coupling) \u0026 [**Decomposition**](https://feature-sliced.design/docs/concepts/app-splitting)\n- Control [**Public API**](https://feature-sliced.design/docs/concepts/public-api)\n- Control [**Layers \u0026 Scopes**](https://feature-sliced.design/docs/reference/layers)\n- Control [**Naming**](https://feature-sliced.design/docs/concepts/naming-adaptability)\n\n\u003c!--\nUncomment if will be needed\n\n## Table of contents\n* [Overview](#overview)\n* [Get started](#get-started)\n* [Usage](#usage)\n* [Also](#also)\n--\u003e\n\n## Rules\n\nEach rule has its own test cases and customization aspects\n\n- [`import-order`](./rules/import-order)\n- [`public-api`](./rules/public-api)\n- [`layers-slices`](./rules/layers-slices)\n\n## Get Started\n\n1. You'll first need to install [ESLint](http://eslint.org):\n\n    ```sh\n    $ npm install -D eslint\n    # or by yarn\n    $ yarn add -D eslint\n    $ or by pnpm \n    $ pnpm add -D eslint\n    ```\n\n2. Next, install `@feature-sliced/eslint-config` and dependencies:\n\n    ```sh\n    $ npm install -D @feature-sliced/eslint-config eslint-plugin-import eslint-plugin-boundaries\n    # or by yarn\n    $ yarn add -D @feature-sliced/eslint-config eslint-plugin-import eslint-plugin-boundaries\n    # or by pnpm \n    $ pnpm add -D @feature-sliced/eslint-config eslint-plugin-import eslint-plugin-boundaries\n    ```\n\n3. Add config to the `extends` section of your `.eslintrc` configuration file (for **recommended** rules). You can omit the `eslint-config` postfix:\n\n    ```json\n    {\n        \"extends\": [\"@feature-sliced\"]\n    }\n    ```\n\n4. `TYPESCRIPT-ONLY:` Also setup TS-parser and TS-plugin [(why?)](https://github.com/javierbrea/eslint-plugin-boundaries#usage-with-typescript)\n    \u003cdetails\u003e\n    \u003csummary\u003eDetails\u003c/summary\u003e\n\n    **Install dependencies:**\n\n    ```sh\n    $ npm i -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-typescript\n    # or by yarn\n    $ yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-typescript\n    ```\n\n    **Configure `@typescript-eslint/parser` as parser and setup the `eslint-import-resolver-typescript` resolver in the `.eslintrc` config file:**\n\n    ```json\n    {\n      \"parser\": \"@typescript-eslint/parser\",\n      \"settings\": {\n        \"import/resolver\": {\n          \"typescript\": {\n            \"alwaysTryTypes\": true\n          }\n        }\n      }\n    }\n      ```\n\n    \u003c/details\u003e\n\n## Usage\n\n- Support general **aliases**\n\n  ```js\n  import { Input } from \"~/shared/ui/input\";\n  import { Input } from \"@/shared/ui/input\";\n  import { Input } from \"@shared/ui/input\";\n  import { Input } from \"$shared/ui/input\";\n  // But not - import { Input } from \"$UIKit/input\";\n  ```\n\n- Support **relative** and **absolute** imports (but look at [recommendations](https://github.com/feature-sliced/eslint-config/issues/29))\n\n  ```js\n  import { ... } from \"entities/foo\";    // absolute imports\n  import { ... } from \"@/entities/foo\";  // aliased imports\n  import { ... } from \"../entities/foo\"; // relative imports\n  ```\n\n- **Case**-agnostic\n\n  ```js\n  import { ... } from \"entities/user-post\";  // Support kebab-case (recommended)\n  import { ... } from \"entities/UserPost\";   // Support PascalCase\n  import { ... } from \"entities/userPost\";   // Support camelCase\n  import { ... } from \"entities/user_post\";  // Support snake_case\n  ```\n\n- For exceptional cases, support ⚠️**DANGEROUS-mode**⚠️ (see more for [specific rule](#rules))\n\n## Customization\n\n1. You can *partially use* the rules\n\n   \u003e **WARN:** Don't use main config (`\"@feature-sliced\"`) in customization to avoid rules conflicts.\n\n   ```js\n   \"extends\": [\n     \"@feature-sliced/eslint-config/rules/import-order\",\n     \"@feature-sliced/eslint-config/rules/public-api\",\n     \"@feature-sliced/eslint-config/rules/layers-slices\",\n   ]\n   ```\n\n1. You can use *alternative experimental rules*\n    - Use [`import-order/experimental`](./rules/import-order#Experimental) for formatting with spaces between groups and reversed order of layers [(why?)](https://github.com/feature-sliced/eslint-config/issues/85)\n\n      ```js\n      \"extends\": [\n        // ... Other rules or config\n        \"@feature-sliced/eslint-config/rules/import-order/experimental\",\n      ]\n      ```\n\n    - Use [`public-api/lite`](./rules/public-api#Lite) for less strict PublicAPI boundaries [(why?)](https://github.com/feature-sliced/eslint-config/issues/90)\n\n        ```js\n        \"extends\": [\n          // ... Other rules or config\n          \"@feature-sliced/eslint-config/rules/public-api/lite\",\n        ]\n        ```\n\n1. You can use *warnings* instead of *errors* for specific rules\n\n   ```js\n   \"rules\": {\n      // feature-sliced/import-order\n      \"import/order\": \"warn\" // ~ 1,\n      // feature-sliced/public-api\n      \"import/no-internal-modules\": \"warn\" // ~ 1,\n      // feature-sliced/layers-slices\n      \"boundaries/element-types\": \"warn\" // ~ 1,\n   }\n   ```\n  \n1. You can use *[advanced FSD-specific messages processing](https://www.npmjs.com/package/@feature-sliced/eslint-plugin-messages)*\n\n   ```diff\n   # (feature-sliced/public-api)\n   - 'Reaching to \"features/search/ui\" is not allowed.'\n   + 'Violated usage of modules Public API | https://git.io/Jymjf'\n    ```\n\n## See also\n\n- [FAQ](./FAQ.md)\n- [Releases \u0026 Changelog](https://github.com/feature-sliced/eslint-config/releases)\n- [**How can I help?**](./CONTRIBUTING.md)\n  - ⭐ Rate us on GitHub\n  - 💫 **Any assistance is important** - from *feedback to participation in the development of the methodology*!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeature-sliced%2Feslint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeature-sliced%2Feslint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeature-sliced%2Feslint-config/lists"}