Fix max-statements-per-line issues (#9218)

See [`max-statements-per-line`](https://eslint.org/docs/rules/max-statements-per-line) for more information.

This change enables `max-statements-per-line` and fixes the issues raised by the rule.
feature/default_network_editable
Whymarrh Whitby 4 years ago committed by GitHub
parent 9e7841fa91
commit e021acdc0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .eslintrc.js
  2. 3
      app/scripts/lib/decrypt-message-manager.js
  3. 3
      app/scripts/lib/encryption-public-key-manager.js
  4. 3
      app/scripts/lib/message-manager.js
  5. 3
      app/scripts/lib/personal-message-manager.js
  6. 3
      app/scripts/lib/typed-message-manager.js

@ -49,6 +49,7 @@ module.exports = {
'guard-for-in': 'error',
'implicit-arrow-linebreak': 'error',
'import/extensions': ['error', 'never', { 'json': 'always' }],
'max-statements-per-line': ['error', { 'max': 1 }],
'no-case-declarations': 'error',
'no-constant-condition': 'error',
'no-dupe-else-if': 'error',

@ -65,7 +65,8 @@ export default class DecryptMessageManager extends EventEmitter {
getUnapprovedMsgs () {
return this.messages.filter((msg) => msg.status === 'unapproved')
.reduce((result, msg) => {
result[msg.id] = msg; return result
result[msg.id] = msg
return result
}, {})
}

@ -62,7 +62,8 @@ export default class EncryptionPublicKeyManager extends EventEmitter {
getUnapprovedMsgs () {
return this.messages.filter((msg) => msg.status === 'unapproved')
.reduce((result, msg) => {
result[msg.id] = msg; return result
result[msg.id] = msg
return result
}, {})
}

@ -64,7 +64,8 @@ export default class MessageManager extends EventEmitter {
getUnapprovedMsgs () {
return this.messages.filter((msg) => msg.status === 'unapproved')
.reduce((result, msg) => {
result[msg.id] = msg; return result
result[msg.id] = msg
return result
}, {})
}

@ -68,7 +68,8 @@ export default class PersonalMessageManager extends EventEmitter {
getUnapprovedMsgs () {
return this.messages.filter((msg) => msg.status === 'unapproved')
.reduce((result, msg) => {
result[msg.id] = msg; return result
result[msg.id] = msg
return result
}, {})
}

@ -61,7 +61,8 @@ export default class TypedMessageManager extends EventEmitter {
getUnapprovedMsgs () {
return this.messages.filter((msg) => msg.status === 'unapproved')
.reduce((result, msg) => {
result[msg.id] = msg; return result
result[msg.id] = msg
return result
}, {})
}

Loading…
Cancel
Save