Skip to content

Commit

Permalink
Enhancement: Add "recommended" config which auto-adds plugins and a…
Browse files Browse the repository at this point in the history
…ll current rules (one as a warning)
  • Loading branch information
brettz9 committed Oct 24, 2019
1 parent 8681162 commit c70d8a7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ Enable the rules that you would like to use:
}
```

Or, if you just want the above defaults, you can avoid all of the above
and just extend the config:

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

## Rules

Expand Down
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
'use strict';

module.exports = {
configs: {
recommended: {
plugins: ['chai-expect'],
rules: {
'chai-expect/no-inner-compare': 'warn',
'chai-expect/missing-assertion': 'error',
'chai-expect/terminating-properties': 'error'
}
}
},
rules: {
'no-inner-compare': require('./lib/rules/no-inner-compare'),
'missing-assertion': require('./lib/rules/missing-assertion'),
Expand Down

0 comments on commit c70d8a7

Please sign in to comment.