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
  • Loading branch information
brettz9 committed Oct 24, 2019
1 parent ce0b207 commit 43e8d47
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,21 @@ Enable the rules that you would like to use:
```json
{
"rules": {
"chai-expect/no-inner-compare": 2,
"chai-expect/missing-assertion": 2,
"chai-expect/terminating-properties": 1
"chai-expect/terminating-properties": 2
}
}
```

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': 'error',
'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 43e8d47

Please sign in to comment.