# @prodigy/eslint-config-prodigy

> ESLint Base Configuration for Prodigy Projects

Latest version **0.0.7** (published 2017-07-19) · 0 weekly downloads

## Install

```sh
npm install @prodigy/eslint-config-prodigy
pnpm add @prodigy/eslint-config-prodigy
yarn add @prodigy/eslint-config-prodigy
bun add @prodigy/eslint-config-prodigy
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2017-07-19 |
| First published | 2016-10-18 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | prodigy |

## Links

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

## Recent versions

- 0.0.7 (latest) — 2017-07-19
- 0.0.6 — 2017-07-18
- 0.0.5 — 2017-01-11
- 0.0.4 — 2016-10-21
- 0.0.3 — 2016-10-20
- 0.0.2 — 2016-10-20
- 0.0.1 — 2016-10-18
- 1.0.0 — 2016-10-18

## README

# Prodigy Shared ESLint

This repo contains [ESLint](http://eslint.org) configuration for use against all of Prodigy's JavaScript projects. Our rules are based on the [AirBnB ESLint Configuration](https://github.com/airbnb/javascript) for both ES5 and ES6+. Changes to these rules can be proposed via a issues or a pull request.

If you haven't read the [AirBnB Styleguide](https://github.com/airbnb/javascript) it's worth a read, because some of their guidelines cannot yet be enforced by linters ([filenames, for instance](https://github.com/airbnb/javascript#naming--filename-matches-export)).

# Usage

Install the linter:
```
npm install --save-dev eslint eslint-plugin-import eslint-config-airbnb-base@9.0.0
npm install --save-dev @prodigy/eslint-config-prodigy
```

Then add the configuration to your package.json.

### For an ES6+ project:
```
"eslintConfig": {
    "extends": "@prodigy/eslint-config-prodigy"
}
```

### For an ES5 project:
```
"eslintConfig": {
    "extends": "@prodigy/eslint-config-prodigy/es5"
}
```

### For Tests:

With tests, you can include an `eslintrc.json` file in your tests folder and it will change the rules for use in tests:

```
{
    "extends": "@prodigy/eslint-config-prodigy/tests"
}
```

This will override settings from the ESLint config at the lower levels.

## NPM Script

If you want, you can also add an npm command for linting to your package.json:

```
"scripts": {
  "lint": "eslint --ignore-path .gitignore ."
}
```

Or, for just files that have changed since the dev branch:
```
"scripts": {
  "lint": "git diff --name-only dev | grep "\.js\$" | xargs eslint"
}
```

# Automatic Fixing

Many of the errors detected by ESLint can be automatically fixed. Whether or not you should do this on a project-wide basis should be discussed ahead of time with your team. Doing this carelessly can lead to a messy git history.

That said, you can have ESLint fix errors on a per-file basis or configure your editor with a command that can automatically lint. It is always a good idea to fix linting problems with code in a separate commit or PR before you make changes.

To fix changes in a file:
```
./node_modules/.bin/eslint --fix file.js
```

To fix changes in a folder (recursive):
```
./node_modules/.bin/eslint --fix .
```

# Editor Configuration

Most of the value of the linter will come from editor integration. The following plugins may be of value:

* Atom: [Linter](https://atom.io/packages/linter)
* Emacs: [FlyCheck](https://github.com/flycheck/flycheck)
* Sublime Text: [SublimeLinter](http://www.sublimelinter.com/en/latest/)
* Vim: [Syntastic](https://github.com/scrooloose/syntastic)

Note, that to get ESLint working with your editor, you may need to install it globally (with -g).

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