# eslint-config-defaults

> A set of default eslint configuration

Latest version **9.0.0** (published 2016-02-10) · MIT license · 0 weekly downloads

## Install

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

## 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 | 9.0.0 |
| Published | 2016-02-10 |
| First published | 2015-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 225 |
| Author | Eric Baer |
| Maintainers | baer |
| Keywords | code checker, code linter, code standards, code style, eslint-config, eslint, eslintconfig, lint, style checker, style linter |

## Links

- npm: https://www.npmjs.com/package/eslint-config-defaults
- Repository: https://github.com/walmartlabs/eslint-config-defaults
- Issues: https://github.com/walmartlabs/eslint-config-defaults/issues
- npm.io page: https://npm.io/package/eslint-config-defaults

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

- 9.0.0 (latest) — 2016-02-10
- 10.0.0-alpha.1 (alpha) — 2016-03-09
- 8.0.2 — 2016-01-12
- 8.0.1 — 2016-01-09
- 8.0.0 — 2016-01-09
- 7.1.1 — 2015-10-29
- 7.1.0 — 2015-10-29
- 7.0.1 — 2015-10-02
- 7.0.0 — 2015-10-01
- 6.0.0 — 2015-09-01
- 5.0.0 — 2015-08-27
- 4.2.0 — 2015-08-19
- 4.1.1 — 2015-08-19
- 4.1.0 — 2015-08-17
- 4.0.2 — 2015-08-17
- … 23 more at https://npm.io/package/eslint-config-defaults/versions

## README

<h1 align="center">eslint-config-defaults</h1>

<p align="center">
  <a title='npm version' href="https://npmjs.org/package/eslint-config-defaults">
    <img src='http://img.shields.io/npm/v/eslint-config-defaults.svg' />
  </a>
  <a title='License' href="https://opensource.org/licenses/MIT">
    <img src='https://img.shields.io/badge/license-MIT-blue.svg' />
  </a>
  <a title='Build Status' href='https://travis-ci.org/walmartlabs/eslint-config-defaults'>
    <img src='https://api.travis-ci.org/walmartlabs/eslint-config-defaults.svg?branch=master' />
  </a>
</p>

<h4 align="center">
  A composable set of ESLint configurations.
</h4>

***

## Installation

Install this config package and ESLint:

```bash
$ npm install --save-dev eslint eslint-config-defaults
```

## Usage

### Full Configurations

This package includes the following complete and ready to use configurations:

