Skip to content

Commit

Permalink
fix: allow dangle for private object members (#8)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
joshwiens authored and jhnns committed Apr 9, 2017
1 parent 492184a commit a030c90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/stylistic-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ module.exports = {

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

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

0 comments on commit a030c90

Please sign in to comment.