Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
allowAfterThisConstructor for no-underscore-dangle #11488
Like many, I've been using the
I have found an additional case that would be nice to allow: when an instance method or constructor wants to invoke a "private" static method. To make this possible without having to disable the rule on a case-by-case basis, I'd like to add an option to allow underscore dangles when referencing properties on
What rule do you want to change?
Does this change cause the rule to produce more or fewer warnings?
How will the change be implemented? (New option, new default behavior, etc.)?
Please provide some example code that this change will affect:
var a = this.constructor.foo_; this.constructor._bar();
What does the rule currently do for this code?
Produces the following warnings/errors:
What will the rule do after it's changed?
Are you willing to submit a pull request to implement this change?
Yes, will be creating it shortly.
Unfortunately, it looks like there wasn't enough interest from the team
Thanks for contributing to ESLint and we appreciate your understanding.