JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 116803
  • Score
    100M100P100Q175103F
  • License MIT

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

Package Exports

  • eslint-plugin-chai-expect

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-plugin-chai-expect) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

License

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