Skip to content

Commit

Permalink
Merge pull request #9 from brettz9/recommended
Browse files Browse the repository at this point in the history
Recommended
  • Loading branch information
ihordiachenko committed Oct 27, 2019
2 parents cdf1699 + 1b9e14b commit 5f320f3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ npm install eslint-plugin-chai-friendly --save-dev

## Usage

Add `chai-friendly` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
Add `chai-friendly` to the plugins section of your `.eslintrc.*` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
Expand All @@ -54,6 +54,16 @@ Then disable original `no-unused-expressions` rule and configure chai-friendly r
}
```

If you don't need to tweak the above rule settings, you can instead
just add the following to your config file's `extends` and the above
will be applied automatically:

```json
{
"extends": ["plugin:chai-friendly/recommended"]
}
```

## Options

This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:
Expand All @@ -68,4 +78,4 @@ More info in the original rule's [docs](http://eslint.org/docs/rules/no-unused-e

## Supported Rules

- chai-friendly/no-unused-expressions
- `chai-friendly/no-unused-expressions`
9 changes: 9 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
"use strict";

module.exports = {
configs: {
recommended: {
plugins: ['chai-friendly'],
rules: {
'chai-friendly/no-unused-expressions': 'error',
'no-unused-expressions': 'off'
}
}
},
rules: {
'no-unused-expressions': require('./rules/no-unused-expressions')
}
Expand Down

0 comments on commit 5f320f3

Please sign in to comment.