# eslint-config-mutant

> shareable eslint config based on airbnb base config

Latest version **1.5.0** (published 2020-08-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install eslint-config-mutant
pnpm add eslint-config-mutant
yarn add eslint-config-mutant
bun add eslint-config-mutant
```

## 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.5.0 |
| Published | 2020-08-21 |
| First published | 2020-08-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 10 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bruno Afono |
| Maintainers | brunohafonso |

## Links

- npm: https://www.npmjs.com/package/eslint-config-mutant
- npm.io page: https://npm.io/package/eslint-config-mutant

## Dependencies (6)

- [eslint](https://npm.io/package/eslint.md) ^6.8.0
- [prettier](https://npm.io/package/prettier.md) ^2.0.5
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.20.2
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) ^6.11.0
- [eslint-plugin-prettier](https://npm.io/package/eslint-plugin-prettier.md) ^3.1.3
- [eslint-config-airbnb-base](https://npm.io/package/eslint-config-airbnb-base.md) ^14.1.0

## Recent versions

- 1.5.0 (latest) — 2020-08-21
- 1.4.0 — 2020-08-11
- 1.3.0 — 2020-08-11
- 1.2.3 — 2020-08-10
- 1.2.2 — 2020-08-05
- 1.2.1 — 2020-08-04
- 1.2.0 — 2020-08-03
- 1.1.0 — 2020-08-03

## README

# Eslint config mutant

This package provides Mutant's .eslintrc as an extensible shared config.

# Usage

1. Install the package `eslint-config-mutant` using:

```bash
# using npm
npm i eslint-config-mutant --save-dev
```

```bash
# using yarn
yarn add eslint-config-mutant -D
```

2. Create a `.eslintrc.json` file with the following content:

```javascript
{
  "extends": ["eslint-config-mutant"]
}
```

3. Create a `.prettierrc` file with following content:

```javascript
{ "printWidth": 80, "singleQuote": true }
```

4. Create a `.editorconfig` file with the following content:

```javascript
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
# editorconfig-tools is unable to ignore longs strings or urls
max_line_length = null
```

And the configuration is ready to use, the custom rules that the config contains are:

```javascript
{
  "import/prefer-default-export": "off",
  "no-use-before-define": ["error", { functions: false }],
  "prettier/prettier": ["error"],
  "arrow-body-style": "off",
  "function-paren-newline": "off",
  complexity: ["warn", 5],
  "max-statements": ["warn", { max: 10 }],
  "max-statements-per-line": ["warn", { max: 1 }],
  "max-nested-callbacks": ["warn", { max: 2 }],
  "max-depth": ["warn", { max: 2 }],
  "max-params": ["warn", 3],
  "max-len": [
    "warn",
    80,
    {
      ignoreUrls: true,
      ignoreComments: true,
      ignoreStrings: true,
      ignorePattern: "^\\s*const\\s.+=\\s*require\\s*\\(",
    },
  ],
  "no-param-reassign": [
    "warn",
    {
      props: true,
      ignorePropertyModificationsFor: [
        "acc",
        "accumulator",
        "item",
        "e",
        "module",
        "req",
        "request",
        "res",
        "response",
        "session",
      ],
    },
  ],
  "no-useless-constructor": "off",
  "class-methods-use-this": "off",
}
```

the other rules we extends from [Airbnb's JavaScript styleguide](https://github.com/airbnb/javascript)

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