Skip to content

Commit

Permalink
Fix new lints
Browse files Browse the repository at this point in the history
  • Loading branch information
npezza93 committed Jan 19, 2019
1 parent 737d8ed commit efce5a8
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/main/config-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const pref = () => {
if (store.get(`profiles.${index}.visor`) === undefined) {
store.set(`profiles.${index}.visor`, {})
}

if (!['none', 'sound'].includes(store.get(`profiles.${index}.bellStyle`))) {
store.set(`profiles.${index}.bellStyle`, 'sound')
}
Expand Down
1 change: 1 addition & 0 deletions app/main/menus/profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default profileManager => {
if (profileManager.activeProfile().id === profile.id) {
profileItem.checked = true
}

return profileItem
})
}
Expand Down
3 changes: 3 additions & 0 deletions app/renderer/app/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export default class App extends Component {
} else {
partition[1].push(tab)
}

return partition
}, [null, []])

Expand Down Expand Up @@ -184,6 +185,7 @@ export default class App extends Component {

return tab
}

return tab
})

Expand Down Expand Up @@ -259,6 +261,7 @@ export default class App extends Component {
for (const tab of this.state.tabs) {
killers.push(tab.kill())
}

await Promise.all(killers)
}

Expand Down
8 changes: 4 additions & 4 deletions app/renderer/sessions/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ export default class Session {
this._wrapperElement.classList = 'wrapper'
this._xtermElement = document.createElement('div')
this._xtermElement.classList = 'wrapper'
this._wrapperElement.appendChild(this._xtermElement)
this._container.appendChild(this._wrapperElement)
this._wrapperElement.append(this._xtermElement)
this._container.append(this._wrapperElement)
this.xterm.open(this._xtermElement)
this.xterm.focus()
return
}

this._container.removeChild(this._wrapperElement)
this._container = container
this._container.appendChild(this._wrapperElement)
this._container.append(this._wrapperElement)
this.xterm.focus()
}

Expand Down Expand Up @@ -248,7 +248,7 @@ export default class Session {
if (platform({macos: event.metaKey, default: event.ctrlKey})) {
const webview = document.createElement('webview')
webview.setAttribute('src', uri)
document.querySelector('body').appendChild(webview)
document.querySelector('body').append(webview)
}
})
this.xterm.attachCustomKeyEventHandler(this.keybindingHandler)
Expand Down
2 changes: 2 additions & 0 deletions app/renderer/sessions/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ export default class Tab {
if (sessionToSave.branch.branch.left === sessionToSave.branch) {
sessionToSave.branch.branch.left = sessionToSave
}

if (sessionToSave.branch.branch.right === sessionToSave.branch) {
sessionToSave.branch.branch.right = sessionToSave
}

sessionToSave.branch = sessionToSave.branch.branch
}
}
Expand Down
1 change: 1 addition & 0 deletions app/renderer/settings/properties-pane.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default class PropertiesPane extends Component {
accumulator[title][property] = schema
}
}

return accumulator
}, {})
}
Expand Down
1 change: 1 addition & 0 deletions app/renderer/utils/form/array-field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default class ArrayField extends Component {
const propertySchema = this.props.schema.items.properties[property]
result.push(this.renderItem(property, value[property], propertySchema, index))
}

return result
}

Expand Down
1 change: 1 addition & 0 deletions app/renderer/utils/keybinding-capturer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default class KeybindingCapturer extends Component {
this.progress.style.strokeDashoffset = '1000'
setTimeout(this.triggerProgress, 50)
}

this.timeout = setTimeout(() => {
this.props.captureKeybinding(this.state.value)
this.cleanup()
Expand Down
1 change: 1 addition & 0 deletions test/main/main-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ async function setSingleTabMode(checked, app) {
if (Boolean(currentChecked) !== checked) {
await app.client.click('switch-field#singleTabMode label')
}

await app.client.close()
}

Expand Down
3 changes: 3 additions & 0 deletions test/main/settings-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ describe('Settings', function () {
if (await this.app.client.isVisible('hamburger-menu')) {
await this.app.client.click('hamburger-menu')
}

const profiles = await this.app.client.elements('profile-container')

assert(profiles.value.length >= 1)
Expand All @@ -64,6 +65,7 @@ describe('Settings', function () {
if (await this.app.client.isVisible('hamburger-menu')) {
await this.app.client.click('hamburger-menu')
}

const initialProfiles = await this.app.client.elements('profile-container')
await this.app.client.click('create-profile')
const afterProfiles = await this.app.client.elements('profile-container')
Expand All @@ -80,6 +82,7 @@ describe('Settings', function () {
if (await this.app.client.isVisible('hamburger-menu')) {
await this.app.client.click('hamburger-menu')
}

const initialProfiles = await this.app.client.elements('profile-container')
await this.app.client.moveToObject('remove-profile')
await this.app.client.click('remove-profile')
Expand Down

0 comments on commit efce5a8

Please sign in to comment.