# eslint-plugin-indexof

> Disallow using the method indexOf

Latest version **0.1.1** (published 2016-01-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-indexof
pnpm add eslint-plugin-indexof
yarn add eslint-plugin-indexof
bun add eslint-plugin-indexof
```

## 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.1.1 |
| Published | 2016-01-12 |
| First published | 2016-01-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jordan Eldredge |
| Maintainers | captbaritone |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

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

## Dependencies (1)

- [requireindex](https://npm.io/package/requireindex.md) ~1.1.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
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2016-01-12
- 0.1.0 — 2016-01-12
- 0.0.0 — 2016-01-11

## README

# eslint-plugin-indexof

Disallow using the method indexOf.

__Note:__ This plugin will likely cause many false positives. For example,
Backbone collections offer an `indexOf` method, which will be have to be
manually ignored.

## Installation

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

```
$ npm i eslint --save-dev
```

Next, install `eslint-plugin-indexof`:

```
$ npm install eslint-plugin-indexof --save-dev
```

**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-indexof` globally.

## Usage

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

```json
{
    "plugins": [
        "indexof"
    ]
}
```


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

```json
{
    "rules": {
        "indexof/rule-name": [2, {exceptOn: ['_']}]
    }
}
```

## Supported Rules

* [no-indexof](docs/rules/no-indexof.md) Disallow using the `indexOf()` method.

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