Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including eslint-plugin-mocha with all npm packages installed. Try it out:

require("eslint/package.json"); // eslint is a peer dependency. var eslintPluginMocha = require("eslint-plugin-mocha")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

eslint-plugin-mocha v6.2.2

Eslint rules for mocha.

NPM Version Build Status Coverage Status Peer Dependencies NPM Downloads

eslint-plugin-mocha

ESLint rules for mocha.

Install and configure

This plugin requires ESLint 4.0.0 or later.

npm install --save-dev eslint-plugin-mocha

Then add a reference to this plugin and selected rules in your eslint config:

{
  "plugins": [
    "mocha"
  ],
}

Recommended config

This plugin exports a recommended config that enforces good practices.

Enable it with the extends option:

{
  "extends": [
    "plugin:mocha/recommended"
  ],
}

See Configuring Eslint on eslint.org for more info.

Rules documentation

The documentation of the rules can be found here.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free