# eslint-plugin-code-isolation

> ESLint rules to help isolate one part of the project from another

Latest version **1.1.1** (published 2021-05-11) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install eslint-plugin-code-isolation
pnpm add eslint-plugin-code-isolation
yarn add eslint-plugin-code-isolation
bun add eslint-plugin-code-isolation
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2021-05-11 |
| First published | 2020-09-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 42.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ilya Lyubinskiy |
| Maintainers | ilyub |
| Keywords | code, disallow, eslint, identifier, import, isolation, javascript, plugin, regexp, typescript |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-code-isolation
- Repository: https://github.com/ilyub/eslint-plugin-code-isolation
- Issues: https://github.com/ilyub/eslint-plugin-code-isolation/issues
- npm.io page: https://npm.io/package/eslint-plugin-code-isolation

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.2.0

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2021-05-11
- 1.1.0 — 2021-05-10
- 1.0.4 — 2020-09-08
- 1.0.3 — 2020-09-08
- 1.0.2 — 2020-09-08

## README

# Code Isolation plugin for ESLint

This plugin contains rules to help isolate one part of the project from another.

Demo project: [eslint-plugin-code-isolation-demo](https://github.com/ilyub/eslint-plugin-code-isolation-demo)

## Installation

    npm install --save-dev eslint-plugin-code-isolation

**eslintrc.js:**

    module.exports = {
      plugins: ["code-isolation"]
    };

## Rules

### disallow-by-regexp

**eslintrc.js:**

    "code-isolation/disallow-by-regexp": [
      "error",
      {
        allow: Array<string | RegExp>,
        base: __dirname,
        disallow: Array<string | RegExp>,
        strings: Array<string | RegExp>
      },
      ...
    ]

    allow - Allowed locations, paths relative to base
    disallow - Disallowed locations, paths relative to base
    strings - Disallowed strings in source code

### disallow-identifier

**eslintrc.js:**

    "code-isolation/disallow-identifier": [
      "error",
      {
        allow: Array<string | RegExp>,
        base: __dirname,
        disallow: Array<string | RegExp>,
        ids: Array<string>
      },
      ...
    ]

    ids - Disallowed identifiers

### disallow-import

**eslintrc.js:**

    "code-isolation/disallow-import": [
      "error",
      {
        allow: Array<string | RegExp>,
        allowSources: Array<string | RegExp>,
        base: __dirname,
        disallow: Array<string | RegExp>,
        disallowSources: Array<string | RegExp>
      },
      ...
    ]

    allowSources - Allowed import sources
    disallowSources - Disallowed import sources

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