- `defaults` - The config [recommended](https://github.com/eslint/eslint/blob/master/conf/eslint.json) by ESLint
- `defaults/configurations/eslint` - The config [recommended](https://github.com/eslint/eslint/blob/master/conf/eslint.json) by ESLint
- `defaults/configurations/google` - The [Google JavaScript Style Guide](https://google.github.io/styleguide/javascriptguide.xml)
- `defaults/configurations/gulp` - The [Gulp ESLint config](https://github.com/gulpjs/eslint-config-gulp)
- `defaults/configurations/node-runtime` - The config [used for the Node.js runtime](https://github.com/nodejs/node/blob/master/.eslintrc)
- `defaults/configurations/off` - Disable all rules (ESLint's default at 1.0.0+)
- `defaults/configurations/airbnb/es5` - Config from the [AirBnB Style Guide](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb)
- `defaults/configurations/airbnb/es6-react` - Config from the [AirBnB Style Guide](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb)
- `defaults/configurations/airbnb/es6` - Config from the [AirBnB Style Guide](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb)
- `defaults/configurations/walmart/es5-browser` - Walmart ES5 + browser
- `defaults/configurations/walmart/es5-node` - Walmart ES5 + node < 4.x
- `defaults/configurations/walmart/es5-test` - Walmart ES5 + test
- `defaults/configurations/walmart/es5` - Walmart ES5 config
- `defaults/configurations/walmart/es6-browser` - Walmart ES6 + browser
- `defaults/configurations/walmart/es6-node` - Walmart ES6 + node 4.x
- `defaults/configurations/walmart/es6-react-test` - Walmart ES6 + react + test
- `defaults/configurations/walmart/es6-react` - Walmart ES6 + react
- `defaults/configurations/walmart/es6-test` - Walmart ES6 + test
- `defaults/configurations/walmart/es6` - Walmart ES6 config

###### Dependencies

- Any Walmart config (`defaults/configurations/walmart/<suffix>`) - [eslint-plugin-filenames](https://github.com/selaux/eslint-plugin-filenames)
- Any React config (`<prefix>-react`) - [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react), [babel-eslint](https://github.com/babel/babel-eslint)
- Any ES-next config (`es6-<suffix>`) - [babel-eslint](https://github.com/babel/babel-eslint)

To consume and extend a config in ESLint just add the extends attribute to your `.eslintrc`. For
more details about how shareable configs work, see the
[ESLint documentation](http://eslint.org/docs/developer-guide/shareable-configs).

```yaml
---
"extends":
  - "defaults"
```

```yaml
---
"extends":
  - "defaults/configurations/walmart/es6-browser"
```

**NOTE:** Extending multiple complete configs can cause unexpected results, if you need to do this you should consider a piecemeal config as explained below. See https://github.com/walmartlabs/eslint-config-defaults/issues/38 for details.

### Piecemeal Configurations

ESLint configuration is broken apart in `./rules` containing ESLint's rules and rules for specific ESLint plugins. The full set of ESLint rules (`./rules/eslint`) are broken into categories that mirror ESLint's documentation. Under each rule type there are sets of configuration as well as an `off.js` file which turns off every rule in the category.

###### Examples

```yaml
---
"extends":
  - "defaults/rules/eslint/best-practices/walmart",
  - "defaults/rules/eslint/errors/airbnb"

  - "defaults/rules/eslint/es6/off"
  - "defaults/rules/eslint/node/off"

"env":
  "phantom": true
```

## Limitations

Due to an issue with ESLint, config extension cannot be called from a globally installed (`npm install -g eslint`) eslint. It can however be run properly using eslint installed directly to your package's `node_modules`. This can be done by either calling it directly (`./node_modules/.bin/eslint .`) or from within an npm script since they automatically check local `node_modules` first. This will be tracked in issue [#43](https://github.com/walmartlabs/eslint-config-defaults/issues/43).

### This package tracks config in the following versions:

- [ESLint](https://github.com/eslint/eslint) 1.10.3
- [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) 3.12.0
- [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb) 5.0.0
- [eslint-config-gulp](https://github.com/gulpjs/eslint-config-gulp) 2.0.0
- [Google JavaScript Style Guide](https://github.com/google/styleguide/tree/43d738ab8bb0c797f78506945729946aacbab17d) 43d738ab8b
- [eslint-plugin-filenames](https://www.npmjs.com/package/eslint-plugin-filenames) 0.2.0
- [Node.js](https://github.com/nodejs/node/tree/a84bf2ce68a1ffd5c09c9ff297a56814cd79923f) a84bf2ce68a1ffd5c09c9ff297a56814cd79923f

## And A Special Thanks To

* [Nicholas C. Zakas](https://github.com/nzakas) for all the amazing work on [ESLint](https://github.com/eslint/eslint)
* [Keith Cirkel](https://github.com/keithamus) for painstakingly formatting all of ESLint's rules into JSON in [eslint-config-strict](https://github.com/keithamus/eslint-config-strict)
* [AirBnB](https://github.com/airbnb/javascript) for sharing all of their config in [JavaScript Style Guide](https://github.com/airbnb/javascript)
* [Google](https://google.github.io/styleguide/javascriptguide.xml) for sharing their styleguide
* [ES-Next Compat Table](https://github.com/kangax/compat-table) for the [excellent docs on node features](https://kangax.github.io/compat-table/es6/#node4)

***

## License

[MIT License](http://opensource.org/licenses/MIT)

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