Home

Awesome

eslint-plugin-qunit

NPM version CI Coverage Status Join the chat at https://gitter.im/platinumazure/eslint-plugin-qunit

ESLint plugin containing rules useful for QUnit tests.

Configurations

You can extend from a configuration in order to simplify manual configuration of plugin rules in your project.

For more details on how to extend your configuration from a plugin configuration, please see the ESLint plugin configuration documentation.

NameDescription
βœ…recommendedThis configuration includes rules which I recommend to avoid QUnit runtime errors or incorrect behavior, some of which can be difficult to debug. Some of these rules also encourage best practices that help QUnit work better for you. For ESLint .eslintrc.js legacy config, extend from "plugin:qunit/recommended". For ESLint eslint.config.js flat config, load from require('eslint-plugin-qunit/configs/recommended').

Rules

<!-- begin auto-generated rules list -->

πŸ’Ό Configurations enabled in.
βœ… Set in the recommended configuration.
πŸ”§ Automatically fixable by the --fix CLI option.
πŸ’‘ Manually fixable by editor suggestions.

NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β DescriptionπŸ’ΌπŸ”§πŸ’‘
assert-argsenforce that the correct number of assert arguments are usedβœ…
literal-compare-orderenforce comparison assertions have arguments in the right orderβœ…πŸ”§
no-arrow-testsdisallow arrow functions as QUnit test/module callbacksπŸ”§
no-assert-equaldisallow the use of assert.equalβœ…πŸ’‘
no-assert-equal-booleanrequire use of boolean assertionsβœ…πŸ”§
no-assert-logical-expressiondisallow binary logical expressions in assert argumentsβœ…
no-assert-okdisallow the use of assert.ok/assert.notOk
no-async-in-loopsdisallow async calls in loopsβœ…
no-async-module-callbacksdisallow async module callbacksβœ…
no-async-testdisallow the use of asyncTest or QUnit.asyncTestβœ…
no-commented-testsdisallow commented testsβœ…
no-compare-relation-booleandisallow comparing relational expressions to booleans in assertionsβœ…πŸ”§
no-conditional-assertionsdisallow assertions within if statements or conditional expressionsβœ…
no-early-returndisallow early return in testsβœ…
no-global-assertionsdisallow global QUnit assertionsβœ…
no-global-expectdisallow global expectβœ…
no-global-module-testdisallow global module/test/asyncTestβœ…
no-global-stop-startdisallow global stop/startβœ…
no-hooks-from-ancestor-modulesdisallow the use of hooks from ancestor modulesβœ…
no-identical-namesdisallow identical test and module namesβœ…
no-initdisallow use of QUnit.initβœ…
no-jsdumpdisallow use of QUnit.jsDumpβœ…
no-loose-assertionsdisallow the use of assert.equal/assert.ok/assert.notEqual/assert.notOk
no-negated-okdisallow negation in assert.ok/assert.notOkβœ…πŸ”§
no-nested-testsdisallow nested QUnit.test() callsβœ…
no-ok-equalitydisallow equality comparisons in assert.ok/assert.notOkβœ…πŸ”§
no-onlydisallow QUnit.onlyβœ…
no-qunit-pushdisallow QUnit.pushβœ…
no-qunit-start-in-testsdisallow QUnit.start() within tests or test hooksβœ…
no-qunit-stopdisallow QUnit.stopβœ…
no-reassign-log-callbacksdisallow overwriting of QUnit logging callbacksβœ…
no-resetdisallow QUnit.resetβœ…
no-setup-teardowndisallow setup/teardown module hooksβœ…πŸ”§
no-skipdisallow QUnit.skip
no-test-expect-argumentdisallow the expect argument in QUnit.testβœ…
no-throws-stringdisallow assert.throws() with block, string, and message argsβœ…
require-expectenforce that expect is calledβœ…
require-object-in-propequalenforce use of objects as expected value in assert.propEqualβœ…
resolve-asyncrequire that async calls are resolvedβœ…
<!-- end auto-generated rules list -->

Contributors

