Enforce dangling underscores in method names #1907
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@ljharb updated the docs on 4/13/16 to forbid using underscores in method names, but the linter does not actually raise an error when defining a method with a dangling underscore.
@gabro added the ability to enforce underscores in method names to ESLint on 7/16/17. The rule was added to the linter's rules by @ljharb on 9/1/17, but was left as
false
instead oftrue
, despite the TODO comment to 'enable' the rule (presumably this was human error).Before most recent commit:
// enforceInMethodNames: false, // TODO: uncoment and enable, semver-minor once v3 is dropped
After most recent commit:
After my commit:
NOTE: The linter currently does complain when calling a method with a dangling underscore. This is addressing defining the method.