# @kard/esfix

> Eslint CLI default configuration and fix utility.

Latest version **1.0.2** (published 2017-12-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @kard/esfix
pnpm add @kard/esfix
yarn add @kard/esfix
bun add @kard/esfix
```

Provides the command `esfix`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-12-01 |
| First published | 2017-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.0.0 |
| Dependencies | 11 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dmitriy Karmalita |
| Maintainers | kard |
| Keywords | babel, eslint |

## Links

- npm: https://www.npmjs.com/package/@kard/esfix
- Repository: https://github.com/dkarmalita/esfix
- Homepage: https://github.com/dkarmalita/esfix#readme
- Issues: https://github.com/dkarmalita/esfix/issues
- npm.io page: https://npm.io/package/@kard/esfix

## Dependencies (11)

- [colors](https://npm.io/package/colors.md) 1.1.2
- [eslint](https://npm.io/package/eslint.md) 4.12.0
- [babel-eslint](https://npm.io/package/babel-eslint.md) 8.0.2
- [eslint-plugin-node](https://npm.io/package/eslint-plugin-node.md) 5.2.1
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) 7.5.1
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) 2.8.0
- [eslint-plugin-promise](https://npm.io/package/eslint-plugin-promise.md) 3.6.0
- [eslint-config-standard](https://npm.io/package/eslint-config-standard.md) 10.2.1
- [eslint-plugin-standard](https://npm.io/package/eslint-plugin-standard.md) 3.0.1
- [eslint-config-standard-jsx](https://npm.io/package/eslint-config-standard-jsx.md) 4.0.2
- [eslint-plugin-class-property](https://npm.io/package/eslint-plugin-class-property.md) 1.0.6

## 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

- 1.0.2 (latest) — 2017-12-01
- 1.0.1 — 2017-11-29
- 1.0.0 — 2017-11-29

## README

# Esfix

[![Build Status](https://travis-ci.org/dkarmalita/esfix.svg?branch=master)](https://travis-ci.org/dkarmalita/esfix)
[![codecov](https://codecov.io/gh/dkarmalita/esfix/branch/master/graph/badge.svg)](https://codecov.io/gh/dkarmalita/esfix)

**Table of Content**

<!-- MarkdownTOC -->

- [Installation](#installation)
- [Configuration exaple](#configuration-exaple)
- [Command line options](#command-line-options)
- [Troubleshooting](#troubleshooting)
  - [Different indent sizes](#different-indent-sizes)

<!-- /MarkdownTOC -->

## Installation

`npm i --dev @kard/esfix`

Or with yarn

`yarn add --dev @kard/esfix`

## Configuration exaple

In the `package.json`:

```
  "scripts": {
    "esfix": "esfix"
  },
  "eslintConfig": {
    "files": [ "src/**/*.js", "src/**/*.jsx" ],
    "fix": true
  }
```

Notes:
* The `eslintConfig` section can be used to rewrite all of the eslint options. Please refer to the [Configuration File Formats](https://eslint.org/docs/user-guide/configuring#configuration-file-formats) and [Rules](https://eslint.org/docs/rules/) pages of eslint documentation.

## Command line options

`--nolocals` - Ignore any local configurations of the analyzed projects. Whet this key is presents, the only internal configuration of the package is using.

`--dryrun` - No fixes are carried out linting is performed and all of its messages are shown. It's like to run eslint without `--fix`.

`--showconfig` - Show summarized config. No checks or fixes are carried out in this case.

## Troubleshooting

### Different indent sizes

It is especially painful when only indent is rewritten in a separate file (for instance: the main configuration is inside `.eslintrc.json` while rewrite is placed inside `package.json`)

**Error pattern**
```
error: Expected indentation of ... space characters but found ... (react/jsx-indent-props) at ...

...

11 errors and 1 warning found.
11 errors potentially fixable with the `--fix` option.
```

**Solution**: make sure that these rules are in sync.
```
  "rules": {
    "indent": ["error", 2],
    "react/jsx-indent": [ "error", 2 ],
    "react/jsx-indent-props": [ "error", 2 ]
  }
```

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