# eslint-plugin-file-contains

> ESLint rule for enforcing a string appears in multiple files as expected.

Latest version **1.0.1** (published 2022-12-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-file-contains
pnpm add eslint-plugin-file-contains
yarn add eslint-plugin-file-contains
bun add eslint-plugin-file-contains
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-12-01 |
| First published | 2022-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 12.x \|\| 14.x \|\| >= 16 |
| Dependencies | 3 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mark Katerberg |
| Maintainers | katerberg |
| Keywords | eslint, eslintplugin, eslint-plugin, folder, path, file, filename, glob-matching |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-file-contains
- Repository: https://github.com/katerberg/eslint-plugin-file-contains
- Issues: https://github.com/katerberg/eslint-plugin-file-contains/issues
- npm.io page: https://npm.io/package/eslint-plugin-file-contains

## Dependencies (3)

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

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2022-12-01
- 1.0.0 — 2022-11-29

## README

# eslint-plugin-file-contains

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]

ESLint rules for ensuring files have consistent usage of desired features. Allows you to enforce usage of imports across various file locations.

## Installation

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

```sh
npm install eslint --save-dev
```

Next, install
`eslint-plugin-file-contains`:

```sh
npm install eslint-plugin-file-contains --save-dev
```

## Usage

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

```json
{
  "plugins": ["check-file"]
}
```

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

```json
{
  "rules": {
    "file-contains/every-file-imports": [
      "error",
      {
        "**/*.test.{js,jsx,ts,tsx}": "jest-axe",
        "**/*.{jsx,tsx}": "react"
      }
    ]
  }
}
```

## Supported Rules

- [file-contains/every-file-imports](docs/rules/every-file-imports.md): Enforce that every file imports from an expected location for the specified file pattern

[npm-image]: https://img.shields.io/npm/v/eslint-plugin-file-contains.svg
[npm-url]: https://www.npmjs.com/package/eslint-plugin-file-contains
[downloads-image]: https://img.shields.io/npm/dm/eslint-plugin-file-contains.svg
[downloads-url]: https://www.npmjs.com/package/eslint-plugin-file-contains

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