chore: update to standard 12

This commit is contained in:
Samuel Attard 2018-09-14 02:10:51 +10:00
parent 9e85bdb02c
commit 558fff69e7
No known key found for this signature in database
GPG key ID: E89DDE5742D58C4E
198 changed files with 4455 additions and 2940 deletions

View file

@ -1,6 +1,6 @@
'use strict'
const {app, BrowserWindow} = require('electron')
const { app, BrowserWindow } = require('electron')
const binding = process.atomBinding('dialog')
const v8Util = process.atomBinding('v8_util')
@ -83,7 +83,7 @@ module.exports = {
}
}
let {buttonLabel, defaultPath, filters, properties, title, message, securityScopedBookmarks = false} = options
let { buttonLabel, defaultPath, filters, properties, title, message, securityScopedBookmarks = false } = options
if (properties == null) {
properties = ['openFile']
@ -129,7 +129,7 @@ module.exports = {
const wrappedCallback = typeof callback === 'function' ? function (success, result, bookmarkData) {
return success ? callback(result, bookmarkData) : callback()
} : null
const settings = {title, buttonLabel, defaultPath, filters, message, securityScopedBookmarks, window}
const settings = { title, buttonLabel, defaultPath, filters, message, securityScopedBookmarks, window }
settings.properties = dialogProperties
return binding.showOpenDialog(settings, wrappedCallback)
},
@ -145,7 +145,7 @@ module.exports = {
}
}
let {buttonLabel, defaultPath, filters, title, message, securityScopedBookmarks = false, nameFieldLabel, showsTagField} = options
let { buttonLabel, defaultPath, filters, title, message, securityScopedBookmarks = false, nameFieldLabel, showsTagField } = options
if (title == null) {
title = ''
@ -188,7 +188,7 @@ module.exports = {
const wrappedCallback = typeof callback === 'function' ? function (success, result, bookmarkData) {
return success ? callback(result, bookmarkData) : callback()
} : null
const settings = {title, buttonLabel, defaultPath, filters, message, securityScopedBookmarks, nameFieldLabel, showsTagField, window}
const settings = { title, buttonLabel, defaultPath, filters, message, securityScopedBookmarks, nameFieldLabel, showsTagField, window }
return binding.showSaveDialog(settings, wrappedCallback)
},
@ -275,8 +275,8 @@ module.exports = {
const flags = options.noLink ? messageBoxOptions.noLink : 0
return binding.showMessageBox(messageBoxType, buttons, defaultId, cancelId,
flags, title, message, detail, checkboxLabel,
checkboxChecked, icon, window, callback)
flags, title, message, detail, checkboxLabel,
checkboxChecked, icon, window, callback)
},
showErrorBox: function (...args) {
@ -290,7 +290,7 @@ module.exports = {
throw new TypeError('options must be an object')
}
let {certificate, message} = options
let { certificate, message } = options
if (certificate == null || typeof certificate !== 'object') {
throw new TypeError('certificate must be an object')
}