coffeelint-no-chai-getters

0.0.8 • Public • Published

coffeelint-no-chai-getters

Coffeelint rule that detects code using a chai getter without function invocation. This is useful for codebases moving off the chai matcher getter syntax, and using dirty-chai.

Eg:

expect(someDopeSpy).ok

This is dangerous, as if it's spelled incorrectly it will fail silently. This is why we prefer the function invocation syntax provided by dirty-chai https://www.npmjs.com/package/dirty-chai

The only problem with dirty-chai is that now the getter syntax will fail silently. So, this linter aims to warn against the use of the old getter syntax.

Installation

Add the following to your package.json file:

"devDependencies" : {
    ...
    "coffeelint-no-chai-getters": "git://github.com/benchling/coffeelint-no-chai-getters.git#master",
    ...
}

Usage

Add the following configuration to coffeelint.json:

"no_chai_getters"{
    "module": "coffeelint-no-chai-getters",
    "level": "error",
},

Configuration

There are currently no configuration options.

Package Sidebar

Install

npm i coffeelint-no-chai-getters

Weekly Downloads

0

Version

0.0.8

License

MIT

Last publish

Collaborators

  • robertsami