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

Improve the report location of `arrow-paren` #11773

Closed
golopot opened this issue May 26, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@golopot
Copy link
Contributor

commented May 26, 2019

What rule do you want to change?
arrow-paren

Currently the reported node is the whole function. It makes sense to change the reported node to the parameter node.

/* eslint arrow-parens: [2] */

// current report location
const f = a => a + a + a;
//        ~~~~~~~~~~~~~~ Error: needs parens.

// proposed report location
const f = a => a + a + a;
//        ~              Error: needs parens.

demo link

Are you willing to submit a pull request to implement this change?
yes

@not-an-aardvark

This comment has been minimized.

Copy link
Member

commented May 26, 2019

Thanks for the proposal. This seems like a worthwhile change to me.

@not-an-aardvark not-an-aardvark added evaluating and removed triage labels May 26, 2019

@platinumazure

This comment has been minimized.

Copy link
Member

commented May 27, 2019

I agree this should be done. I'll champion this change.

@eslint/eslint-team This needs one more 👍 to be accepted.

@platinumazure platinumazure self-assigned this May 27, 2019

@not-an-aardvark not-an-aardvark added accepted and removed evaluating labels May 27, 2019

@not-an-aardvark

This comment has been minimized.

Copy link
Member

commented May 27, 2019

This is now accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.