Skip to content

Commit a030c90

Browse files
joshwiensjhnns
authored andcommitted
fix: allow dangle for private object members (#8)
- Reasoning: Underscore dangle for private object members is a common and widely accepted convention for indicating private members. This change allows underscore dangle in the case of this._somePrivateMember while preventing the abuse of dangle in any other case.
1 parent 492184a commit a030c90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rules/stylistic-issues.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ module.exports = {
300300

301301
// disallow dangling underscores in identifiers
302302
// http://eslint.org/docs/rules/no-underscore-dangle
303-
'no-underscore-dangle': ['error', { allowAfterThis: false }],
303+
'no-underscore-dangle': ['error', { allowAfterThis: true }],
304304

305305
// disallow ternary operators when simpler alternatives exist
306306
// http://eslint.org/docs/rules/no-unneeded-ternary

0 commit comments

Comments
 (0)