lint: white spaces & var decl

This commit is contained in:
bordun 2020-03-23 15:43:24 +01:00
parent 8093945a64
commit f8a5eda6aa
6 changed files with 10 additions and 14 deletions

View file

@ -171,7 +171,7 @@ class Widget extends EventEmitter {
this.errors = {}
this.parent = options.root ? widgetManager : options.parent
this.parentNode = options.parentNode
this.hash = options.hash || nanoid('abcdefghijklmnopqrstuvwxyABCDEFGHIJKLMNOPQRSTUVWXYZ', 10)
this.hash = options.hash || nanoid('abcdefghijklmnopqrstuvwxyABCDEFGHIJKLMNOPQRSTUVWXYZ', 10)
this.children = []
this.reCreateOptions = options.reCreateOptions
this.removed = false

View file

@ -55,14 +55,14 @@ class Eq extends StaticProperties(Plot, {logScaleX: false, logScaleY:false}) {
this.filters = []
var filters = this.getProp('filters')
for (let i in filters) {
try {
try {
this.filters[i] = new BiquadFilterNode(audioContext, {
Q: filters[i].q,
type: filters[i].type,
frequency: filters[i].freq,
gain: filters[i].gain,
})
} catch(e) {
} catch(e) {
this.filters[i] = new BiquadFilterNode(audioContext, {
Q: 1,
type: 'allpass',

View file

@ -104,7 +104,7 @@ class Script extends Widget {
}
run(context) {
run(context) {
if (this.scriptLock) return

View file

@ -142,7 +142,7 @@ if (settings.cli) {
ipcMain.on('start',function(e, options){
var args = ['--no-gui']
for (var k in settings.read('options')) {
for (var k in settings.read('options')) {
args.push('--' + k)
var val = settings.read(k)
if (typeof val === 'object') {

View file

@ -52,7 +52,7 @@ delete argv.$0
var optNames = [],
cliOnly = []
for (var k in options) {
for (let k in options) {
var name = options[k].alias || k
optNames.push(name)
if (options[k].launcher === false) {
@ -86,7 +86,7 @@ var settings = {
///////////////// config paths
var baseDir, configPath, configPathExists = true
var baseDir, configPath, configPathExists = true, config = {}
if (argv['cache-dir']) {
baseDir = path.isAbsolute(argv['cache-dir']) ? argv['cache-dir'] : path.resolve(process.cwd(), argv['cache-dir'])
@ -107,10 +107,6 @@ if (!fs.existsSync(baseDir)) {
}
}
var configPath,
configFile = {},
config = {}
if (configPathExists) {
if (argv['config-file']) {
configPath = path.isAbsolute(argv['config-file']) ? argv['config-file'] : path.resolve(process.cwd(), argv['config-file'])
@ -121,12 +117,12 @@ if (configPathExists) {
config = JSON.parse(fs.readFileSync(configPath,'utf-8'))
} catch(e) {}
if (cli) {
for (var k in config) {
for (let k in config) {
if (k === 'options') continue
settings[k] = config[k]
}
} else {
for (var k in config) {
for (let k in config) {
settings[k] = config[k]
}
}

View file

@ -17,7 +17,7 @@ class Theme {
init() {
this.themes = settings.read('theme') || []
this.themes = settings.read('theme') || []
this.files = []
for (let theme of this.themes) {