From 3c0c0caffc10010a6190f85da7d60da78a9557f2 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 23 Mar 2019 09:18:50 -0700 Subject: [PATCH] fix: fix prettier --- .../emoji-index/__tests__/nimble-emoji-index.test.js | 4 ++-- src/utils/emoji-index/nimble-emoji-index.js | 9 +++++++-- src/utils/index.js | 6 +++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/utils/emoji-index/__tests__/nimble-emoji-index.test.js b/src/utils/emoji-index/__tests__/nimble-emoji-index.test.js index caaafe7..a0f18d6 100644 --- a/src/utils/emoji-index/__tests__/nimble-emoji-index.test.js +++ b/src/utils/emoji-index/__tests__/nimble-emoji-index.test.js @@ -3,10 +3,10 @@ import store from '../../store' import data from '../../../../data/all' -const nimbleEmojiIndex = new NimbleEmojiIndex(data); +const nimbleEmojiIndex = new NimbleEmojiIndex(data) function getEmojiData(skinTone) { - store.update({skin: skinTone}) + store.update({ skin: skinTone }) return nimbleEmojiIndex.search('thumbsup')[0] } diff --git a/src/utils/emoji-index/nimble-emoji-index.js b/src/utils/emoji-index/nimble-emoji-index.js index f113198..42f2bfb 100644 --- a/src/utils/emoji-index/nimble-emoji-index.js +++ b/src/utils/emoji-index/nimble-emoji-index.js @@ -39,7 +39,12 @@ export default class NimbleEmojiIndex { if (skin_variations) { this.emojis[id] = {} for (let skinTone = 1; skinTone <= 6; skinTone++) { - this.emojis[id][skinTone] = getSanitizedData({id, skin: skinTone}, skinTone, this.set, this.data) + this.emojis[id][skinTone] = getSanitizedData( + { id, skin: skinTone }, + skinTone, + this.set, + this.data, + ) } } else { this.emojis[id] = getSanitizedData(id, null, this.set, this.data) @@ -81,7 +86,7 @@ export default class NimbleEmojiIndex { if (this.customEmojisList != custom) this.addCustomToPool(custom, this.originalPool) - const skinTone = store.get('skin') || 1; + const skinTone = store.get('skin') || 1 maxResults || (maxResults = 75) include || (include = []) diff --git a/src/utils/index.js b/src/utils/index.js index 45f011d..afa69c9 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -115,9 +115,9 @@ function getData(emoji, skin, set, data) { } if ( - (set && - variationData[`has_img_${set}`] == undefined || - variationData[`has_img_${set}`]) || !set + (set && variationData[`has_img_${set}`] == undefined) || + variationData[`has_img_${set}`] || + !set ) { emojiData.skin_tone = skin