# eslint-plugin-lucky-fsd

> plugin for fsd project

Latest version **0.0.20** (published 2023-05-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-lucky-fsd
pnpm add eslint-plugin-lucky-fsd
yarn add eslint-plugin-lucky-fsd
bun add eslint-plugin-lucky-fsd
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.20 |
| Published | 2023-05-19 |
| First published | 2023-04-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^14.17.0 \|\| ^16.0.0 \|\| >= 18.0.0 |
| Dependencies | 3 |
| Unpacked size | 22.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lucky |
| Maintainers | alexander_lucky |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-lucky-fsd
- npm.io page: https://npm.io/package/eslint-plugin-lucky-fsd

## Dependencies (3)

- [micromatch](https://npm.io/package/micromatch.md) ^4.0.5
- [requireindex](https://npm.io/package/requireindex.md) ^1.2.0
- [generator-eslint](https://npm.io/package/generator-eslint.md) ^4.1.3

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 0.0.20 (latest) — 2023-05-19
- 0.0.19 — 2023-05-19
- 0.0.18 — 2023-05-19
- 0.0.17 — 2023-05-18
- 0.0.16 — 2023-05-15
- 0.0.15 — 2023-05-09
- 0.0.14 — 2023-05-09
- 0.0.13 — 2023-05-08
- 0.0.12 — 2023-05-08
- 0.0.11 — 2023-05-08
- 0.0.10 — 2023-05-08
- 0.0.9 — 2023-05-08
- 0.0.8 — 2023-05-08
- 0.0.7 — 2023-05-07
- 0.0.6 — 2023-04-11
- … 4 more at https://npm.io/package/eslint-plugin-lucky-fsd/versions

## README

# eslint-plugin-lucky-fsd

Plugin for Feature-Sliced Design(it was developed for Windows and may not work on Mac)
1. Checks that the paths inside the component are relative. Also supports
checking with aliases.
2. Prohibits importing from non-public api
3. Prohibits import from overlying layers


## Installation

You'll first need to install [ESLint](https://eslint.org/):

```sh
npm i eslint --save-dev
```

Next, install `eslint-plugin-lucky-fsd`:

```sh
npm install eslint-plugin-lucky-fsd --save-dev
```

## Usage

Add `lucky-fsd` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
    "plugins": [
        "lucky-fsd"
    ]
}
```


Then configure the rules you want to use under the rules section.

'lucky-fsd/path-checker' - checks that the paths inside the component are relative. Also supports
checking with aliases.
'lucky-fsd/public-api-imports' - prohibits importing from non-public api
'lucky-fsd/layer-imports' - prohibits import from overlying layers

```
{
    rules: {
      'lucky-fsd/path-checker': ['error', { alias: '@' }],
      'lucky-fsd/public-api-imports': [
        'error',
        {
          alias: '@',
          testFilesPatterns: ['**/*.test.*', '**/*.stories.*', '**/StoreDecorator.tsx'],
        }
      ],
      'lucky-fsd/layer-imports': [
        'error',
        {
          alias: '@',
          ignoreImportPatterns: [ '**/StoreProvider' ],
        }
      ]
    },
}
```

---
_Source: https://npm.io/package/eslint-plugin-lucky-fsd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
