# eslint-plugin-import-checker-plugin

> Plugin checks absolute and relative paths in the project

Latest version **0.0.15** (published 2024-11-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-import-checker-plugin
pnpm add eslint-plugin-import-checker-plugin
yarn add eslint-plugin-import-checker-plugin
bun add eslint-plugin-import-checker-plugin
```

## 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.15 |
| Published | 2024-11-15 |
| First published | 2023-07-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^14.17.0 \|\| ^16.0.0 \|\| >= 18.0.0 |
| Dependencies | 2 |
| Unpacked size | 20.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Zav Natalia |
| Maintainers | kor_natalie |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-import-checker-plugin
- Repository: https://github.com/ZavNatalia/eslint-plugin-import-checker
- Homepage: https://github.com/ZavNatalia/eslint-plugin-import-checker#readme
- Issues: https://github.com/ZavNatalia/eslint-plugin-import-checker/issues
- npm.io page: https://npm.io/package/eslint-plugin-import-checker-plugin

## Dependencies (2)

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

## 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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 0.0.15 (latest) — 2024-11-15
- 0.0.14 — 2024-11-15
- 0.0.13 — 2023-09-21
- 0.0.12 — 2023-09-15
- 0.0.11 — 2023-09-15
- 0.0.10 — 2023-09-06
- 0.0.9 — 2023-09-05
- 0.0.8 — 2023-09-05
- 0.0.7 — 2023-09-04
- 0.0.6 — 2023-09-04
- 0.0.5 — 2023-09-04
- 0.0.4 — 2023-07-28
- 0.0.3 — 2023-07-25
- 0.0.2 — 2023-07-24
- 0.0.1 — 2023-07-24

## README

# Import checker plugin

Plugin checks absolute and relative paths in the project

## Installation

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

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

Next, install `eslint-plugin-import-checker-plugin`:

```sh
npm install eslint-plugin-import-checker-plugin --save-dev
```

## Usage

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

```json
{
    "plugins": [
        "import-checker-plugin"
    ]
}
```


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

```json
{
    "rules": {
        "import-checker-plugin/rule-name": ["error", { "alias": "@" }],
        "import-checker-plugin/public-api-imports": [
          "error", 
          {
            "alias": "@",
            "testFilesPatterns": [",**/*.test.ts", ",**/*.story.*", ",**/StoreDecorator.tsx"]
          }
        ],
        "import-checker-plugin/layer-imports": [
          "error",
          {
            "alias": "@",
            "ignoreImportPatterns": ["**/StoreProvider"]
          }
        ]
    }
}
```

## Rules

<!-- begin auto-generated rules list -->

| Name                                             | Description                                                |
|:-------------------------------------------------|:-----------------------------------------------------------|
| [path-checker](docs/rules/path-checker.md)       | Within a single slice, all paths must be relative          |
| [public-api-imports](docs/rules/public-api-imports.md) | Absolute import is only allowed from Public API (index.ts)|
| [layer-imports](docs/rules/layer-imports.md) | A layer can only import underlying layers into itself    |

<!-- end auto-generated rules list -->

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