mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
fix(linter): Switching between Coffee + ES6 is hard...
This commit is contained in:
parent
d1415585d5
commit
52a7a6625f
8 changed files with 8 additions and 18 deletions
|
@ -20,7 +20,7 @@ toggleSectionCollapsed = (section) ->
|
||||||
|
|
||||||
class SidebarSection
|
class SidebarSection
|
||||||
|
|
||||||
@empty: (title)->
|
@empty: (title) ->
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
items: []
|
items: []
|
||||||
|
|
|
@ -60,7 +60,7 @@ class SidebarStore extends NylasStore
|
||||||
@_focusedAccounts = accounts
|
@_focusedAccounts = accounts
|
||||||
@_updateSections()
|
@_updateSections()
|
||||||
|
|
||||||
_updateSections: () =>
|
_updateSections: =>
|
||||||
accounts = @_focusedAccounts
|
accounts = @_focusedAccounts
|
||||||
multiAccount = accounts.length > 1
|
multiAccount = accounts.length > 1
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,7 @@ class DraftList extends React.Component
|
||||||
render: =>
|
render: =>
|
||||||
<FluxContainer
|
<FluxContainer
|
||||||
stores=[DraftListStore]
|
stores=[DraftListStore]
|
||||||
getStateFromStores={ ->
|
getStateFromStores={ -> dataSource: DraftListStore.dataSource() }>
|
||||||
dataSource: DraftListStore.dataSource()
|
|
||||||
}>
|
|
||||||
<FocusContainer collection="draft">
|
<FocusContainer collection="draft">
|
||||||
<MultiselectList
|
<MultiselectList
|
||||||
columns={DraftListColumns.Wide}
|
columns={DraftListColumns.Wide}
|
||||||
|
|
|
@ -8,9 +8,7 @@ class DraftSelectionBar extends React.Component
|
||||||
render: =>
|
render: =>
|
||||||
<FluxContainer
|
<FluxContainer
|
||||||
stores={[DraftListStore]}
|
stores={[DraftListStore]}
|
||||||
getStateFromStores={ ->
|
getStateFromStores={ -> dataSource: DraftListStore.dataSource() }>
|
||||||
dataSource: DraftListStore.dataSource()
|
|
||||||
}>
|
|
||||||
<MultiselectActionBar
|
<MultiselectActionBar
|
||||||
className="draft-list"
|
className="draft-list"
|
||||||
collection="draft" />
|
collection="draft" />
|
||||||
|
|
|
@ -77,9 +77,7 @@ class ThreadList extends React.Component
|
||||||
|
|
||||||
<FluxContainer
|
<FluxContainer
|
||||||
stores=[ThreadListStore]
|
stores=[ThreadListStore]
|
||||||
getStateFromStores={ ->
|
getStateFromStores={ -> dataSource: ThreadListStore.dataSource() }>
|
||||||
dataSource: ThreadListStore.dataSource()
|
|
||||||
}>
|
|
||||||
<FocusContainer collection="thread">
|
<FocusContainer collection="thread">
|
||||||
<MultiselectList
|
<MultiselectList
|
||||||
ref="list"
|
ref="list"
|
||||||
|
|
|
@ -8,9 +8,7 @@ class ThreadSelectionBar extends React.Component
|
||||||
render: =>
|
render: =>
|
||||||
<FluxContainer
|
<FluxContainer
|
||||||
stores={[ThreadListStore]}
|
stores={[ThreadListStore]}
|
||||||
getStateFromStores={ ->
|
getStateFromStores={ -> dataSource: ThreadListStore.dataSource() }>
|
||||||
dataSource: ThreadListStore.dataSource()
|
|
||||||
}>
|
|
||||||
<MultiselectActionBar
|
<MultiselectActionBar
|
||||||
className="thread-list"
|
className="thread-list"
|
||||||
collection="thread" />
|
collection="thread" />
|
||||||
|
|
|
@ -137,7 +137,7 @@ describe 'FileUploadStore', ->
|
||||||
upload = new Upload(msgId, fpath, {size: 1234, isDirectory: -> false})
|
upload = new Upload(msgId, fpath, {size: 1234, isDirectory: -> false})
|
||||||
waitsForPromise ->
|
waitsForPromise ->
|
||||||
FileUploadStore._verifyUpload(upload)
|
FileUploadStore._verifyUpload(upload)
|
||||||
.then (up)-> expect(up.id).toBe upload.id
|
.then (up) -> expect(up.id).toBe upload.id
|
||||||
|
|
||||||
|
|
||||||
describe '_copyUpload', ->
|
describe '_copyUpload', ->
|
||||||
|
@ -178,5 +178,3 @@ describe 'FileUploadStore', ->
|
||||||
.then => throw new Error('It should fail.')
|
.then => throw new Error('It should fail.')
|
||||||
.catch (msg) =>
|
.catch (msg) =>
|
||||||
expect(msg).not.toBeUndefined()
|
expect(msg).not.toBeUndefined()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ class AccountStore
|
||||||
accountForId: (id) =>
|
accountForId: (id) =>
|
||||||
_.findWhere(@_accounts, {id})
|
_.findWhere(@_accounts, {id})
|
||||||
|
|
||||||
aliases: () =>
|
aliases: =>
|
||||||
aliases = []
|
aliases = []
|
||||||
for acc in @_accounts
|
for acc in @_accounts
|
||||||
aliases.push(acc.me())
|
aliases.push(acc.me())
|
||||||
|
|
Loading…
Reference in a new issue