Registry / testing / eslint-plugin-qunit

eslint-plugin-qunit

JSON →
library8.2.6jsnpmunverified

ESLint plugin with rules specific to QUnit testing framework. Current stable version is 8.2.6, released February 2026. The plugin provides 20+ rules including recommended configurations for catching common QUnit mistakes (e.g., assert argument order, async handling, global usage). Actively maintained, supporting ESLint 8 and 9 with flat config support since v8.1.0. Ships TypeScript types since v8.2.0. Compared to generic linting, it catches QUnit-specific runtime errors and anti-patterns. Peer dependency on eslint >=8.38.0.

npm install eslint-plugin-qunit
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-QUNI
E
eslint-plugin-qunit
testingjavascriptv8.2.6
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

configs.recommended
import eslintPluginQunitRecommended from 'eslint-plugin-qunit/configs/recommended';
const recommended = require('eslint-plugin-qunit/configs/recommended');
ESM import is the standard for flat config; require is still supported but less common.
plugin
import plugin from 'eslint-plugin-qunit';
const { rules } = require('eslint-plugin-qunit');
Default import gives full plugin object; named destructuring of rules is not exported directly.
rules
import { rules } from 'eslint-plugin-qunit/rules';
Available for custom rule configuration, but less common; use plugin.rules instead.

Set up ESLint with QUnit plugin flat config and custom rule overrides.

// eslint.config.js (flat config) import js from '@eslint/js'; import qunitPlugin from 'eslint-plugin-qunit'; import qunitRecommended from 'eslint-plugin-qunit/configs/recommended'; export default [ js.configs.recommended, qunitRecommended, { plugins: { qunit: qunitPlugin, }, rules: { 'qunit/no-arrow-tests': 'error', 'qunit/no-async-in-loops': 'warn', }, }, ];
Debug
Known issues
breakingESLint v9 no longer supports .eslintrc config style; must use flat config.
fix
Migrate to eslint.config.js using import syntax; see QUnit plugin v8.1.0 release notes.
affects: >=8.0.0
gotchaSetting 'qunit/assert-args' to error will flag missing or extra arguments in assertions, which may break existing test suites with intentionally loose calls.
fix
Review test code and fix assertion arguments to match QUnit's expected interface, or adjust rule severity.
affects: >=0.0.0
gotchaRecommended config includes 'no-assert-equal' which disallows assert.equal/assert.strictEqual; use assert.deepEqual or assert.propEqual instead.
fix
Replace assert.equal with assert.deepEqual or assert.propEqual for deep comparison, or assert.strictEqual for strict equality (if strict equality is intended).
affects: >=4.0.0
deprecatedThe 'qunit/no-commented-tests' rule is deprecated and will be removed in a future version.
fix
Use 'no-commented-tests' from eslint-plugin-qunit at your own risk; consider custom ESLint disable comments instead.
affects: >=8.0.0
breakingFlat config requires importing plugin configs directly, not via 'plugin:qunit/recommended' string.
fix
Use import statement as shown in quickstart; see v8.1.0 migration notes.
affects: >=8.1.0
Errors
Common errors & fixes
Error: Failed to load plugin 'qunit': Cannot find module 'eslint-plugin-qunit'
ESLint cannot locate the package; not installed or not in node_modules.
fix
Run npm install eslint-plugin-qunit --save-dev in your project root.
Parsing error: 'import' and 'export' may only appear at the top level
Using ESM import syntax in .eslintrc.js file without enabling sourceType.
fix
Set 'sourceType': 'module' in parserOptions, or rename to eslint.config.js.
Configuration for rule 'qunit/no-assert-equal' is invalid: severity should be one of ...
Rule configuration is malformed, e.g., severity level as string instead of number.
fix
Set severity as number: 'qunit/no-assert-equal': 2 (error) or 'error'.
Upgrade
Version history
8.2.6latest on npm
Audit
Dependencies
eslintrequiredPeer dependency; required for the plugin to function
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-qunit — npm install eslint-plugin-qunit · libregistry