Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove prefer-arrow-function error in test environment with mocha #18

Open
rewop opened this issue Mar 20, 2016 · 1 comment
Open

Remove prefer-arrow-function error in test environment with mocha #18

rewop opened this issue Mar 20, 2016 · 1 comment

Comments

@rewop
Copy link

rewop commented Mar 20, 2016

Reading mocha documentation, they say to avoid the arrow function notation when defining tests because it breaks the context of mocha.

In the best scenario, we should be able to show an error when arrow function is used in such scenario.

@tkers
Copy link
Member

tkers commented Mar 21, 2016

If you look at the documentation of Mocha, you'll see that the lexical context is rarely needed to do something (I'm actually pretty sure that we have never used it before).

Whenever you try to use this in the a fat arrow function, ESLint will show an error about this anyway, so I don't really see the benefit of disallowing them altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants