npm package: @sul/eslint-config
Description: ESLint configuration for SUL projects
Author: Stiff Upper Lip LLC | Andrew Smith
Latest version: 1.0.0

# SUL ESLint
ESLint configuration for SUL projects.

## Usage:

First install the rules:

```sh
npm install --save-dev eslint @sul/eslint-config
```

Then extend in your `.eslintrc`:

```javascript
{
  "extends": "@sul/eslint-config",
  "rules": {
    // overrides
  }
}
```
### Configuration Customization

The default configuration is composed of several sub-configuration modules and can be used individually to customize your build:

* `possible-errors.js`
* `best-practices.js`
* `stylistic.js`
* `es6/index.js`
* `import/index.js`

The `es6` and `import` configurations each have their own sub-configuration modules to futher customize your build.

#### Customization Example:

```javascript
{
  "extends": [
    "@sul/eslint-config/possible-errors",
    "@sul/eslint-config/best-practices",
    "@sul/eslint-config/es6/possible-errors",
    "@sul/eslint-config/import",
  ],
  "rules": { /* custom rules */ }
}
```

### Extended Configuration

This package also exposes a number of extended configurations for additional packages or modules. Pull in these configurations as needed.

Standalone:

```javascript
{
  "extends": "@sul/eslint-config/<config-name>"
}
```

Or in combination with the base configuration (recommended).

```javascript
{
  "extends": [
    "@sul/eslint-config",
    "@sul/eslint-config/<config-name>"
  ]
}
```

The following are available as extended configurations:

* `jest`: [jest](http://facebook.github.io/jest/) testing framework
* `jsx-a11y`: [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y) for rules regarding accessibility with JSX (_eslint-plugin-jsx-a11y_)
* `react`: [React](https://www.npmjs.com/package/react) JS library (_eslint-plugin-react_)
* `webpack`: [Webpack](https://npmjs.com/package/webpack) for the import plugin to work with webpack overloaded imports/requires (_eslint-plugin-import_ and _eslint-import-resolver-webpack_)

**Note:** Sometimes you need to have the associated plugins
installed to make things work. We recommend adding them as dependencies to your project
if you're going to use the config for it.

## Validate

To validate that all rules are being used:

```sh
npm run validate
```

## Contributing
Please read [CONTRIBUTING.md](https://github.com/sulweb/sul-cli/blob/master/CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/sulweb/sul-cli/tags).

Please read [CHANGELOG.md](https://github.com/sulweb/sul-cli/blob/master/CHANGELOG.md) for detailed changes to this project.

## Authors

* **Andrew Smith** - *Initial work* - [Stiff Upper Lip](https://github.com/sulweb)

## License

This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/sulweb/sul-cli/blob/master/LICENSE.md) file for details.

## Acknowledgements

This package is heavily inspired by (and mostly stolen from) [Kent C. Dodds](https://github.com/kentcdodds).