no-underscore-dangle to check function params
See original GitHub issueWhat rule do you want to change? no-underscore-dangle
Does this change cause the rule to produce more or fewer warnings? More warnings
How will the change be implemented? (New option, new default behavior, etc.)? The updated rule will check if param Identifiers of FunctionDeclarations and ArrowFunctionExpressions have dangling underscores.
I suggest that underscore dangle in these situations is disallowed by default and can be configured using the same pattern as "allowAfterThis"
and "allowAfterSuper"
.
Please provide some example code that this change will affect:
const test = (_arg) => { };
function myfunc(_arg) { };
What does the rule currently do for this code? No error thrown.
What will the rule do after it’s changed? Throw an error because the function params have dangling underscores.
Are you willing to submit a pull request to implement this change? Yes
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:7 (4 by maintainers)
I’ll champion this. We still need support from two other team members before we can mark this as accepted.
Marking this as accepted as there are 3 +1 from team members.
I think
allowFunctionParams
might be a good approach and name which will betrue
by default as mentioned above