# eslint-fixer

> Promise based function to apply `eslint --fix` to given directory or files.

Latest version **0.1.5** (published 2018-05-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-fixer
pnpm add eslint-fixer
yarn add eslint-fixer
bun add eslint-fixer
```

## Health

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

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2018-05-17 |
| First published | 2017-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 1 |
| Install scripts | no |
| Author | Özüm Eldoğan |
| Maintainers | ozum |
| Keywords | eslint, fix, cli, utility |

## Links

- npm: https://www.npmjs.com/package/eslint-fixer
- Repository: https://github.com/ozum/eslint-fixer
- Homepage: https://github.com/ozum/eslint-fixer#readme
- Issues: https://github.com/ozum/eslint-fixer/issues
- npm.io page: https://npm.io/package/eslint-fixer

## Dependencies (1)

- [p-wait-for](https://npm.io/package/p-wait-for.md) ^1.x

## 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.5 (latest) — 2018-05-17
- 0.1.4 — 2017-03-25
- 0.1.3 — 2017-03-23
- 0.1.2 — 2017-03-23
- 0.1.1 — 2017-03-17
- 0.1.0 — 2017-03-17
- 0.0.2 — 2017-03-17
- 0.0.1 — 2017-03-15

## README

# DEPRECATED

# eslint-fixer

Simple module which provides a promise based function to apply `eslint --fix` to given directory or files.

# Usage

```js
const fix = require("eslint-fixer");

fix("./my-file.js")
  .then(result => doSomething())
  .catch(err => console.error(err));
```

# API

<!--- API BEGIN --->

## Functions

<dl>
<dt><a href="#fix">fix(filePath, options)</a> ⇒ <code>Promise.&lt;void&gt;</code></dt>
<dd><p>Executes <code>eslint --fix</code> for given filePath based on options.</p>
</dd>
</dl>

## Typedefs

<dl>
<dt><a href="#Options">Options</a> : <code>Object</code></dt>
<dd><p>Options to determine fix function&#39;s behaviour.</p>
</dd>
</dl>

<a name="fix"></a>

## fix(filePath, options) ⇒ <code>Promise.&lt;void&gt;</code>

Executes `eslint --fix` for given filePath based on options.

**Kind**: global function  
**Returns**: <code>Promise.&lt;void&gt;</code> - - Result promise

| Param    | Type                             | Description                            |
| -------- | -------------------------------- | -------------------------------------- |
| filePath | <code>string</code>              | File path is passed to `eslint --fix`. |
| options  | <code>[Options](#Options)</code> | Options                                |

<a name="Options"></a>

## Options : <code>Object</code>

Options to determine fix function's behaviour.

**Kind**: global typedef  
**Properties**

| Name           | Type                 | Default            | Description                                                                                                               |
| -------------- | -------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------- |
| checkAvailable | <code>boolean</code> | <code>false</code> | When true, `eslint` command availability is checked. If `eslint` is not available, `eslint` command will not be executed. |
| useEslint      | <code>boolean</code> | <code>true</code>  | When false, `eslint` command will not be executed.                                                                        |

<!--- API END --->

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