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

func-names causes visual clutter inside editors #12022

Closed
xsrvmy opened this issue Jul 25, 2019 · 6 comments · Fixed by #12028, thinkwee/thinkwee.github.io#7, geo6/manager#42, geo6/mapper#61 or thinkwee/thinkwee.github.io#10
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 enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules

Comments

@xsrvmy
Copy link

xsrvmy commented Jul 25, 2019

The func-names rule flags the entire function instead of just the declaration, causing visual clutter in editors such as VSCode.

What rule do you want to change?
func-names

Does this change cause the rule to produce more or fewer warnings?
No

How will the change be implemented? (New option, new default behavior, etc.)?
Either new option, or change current behaviour.

Please provide some example code that this change will affect:

const x = function () {
  return 100;
}

What does the rule currently do for this code?
Highlights the entire function declaration as a warning.

What will the rule do after it's changed?
Highlight only function () .

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

@xsrvmy xsrvmy added enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules triage An ESLint team member will look at this issue soon labels Jul 25, 2019
@platinumazure platinumazure added evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Jul 25, 2019
@platinumazure
Copy link
Member

Hi @xsrvmy, thanks for the issue.

I think this is a great idea. I will champion this change.

@platinumazure platinumazure self-assigned this Jul 25, 2019
@kaicataldo
Copy link
Member

kaicataldo commented Jul 26, 2019

One thing we should account for when we actually implement this is the potential for return types (I think they should be highlighted as well).

@mysticatea
Copy link
Member

For reference, we have a utility, getFunctionHeadLoc().

@g-plane g-plane added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Jul 26, 2019
@g-plane
Copy link
Member

g-plane commented Jul 26, 2019

I think there's no need to add a new option.

@platinumazure
Copy link
Member

Since I both championed and 👍'd this issue, I think we need one more team member in order to accept. (I have removed my 👍 to reduce confusion.)

@eslint/eslint-team Could we get one more 👍 for this issue? This is just to adjust the reporting range for editor integrations.

@platinumazure platinumazure added evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed accepted There is consensus among the team that this change meets the criteria for inclusion labels Jul 27, 2019
@aladdin-add aladdin-add added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Jul 27, 2019
@aladdin-add
Copy link
Member

here is the 3rd 👍 , labelled accepted.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jan 28, 2020
@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 Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.