Thanks goes to these wonderful people (emoji key):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tr> <td align="center"><a href="https://github.com/platinumazure"><img src="https://avatars.githubusercontent.com/u/284282?v=3?s=100" width="100px;" alt=""/><br /><sub><b>Kevin Partington</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=platinumazure" title="Code">πŸ’»</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=platinumazure" title="Documentation">πŸ“–</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=platinumazure" title="Tests">⚠️</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/issues?q=author%3Aplatinumazure" title="Bug reports">πŸ›</a> <a href="#example-platinumazure" title="Examples">πŸ’‘</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/pulls?q=is%3Apr+reviewed-by%3Aplatinumazure" title="Reviewed Pull Requests">πŸ‘€</a></td> <td align="center"><a href="https://jordaneldredge.com"><img src="https://avatars.githubusercontent.com/u/162735?v=3?s=100" width="100px;" alt=""/><br /><sub><b>Jordan Eldredge</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=captbaritone" title="Tests">⚠️</a> <a href="#question-captbaritone" title="Answering Questions">πŸ’¬</a></td> <td align="center"><a href="https://github.com/mitchlloyd"><img src="https://avatars.githubusercontent.com/u/15169?v=3?s=100" width="100px;" alt=""/><br /><sub><b>Mitch Lloyd</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=mitchlloyd" title="Code">πŸ’»</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=mitchlloyd" title="Documentation">πŸ“–</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=mitchlloyd" title="Tests">⚠️</a></td> <td align="center"><a href="https://github.com/jmainz"><img src="https://avatars.githubusercontent.com/u/6665906?v=3?s=100" width="100px;" alt=""/><br /><sub><b>John Mainz</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=jmainz" title="Tests">⚠️</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/issues?q=author%3Ajmainz" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/Turbo87"><img src="https://avatars1.githubusercontent.com/u/141300?v=3?s=100" width="100px;" alt=""/><br /><sub><b>Tobias Bieniek</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=Turbo87" title="Code">πŸ’»</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=Turbo87" title="Documentation">πŸ“–</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=Turbo87" title="Tests">⚠️</a></td> <td align="center"><a href="https://twitter.com/netweb"><img src="https://avatars1.githubusercontent.com/u/1016458?v=3?s=100" width="100px;" alt=""/><br /><sub><b>Stephen Edgar</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/issues?q=author%3Antwb" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://timotijhof.net"><img src="https://avatars3.githubusercontent.com/u/156867?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Timo Tijhof</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=Krinkle" title="Documentation">πŸ“–</a> <a href="#ideas-Krinkle" title="Ideas, Planning, & Feedback">πŸ€”</a></td> </tr> <tr> <td align="center"><a href="https://github.com/edg2s"><img src="https://avatars3.githubusercontent.com/u/180672?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ed S</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/issues?q=author%3Aedg2s" title="Bug reports">πŸ›</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=edg2s" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/Techn1x"><img src="https://avatars1.githubusercontent.com/u/1049837?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Brad Overton</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/issues?q=author%3ATechn1x" title="Bug reports">πŸ›</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=Techn1x" title="Code">πŸ’»</a></td> <td align="center"><a href="https://sha.nemart.in"><img src="https://avatars3.githubusercontent.com/u/95600?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Shane Martin</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/issues?q=author%3Ashamrt" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/ventuno"><img src="https://avatars3.githubusercontent.com/u/5890858?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ventuno</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=ventuno" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/Krysthalia"><img src="https://avatars0.githubusercontent.com/u/38167520?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anne-GaΓ«lle Schall</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/issues?q=author%3AKrysthalia" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://www.linkedin.com"><img src="https://avatars2.githubusercontent.com/u/180990?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Steve Calvert</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=scalvert" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/aliaksandr-yermalayeu"><img src="https://avatars3.githubusercontent.com/u/14282348?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aliaksandr Yermalayeu</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=aliaksandr-yermalayeu" title="Code">πŸ’»</a></td> </tr> <tr> <td align="center"><a href="https://www.linkedin.com/in/bmish"><img src="https://avatars3.githubusercontent.com/u/698306?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bryan Mishkin</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/issues?q=author%3Abmish" title="Bug reports">πŸ›</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=bmish" title="Code">πŸ’»</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=bmish" title="Documentation">πŸ“–</a> <a href="#ideas-bmish" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://xhmikosr.io/"><img src="https://avatars2.githubusercontent.com/u/349621?v=4?s=100" width="100px;" alt=""/><br /><sub><b>XhmikosR</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/issues?q=author%3AXhmikosR" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/andreyfel"><img src="https://avatars2.githubusercontent.com/u/9370878?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrey Fel</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/issues?q=author%3Aandreyfel" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/raycohen"><img src="https://avatars.githubusercontent.com/u/20404?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ray Cohen</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/issues?q=author%3Araycohen" title="Bug reports">πŸ›</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=raycohen" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/DBattou"><img src="https://avatars.githubusercontent.com/u/16645938?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Baptiste Doucerain</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=DBattou" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/ddzz"><img src="https://avatars.githubusercontent.com/u/3535749?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Darius Dzien</b></sub></a><br /><a href="#maintenance-ddzz" title="Maintenance">🚧</a></td> <td align="center"><a href="https://github.com/dwickern"><img src="https://avatars.githubusercontent.com/u/752885?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Derek Wickern</b></sub></a><br /><a href="https://github.com/platinumazure/eslint-plugin-qunit/issues?q=author%3Adwickern" title="Bug reports">πŸ›</a> <a href="https://github.com/platinumazure/eslint-plugin-qunit/commits?author=dwickern" title="Code">πŸ’»</a></td> </tr> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END --> <!-- markdownlint-disable line-length -->

This project follows the all-contributors specification. Contributions of any kind welcome!

Semantic Versioning Policy

Like ESLint itself, this ESLint plugin follows semantic versioning. However, due to the nature of ESLint as a code quality tool, it's not always clear when a minor or major version bump occurs. To help clarify this for everyone, we've defined the following semantic versioning policy, based on the policy used by ESLint: