Open rhansen opened 3 years ago
https://mochajs.org/#arrow-functions
There is a reason mocha is not using arrow functions. And most likely in a bigger project there are more scenarios where it would be bad practice to use arrow functions. With rules like this I get the feeling people who are writing and using them have forgotten the actual features of the language they are using (or never knew them from the start) and since they cannot think beyond their own 10 lines of code anyways they limit features like that. But take that with a grain of salt, I just came here from a quite non-pleasing migration from TSLint to ESLint, which automatically added this rule and so I ended up with a similar situation like you and I wanted to check if this rule at least has reasonable options (it has not). Obviously there are a lot of reasonable linting rules and even this one may be in some projects but as it is we probably should just drop it ;-)
Mocha's documentation says:
It would be nice if this plugin played nice with Mocha callbacks.
I opened an issue against the
mocha
plugin as well: https://github.com/lo1tuma/eslint-plugin-mocha/issues/275