Feature request: Extend eslint-plugin-mocha
alessio-libardi opened this issue · comments
Hello everyone, especially when setting up a new project it's kind of cumbersome to not have many rules such as the no-exclusive-tests
that are vital to simplify the contribution process.
What about extending the plugin using the mocha rules that make sense also for cypress? After all the test structure is the same.
Thanks for this awesome plugin, if you think this change make sense I can open a PR 🙌
Found this issue when encountering a similar situation as @alessio-libardi. There are some rules in eslint-plugin-mocha
that work great however it is mostly centered around bare mocha
usage and not the extended version that cypress includes which allows for options to be passed to the blocks (which eslint-plugin-mocha
erroneously flags on if you try to use/do anything remotely complex with like describe('this is a desc, { tags: [Tag.smoke]}, () => { ...
which produces a mocha/no-setup-in-describe
error, where Tag.smoke
is a static property of a class used as an enum-like value).
The setup for combining the rules from eslint-plugin-mocha with the Cypress rules is now described in the README documentation under Mocha .only
and .skip
so I suggest to close this enhancement request.