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

Don't mark vars with leading underscores as unused #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TwitchBronBron
Copy link
Member

@TwitchBronBron TwitchBronBron commented Aug 18, 2022

Roku recently introduced the paradigm of using underscores to indicate that a variable is unused. bslint should probably follow the same concept.

Question: Should we revise the 'unused-variable'?: RuleSeverity; to contain options instead of just severity? Perhaps something like:

{
    "unused-variable": "all" | "all-except-leading-underscores" | etc..
}

@elsassph
Copy link
Collaborator

elsassph commented Oct 4, 2022

I would say this rule should apply to function parameters only.

Maybe introduce unused-parameters rule for functions (see #72), where we would error only if the parameter name doesn't start with _.

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.

2 participants