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

Ignore unused arguments prefixed with an underscore #10

Closed
wants to merge 1 commit into from

Conversation

zimeg
Copy link
Member

@zimeg zimeg commented Jan 8, 2024

Type of change

  • New sample
  • New feature
  • Bug fix
  • Documentation

Summary

This PR adds a condition to the no-unused-vars linter rule to ignore errors for variables prefixed with an underscore.

Unfortunately the args-after-used option doesn't apply to object parameters, so this is the best workaround I can think of. Open to other suggestions of course!

Notes

  • I'm hoping this _client remains clear that it corresponds to the commented client. But not so sure about this...

Requirements

  • I’ve checked my submission against the Samples Checklist to ensure it complies with all standards
  • I have ensured the changes I am contributing align with existing patterns and have tested and linted my code
  • I've read and agree to the Code of Conduct

@zimeg zimeg requested a review from misscoded January 8, 2024 22:15
@zimeg zimeg self-assigned this Jan 8, 2024
@zimeg
Copy link
Member Author

zimeg commented Jan 8, 2024

There is a better solution. I believe it.

@zimeg zimeg closed this Jan 8, 2024
@zimeg zimeg deleted the underscore-lints branch January 8, 2024 22:43
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

Successfully merging this pull request may close these issues.

1 participant