ESLint rule for .only blocks in mocha tests
Last updated 3 months ago by levibuzolic .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install eslint-plugin-no-only-tests 
SYNC missed versions from official npm registry.


Version Downloads CircleCI

ESLint rule for .only tests in mocha and other JS testing libraries.

Currently matches the following test blocks: describe, it, context, tape, test

Designed to prevent you from committing .only tests to git, disabling tests for your whole team.


First you'll need to install ESLint and the plugin:

npm install --save-dev eslint eslint-plugin-no-only-tests
# OR
yarn add --dev eslint eslint-plugin-no-only-tests

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-no-only-tests globally.


Add no-only-tests to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

  "plugins": [

Then configure the rules you want to use under the rules section.

  "rules": {
    "no-only-tests/no-only-tests": 2
Maintainers (1)
Today 0
This Week 0
This Month 14
Last Day 0
Last Week 6
Last Month 109
Dependencies (0)
Dev Dependencies (1)

Copyright 2014 - 2016 © |