1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Fix no-template-curly-in-string issues (#9221)

See [`no-template-curly-in-string`](https://eslint.org/docs/rules/no-template-curly-in-string) for more information.

This change enables `no-template-curly-in-string` and fixes the issues raised by the rule.
This commit is contained in:
Whymarrh Whitby 2020-08-13 19:01:55 -02:30 committed by GitHub
parent 944f6d4880
commit 3bd22a2058
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 4 deletions

View File

@ -59,6 +59,7 @@ module.exports = {
'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }],
'no-process-exit': 'error',
'no-prototype-builtins': 'error',
'no-template-curly-in-string': 'error',
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'prefer-rest-params': 'error',

View File

@ -253,7 +253,7 @@ export default class DecryptMessageManager extends EventEmitter {
_setMsgStatus (msgId, status) {
const msg = this.getMsg(msgId)
if (!msg) {
throw new Error('DecryptMessageManager - Message not found for id: "${msgId}".')
throw new Error(`DecryptMessageManager - Message not found for id: "${msgId}".`)
}
msg.status = status
this._updateMsg(msg)

View File

@ -247,7 +247,7 @@ export default class EncryptionPublicKeyManager extends EventEmitter {
_setMsgStatus (msgId, status) {
const msg = this.getMsg(msgId)
if (!msg) {
throw new Error('EncryptionPublicKeyManager - Message not found for id: "${msgId}".')
throw new Error(`EncryptionPublicKeyManager - Message not found for id: "${msgId}".`)
}
msg.status = status
this._updateMsg(msg)

View File

@ -225,7 +225,7 @@ export default class MessageManager extends EventEmitter {
_setMsgStatus (msgId, status) {
const msg = this.getMsg(msgId)
if (!msg) {
throw new Error('MessageManager - Message not found for id: "${msgId}".')
throw new Error(`MessageManager - Message not found for id: "${msgId}".`)
}
msg.status = status
this._updateMsg(msg)

View File

@ -292,7 +292,7 @@ export default class TypedMessageManager extends EventEmitter {
_setMsgStatus (msgId, status) {
const msg = this.getMsg(msgId)
if (!msg) {
throw new Error('TypedMessageManager - Message not found for id: "${msgId}".')
throw new Error(`TypedMessageManager - Message not found for id: "${msgId}".`)
}
msg.status = status
this._updateMsg(msg)