Configure eslint to be more friendly to chai assertions

This commit is contained in:
Alasdair Smith 2018-02-28 11:45:30 +00:00
parent 45e7482335
commit 6f58c60026

View file

@ -1,9 +1,21 @@
{ {
"extends": ["standard"], "extends": ["standard"],
"plugins": [
"chai-expect",
"chai-friendly"
],
"env": { "env": {
"mocha": true "mocha": true
}, },
"globals": { "globals": {
"expect": true "expect": true
},
"rules": {
// Add some chai specific rules
"chai-expect/missing-assertion": "error",
"chai-expect/terminating-properties": "error",
// Swap the no-unused-expressions rule with a more chai-friendly one
"no-unused-expressions": 0,
"chai-friendly/no-unused-expressions": "error"
} }
} }