Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/doug-wade/eslint-config-fixable

An eslint preset with all the fixable rules
https://github.com/doug-wade/eslint-config-fixable

eslint eslint-config fixable fixable-rules

Last synced: 30 days ago
JSON representation

An eslint preset with all the fixable rules

Awesome Lists containing this project

README

        

# eslint-config-fixable

[![Greenkeeper badge](https://badges.greenkeeper.io/doug-wade/eslint-config-fixable.svg)](https://greenkeeper.io/)

A eslint preset with all the fixable rules. If you notice a rule missing, send me a pr!

# Installation

```sh
npm install -D eslint-config-fixable
```

Then, add it to your [eslint config](http://eslint.org/docs/user-guide/configuring#configuration-file-formats) (a .eslintrc or your package.json, for instance).

```json
{
"extends": "eslint-config-fixable"
}
```

# Usage

To fix all the fixable errors, run eslint with the `fix` option

```sh
eslint --fix
```

There are a number of rules that are es6-specific, so you may also want to consider using babel-eslint as your parser

```json
{
"extends": "eslint-config-fixable",
"parser": "babel-eslint"
}
```

# Disclaimer

I'm not sure the preset will fix the fixable eslint errors to the values you want -- for instance, I correct comparisons
to use yoda because eslint seems to suggest it. Since everything is fixable automatically, I'm pretty amenable to changes,
so don't be shy about sending a pr.