Skip to content
PluginStats

eslint-plugin-mocha weekly downloads statistics

By lo1tuma · npm · ESLint plugins

Eslint rules for mocha.

View on npm Fresh · Dec 6, 2026

eslint-plugin-mocha has 1,969,652 recorded weekly downloads on npm, a decrease of 6.6% over the past 30 days, ranking #230 of 3,247 tracked listings.

Weekly downloads
1,969,652
Official API · Dec 5, 2026
7-day growth
+19.5%
+321.7K weekly downloads
30-day growth
-6.6%
-140.1K weekly downloads
90-day growth
+19.7%
+324.3K weekly downloads
Rank
#230
▲ 2 in 7 days

About eslint-plugin-mocha

NPM Version GitHub Actions status Coverage Status NPM Downloads

eslint-plugin-mocha

ESLint rules for Mocha.

This plugin targets Mocha's current JavaScript interfaces documented for Mocha 11. It does not execute Mocha or require Mocha at runtime.

Install

This plugin requires ESLint 10.2.0 or later.

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

Configure

Use the plugin with ESLint's flat config. Apply it only to Mocha test files, and adjust files to match your project:

import mochaPlugin from 'eslint-plugin-mocha';

export default [
    {
        files: [ 'test/**/*.js' ],
        ...mochaPlugin.configs.recommended
    }
];

Configs

  • mochaPlugin.configs.recommended: Practical defaults for most projects.
  • mochaPlugin.configs.all: Enables every rule. This config may change when new rules are added, so it is better suited for trying the full rule set than for stable long-term lint output.
import mochaPlugin from 'eslint-plugin-mocha';

export default [
    {
        files: [ 'test/**/*.js' ],
        ...mochaPlugin.configs.all
    }
];

Plugin settings

These settings are shared by multiple rules.

  • additionalCustomNames: Adds custom suite, test, or hook function names. This is useful for Mocha wrappers such as ember-mocha, mocha-each, or project-specific helpers that wrap setup and teardown. Use interface: "require" for wrappers that expose named imports from a helper module instead of importing directly from mocha.
{
    "rules": {
        "mocha/no-pending-tests": "error",
        "mocha/no-exclusive-tests": "error"
    },
    "settings": {
        "mocha/additionalCustomNames": [
            {
                "name": "describeModule",
                "type": "suite",
                "interface": "BDD"
            },
            {
                "name": "testModule",
                "type": "testCase",
                "interface": "TDD"
            },
            {
                "name": "prepareTestContexts",
                "type": "hook",
                "interface": "BDD"
            }
        ]
    }
}

The name field supports these forms:

  • Plain name, such as describeModule:
describeModule('example', function () {});
  • Dotted name, such as describe.modifier:
describe.modifier('example', function () {});
  • Name with parentheses, such as forEach().describe:
forEach([ 1, 2, 3 ]).describe('example', function (n) {});
  • Combination, such as forEach().describeModule.modifier:
forEach([ 1, 2, 3 ]).describeModule.modifier('example', function (n) {});
  • type: Selects suite, testCase, or hook.
  • interface: Selects BDD, TDD, or require. The default is BDD. With require, rule resolution uses named import statements instead of globals. mocha/consistent-interface also reports named imports of Mocha interface methods when this setting is BDD or TDD, which helps catch accidental require-style usage and interface misconfiguration earlier.

The plugin supports Mocha's BDD, TDD, and Require interfaces. It does not support Mocha's Exports or QUnit interfaces, or third-party UIs with different syntax. Many rules depend on suite, test, and hook calls being represented as nested call expressions, which those interfaces do not provide consistently.

For wrapper APIs that still expose suite, test, or hook call functions, use additionalCustomNames.

Rules

For maintainers: the rules table below is generated, and the headers in documentation/rules/*.md are partly generated. Refresh them with npx just update-eslint-docs. Run mutation testing with npx just test-mutation.

<!-- dprint-ignore-start --> <!-- begin auto-generated rules list -->

💼 Configurations enabled in.
⚠️ Configurations set to warn in.
🚫 Configurations disabled in.
✅ Set in the recommended configuration.
🔧 Automatically fixable by the --fix CLI option.
💡 Manually fixable by editor suggestions.…

Description from the npm listing.

  • eslint
  • eslintplugin
  • eslint-plugin
  • mocha

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

eslint-plugin-mocha weekly downloads on npm, last 90 days: 1,969,652 weekly downloads as of Dec 5, 2026, +19.7% over 90 days.eslint-plugin-mochaWeekly downloads on npm · Last 90 days1,969,652downloads / week+19.7% over 90 days0500K1M1.5M2M2.5MSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
eslint-plugin-mocha weekly downloads on npm, last 90 days: 1,969,652 weekly downloads as of Dec 5, 2026, +19.7% over 90 days.

7/30/90-day growth

eslint-plugin-mocha weekly downloads growth on npm: +19.5% over 7 days, -6.6% over 30 days, +19.7% over 90 days.eslint-plugin-mochaWeekly downloads growth on npm1,969,652downloads / week now7-day growth+321,650 weekly downloads+19.5%30-day growth-140,113 weekly downloads-6.6%90-day growth+324,255 weekly downloads+19.7%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
eslint-plugin-mocha weekly downloads growth on npm: +19.5% over 7 days, -6.6% over 30 days, +19.7% over 90 days.

Ranking history

eslint-plugin-mocha npm ranking history: currently #230 (by weekly downloads).eslint-plugin-mochanpm ranking · by weekly downloads · Last 90 days#230current rank#60#80#100#120#140#160#180#200#220#240Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
eslint-plugin-mocha npm ranking history: currently #230 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 12, #10 (overall #230)
All npm: every listing in weekly downloads order

Listing placement

ESLint plugins290 listings · 15 pages · page 3, #10 (overall #50)
ESLint plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (592)
Recent weekly downloads observations for eslint-plugin-mocha
Date (UTC)Weekly downloadsChange vs. previous
1,969,652+51.2K
1,918,444+120.1K
1,798,301+70.5K
1,727,819+74.8K
1,652,980+23.8K
1,629,138-12.4K
1,641,493-6.5K
1,648,002-22K
1,669,988-83.9K
1,753,852-78.3K
1,832,140-46.3K
1,878,480-10.5K
1,888,985+9.4K
1,879,545—

Similar npm ESLint plugins plugins

All 20 eslint-plugin-mocha alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/eslint-plugin-mocha. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.