Skip to content

airtimemedia/eslint-plugin-chai-expect

 
 

Repository files navigation

eslint-plugin-chai-expect

Build Status

ESLint plugin that checks for common chai.js expect() mistakes

Installation

npm install eslint-plugin-chai-expect

Configuration

Add a plugins section and specify chai-expect as a plugin:

{
  "plugins": [
    "chai-expect"
  ]
}

Enable the rules that you would like to use:

{
  "rules": {
    "chai-expect/missing-assertion": 2,
    "chai-expect/terminating-properties": 1
  }
}

Rules

  • no-inner-compare - Prevent using comparisons in the expect() argument
  • missing-assertion - Prevent calling expect(...) without an assertion like .to.be.ok
  • terminating-properties - Prevent calling to.be.ok and other assertion properties as functions
  • no-invalid-terminating-properties - Prevent using invalid terminating properties such as to.be.falsy or to.be.truthy

License

eslint-plugin-chai-expect is licensed under the MIT License.

About

ESLint plugin that checks for common chai.js expect() mistakes

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%