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 lint errors for event handler functions that don't use the event argument #710

Closed
erikquinn opened this issue Sep 19, 2017 · 3 comments
Assignees
Labels
devops About developer tools

Comments

@erikquinn
Copy link
Member

erikquinn commented Sep 19, 2017

Some event handler functions currently don't use the event itself for anything. Therefore, eslint is showing errors because the argument should either be used or not taken. But in this particular case, it is wise to capture the event just so we know it is available, even though we occasionally may not need it.

Please add individual eslint comments for each of these instances such that cause eslint to ignore them so they are considered legal.

@erikquinn erikquinn added the refactor Code changes that neither fix a defect nor add functionality label Sep 19, 2017
@n8rzz
Copy link
Member

n8rzz commented Sep 19, 2017

Please add individual eslint comments for each of these instances such that cause eslint to ignore them so they are considered legal.

Don't do that. We can use this issue to update our .eslint rules to allow for this.

@n8rzz n8rzz added devops About developer tools and removed refactor Code changes that neither fix a defect nor add functionality labels Sep 19, 2017
@n8rzz n8rzz added this to the v5.5.0 milestone Sep 19, 2017
@erikquinn erikquinn mentioned this issue Sep 19, 2017
@erikquinn
Copy link
Member Author

Here's what we came up with on slack:

no-unused-vars: ["error", { "argsIgnorePattern": "event" }]

See the no-unused-vars rule for further:
https://eslint.org/docs/rules/no-unused-vars#argsignorepattern

This should globally suppress the errors for unused arguments called event. :shipit:

@sam-irl sam-irl modified the milestones: v5.5.0, v5.6.0 Oct 1, 2017
@n8rzz
Copy link
Member

n8rzz commented Oct 1, 2017

will be covered under #744 (#746)

@n8rzz n8rzz self-assigned this Oct 1, 2017
@n8rzz n8rzz closed this as completed Oct 1, 2017
n8rzz added a commit that referenced this issue Oct 1, 2017
* updates method names to use better words
* completes #710
n8rzz added a commit that referenced this issue Oct 1, 2017
* updates method names to use better words
* completes #710
n8rzz added a commit that referenced this issue Oct 1, 2017
* updates method names to use better words
* completes #710
@sam-irl sam-irl removed this from the v5.6.0 milestone Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops About developer tools
Projects
None yet
Development

No branches or pull requests

3 participants