{"id":19886,"library":"eslint-plugin-qunit","title":"eslint-plugin-qunit","description":"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.","status":"active","version":"8.2.6","language":"javascript","source_language":"en","source_url":"https://github.com/platinumazure/eslint-plugin-qunit","tags":["javascript","eslint","eslintplugin","eslint-plugin","typescript"],"install":[{"cmd":"npm install eslint-plugin-qunit","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-qunit","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-qunit","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; required for the plugin to function","package":"eslint","optional":false}],"imports":[{"note":"ESM import is the standard for flat config; require is still supported but less common.","wrong":"const recommended = require('eslint-plugin-qunit/configs/recommended');","symbol":"configs.recommended","correct":"import eslintPluginQunitRecommended from 'eslint-plugin-qunit/configs/recommended';"},{"note":"Default import gives full plugin object; named destructuring of rules is not exported directly.","wrong":"const { rules } = require('eslint-plugin-qunit');","symbol":"plugin","correct":"import plugin from 'eslint-plugin-qunit';"},{"note":"Available for custom rule configuration, but less common; use plugin.rules instead.","symbol":"rules","correct":"import { rules } from 'eslint-plugin-qunit/rules';"}],"quickstart":{"code":"// eslint.config.js (flat config)\nimport js from '@eslint/js';\nimport qunitPlugin from 'eslint-plugin-qunit';\nimport qunitRecommended from 'eslint-plugin-qunit/configs/recommended';\n\nexport default [\n  js.configs.recommended,\n  qunitRecommended,\n  {\n    plugins: {\n      qunit: qunitPlugin,\n    },\n    rules: {\n      'qunit/no-arrow-tests': 'error',\n      'qunit/no-async-in-loops': 'warn',\n    },\n  },\n];","lang":"javascript","description":"Set up ESLint with QUnit plugin flat config and custom rule overrides."},"warnings":[{"fix":"Migrate to eslint.config.js using import syntax; see QUnit plugin v8.1.0 release notes.","message":"ESLint v9 no longer supports .eslintrc config style; must use flat config.","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"Review test code and fix assertion arguments to match QUnit's expected interface, or adjust rule severity.","message":"Setting 'qunit/assert-args' to error will flag missing or extra arguments in assertions, which may break existing test suites with intentionally loose calls.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Replace assert.equal with assert.deepEqual or assert.propEqual for deep comparison, or assert.strictEqual for strict equality (if strict equality is intended).","message":"Recommended config includes 'no-assert-equal' which disallows assert.equal/assert.strictEqual; use assert.deepEqual or assert.propEqual instead.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Use 'no-commented-tests' from eslint-plugin-qunit at your own risk; consider custom ESLint disable comments instead.","message":"The 'qunit/no-commented-tests' rule is deprecated and will be removed in a future version.","severity":"deprecated","affected_versions":">=8.0.0"},{"fix":"Use import statement as shown in quickstart; see v8.1.0 migration notes.","message":"Flat config requires importing plugin configs directly, not via 'plugin:qunit/recommended' string.","severity":"breaking","affected_versions":">=8.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install eslint-plugin-qunit --save-dev in your project root.","cause":"ESLint cannot locate the package; not installed or not in node_modules.","error":"Error: Failed to load plugin 'qunit': Cannot find module 'eslint-plugin-qunit'"},{"fix":"Set 'sourceType': 'module' in parserOptions, or rename to eslint.config.js.","cause":"Using ESM import syntax in .eslintrc.js file without enabling sourceType.","error":"Parsing error: 'import' and 'export' may only appear at the top level"},{"fix":"Set severity as number: 'qunit/no-assert-equal': 2 (error) or 'error'.","cause":"Rule configuration is malformed, e.g., severity level as string instead of number.","error":"Configuration for rule 'qunit/no-assert-equal' is invalid: severity should be one of ..."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}