feat(babel6): 2,743 lint errors

This commit is contained in:
Evan Morikawa 2016-05-05 17:32:02 -07:00
parent 1def854603
commit 05515c847c
3 changed files with 6 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,13 +1,14 @@
import NylasStore from 'nylas-store'; import NylasStore from 'nylas-store';
import Rx from 'rx-lite'; import Rx from 'rx-lite';
import _ from 'underscore'; import _ from 'underscore';
import fs from 'fs';
import {DatabaseStore} from 'nylas-exports'; import {DatabaseStore} from 'nylas-exports';
import EmojiActions from './emoji-actions'; import EmojiActions from './emoji-actions';
import emojiData from './emoji-data';
const EmojiJSONBlobKey = 'emoji'; const EmojiJSONBlobKey = 'emoji';
let emojiData;
class EmojiStore extends NylasStore { class EmojiStore extends NylasStore {
constructor(props) { constructor(props) {
@ -41,6 +42,7 @@ class EmojiStore extends NylasStore {
} }
getImagePath(emojiName) { getImagePath(emojiName) {
emojiData = emojiData || JSON.parse(fs.readFileSync('./emoji-data', {encoding: "utf8"}));
for (const emoji of emojiData) { for (const emoji of emojiData) {
if (emoji.short_names.indexOf(emojiName) !== -1) { if (emoji.short_names.indexOf(emojiName) !== -1) {
if (process.platform === "darwin") { if (process.platform === "darwin") {
@ -49,6 +51,7 @@ class EmojiStore extends NylasStore {
return `images/composer-emoji/twitter/${emoji.image}`; return `images/composer-emoji/twitter/${emoji.image}`;
} }
} }
return ''
} }
_onUseEmoji = (emoji) => { _onUseEmoji = (emoji) => {