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

handle-callback-err doesn't get arrow function it seems #2823

Closed
mgenev opened this issue Jun 22, 2015 · 6 comments · Fixed by DavidKindler/meteor#3 · May be fixed by iamstoick/javascript#11
Closed

handle-callback-err doesn't get arrow function it seems #2823

mgenev opened this issue Jun 22, 2015 · 6 comments · Fixed by DavidKindler/meteor#3 · May be fixed by iamstoick/javascript#11
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules

Comments

@mgenev
Copy link

mgenev commented Jun 22, 2015

I have this code

            return RSVP.all(replyPromises).then(promiseResult => promiseResult, err => err);

and I get a warning for not meeting the handle-callback-err rule, but in reality i'm handling it with the arrow...

@xjamundx
Copy link
Contributor

Can you give us the exact version of eslint you're using as well as the output?

Thanks!

@mgenev
Copy link
Author

mgenev commented Jun 22, 2015

ESLint: "eslint": "^0.23.0",
Warning: Expected error to be handled. (handle-callback-err)

@gyandeeps gyandeeps added the triage An ESLint team member will look at this issue soon label Jun 22, 2015
@xjamundx
Copy link
Contributor

Here's the simplified version of the problem and it still warns:

let x = err => err;

The ES5 version of that code does not warn.

var x = function(err) { return err; }

@nzakas nzakas added bug ESLint is working incorrectly rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Jun 22, 2015
@nzakas
Copy link
Member

nzakas commented Jun 22, 2015

Yup, looks like a bug.

@xjamundx xjamundx self-assigned this Jun 23, 2015
@xjamundx
Copy link
Contributor

I'll look at this

@nzakas
Copy link
Member

nzakas commented Jun 23, 2015

Thanks!

xjamundx pushed a commit to xjamundx/eslint that referenced this issue Jun 24, 2015
@nzakas nzakas closed this as completed in cb1d64f Jun 25, 2015
nzakas added a commit that referenced this issue Jun 25, 2015
Fix: handle-callback-err missing arrow functions (fixes #2823)
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules
Projects
None yet
4 participants