GithubHelp home page GithubHelp logo

procore / eslint-plugin-chai-expect Goto Github PK

View Code? Open in Web Editor NEW

This project forked from turbo87/eslint-plugin-chai-expect

0.0 28.0 0.0 23 KB

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

License: MIT License

JavaScript 100.00%

eslint-plugin-chai-expect's Introduction

To NPM Install This Do The Following: http://blog.ilovacha.com/2014/01/17/fork-and-patch-npm-moduels-hosted-on-github/

Go to fork's page

Go to commits

On the right side of the commit you want to use click "Browse code"

On the browse code page right-click on "Download ZIP" button (or whatever it is that you are seeing) and copy the URL. It should be something like this https://github.com/SoftwareMarbles/express-jsend/archive/fdd4089087d916fa6e3b5abaa1ff9dd9ea96df8d.zip.

Edit that URL replacing archive with tarball and removing the .zip extension. You should end up with something like https://github.com/SoftwareMarbles/express-jsend/tarball/fdd4089087d916fa6e3b5abaa1ff9dd9ea96df8d.

Paste that into your package.json instead of the version. Like this: "express-jsend": "https://github.com/SoftwareMarbles/express-jsend/tarball/fdd4089087d916fa6e3b5abaa1ff9dd9ea96df8d"

And that's it - npm install works as it should and installs the module from the link.

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.

eslint-plugin-chai-expect's People

Contributors

clickthisnick avatar greenkeeperio-bot avatar turbo87 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.