eslint-plugin-mocha
Eslint rules for mocha.
Last updated 4 years ago by lo1tuma .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-plugin-mocha 
SYNC missed versions from official npm registry.

NPM Version GitHub Actions status Coverage Status 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"
    ]
}

Plugin Settings

This plugin supports the following settings, which are used by multiple rules:

  • additionalCustomNames: This allows rules to check additional function names when looking for suites or test cases. This might be used with a custom Mocha extension, such as ember-mocha Example:
{
    "rules": {
        "mocha/no-skipped-tests": "error",
        "mocha/no-exclusive-tests": "error"
    },
    "settings": {
        "mocha/additionalCustomNames": [
            { "name": "describeModule", "type": "suite", "interfaces": [ "BDD" ] },
            { "name": "testModule", "type": "testCase", "interfaces": [ "TDD" ] }
        ]
    }
}

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.

Current Tags

  • 10.0.3                                ...           latest (4 years ago)

53 Versions

  • 10.0.3                                ...           4 years ago
  • 10.0.2                                ...           4 years ago
  • 10.0.1                                ...           4 years ago
  • 10.0.0                                ...           4 years ago
  • 9.0.0                                ...           5 years ago
  • 8.2.0                                ...           5 years ago
  • 8.1.0                                ...           5 years ago
  • 8.0.0                                ...           6 years ago
  • 7.0.1                                ...           6 years ago
  • 7.0.0                                ...           6 years ago
  • 6.3.0                                ...           6 years ago
  • 6.2.2                                ...           6 years ago
  • 6.2.1                                ...           6 years ago
  • 6.2.0                                ...           6 years ago
  • 6.1.1                                ...           7 years ago
  • 6.1.0                                ...           7 years ago
  • 6.0.0                                ...           7 years ago
  • 5.3.0                                ...           7 years ago
  • 5.2.1                                ...           7 years ago
  • 5.2.0                                ...           8 years ago
  • 5.1.0                                ...           8 years ago
  • 5.0.0                                ...           8 years ago
  • 4.12.1                                ...           8 years ago
  • 4.12.0                                ...           8 years ago
  • 4.11.0                                ...           9 years ago
  • 4.10.1                                ...           9 years ago
  • 4.10.0                                ...           9 years ago
  • 4.9.0                                ...           9 years ago
  • 4.8.0                                ...           9 years ago
  • 4.7.0                                ...           9 years ago
  • 4.6.0                                ...           10 years ago
  • 4.5.1                                ...           10 years ago
  • 4.5.0                                ...           10 years ago
  • 4.4.0                                ...           10 years ago
  • 4.3.0                                ...           10 years ago
  • 4.2.0                                ...           10 years ago
  • 4.1.0                                ...           10 years ago
  • 4.0.0                                ...           10 years ago
  • 3.0.0                                ...           10 years ago
  • 2.2.0                                ...           10 years ago
  • 2.1.0                                ...           10 years ago
  • 2.0.0                                ...           10 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.0                                ...           11 years ago
  • 0.5.1                                ...           11 years ago
  • 0.5.0                                ...           11 years ago
  • 0.4.0                                ...           11 years ago
  • 0.3.0                                ...           11 years ago
  • 0.2.2                                ...           11 years ago
  • 0.2.1                                ...           11 years ago
  • 0.2.0                                ...           12 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 9
Dependencies (2)
Dev Dependencies (12)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |