diff --git a/README.md b/README.md index 193c30b..226d4bc 100755 --- a/README.md +++ b/README.md @@ -43,6 +43,31 @@ Enable the rules that you would like to use: - `terminating-properties` - Prevent calling `to.be.ok` and other assertion properties as functions +### Additional configuration + +#### terminating-properties rule + +A number of extenstions to chai add additional terminating properties. For example [chai-http](https://github.com/chaijs/chai-http) adds: + + - headers + - html + - ip + - json + - redirect + - text + +The terminating-properties rule can be configured to ensure these (or other) additional properties are not used as functions: + +```json +{ + "rules": { + "chai-expect/terminating-properties": ["error", { + "properties": ["headers", "html", "ip", "json", "redirect", "test"] + }] + } +} +``` + ## License eslint-plugin-chai-expect is licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php).