diff --git a/app/config/init.ts b/app/config/init.ts index 2bc89427..a41b864c 100644 --- a/app/config/init.ts +++ b/app/config/init.ts @@ -21,7 +21,7 @@ const _syntaxValidation = (cfg: string) => { return new vm.Script(cfg, {filename: '.hyper.js'}); } catch (_err) { const err = _err as {name: string}; - notify(`Error loading config: ${err.name}`, `${err}`, {error: err}); + notify(`Error loading config: ${err.name}`, JSON.stringify(err), {error: err}); } }; @@ -55,8 +55,8 @@ const _init = (userCfg: rawConfig, defaultCfg: rawConfig): parsedConfig => { // Merging platform specific keymaps with user defined keymaps keymaps: mapKeys({...defaultCfg.keymaps, ...userCfg?.keymaps}), // Ignore undefined values in plugin and localPlugins array Issue #1862 - plugins: (userCfg?.plugins && userCfg.plugins.filter(Boolean)) || [], - localPlugins: (userCfg?.localPlugins && userCfg.localPlugins.filter(Boolean)) || [] + plugins: userCfg?.plugins?.filter(Boolean) || [], + localPlugins: userCfg?.localPlugins?.filter(Boolean) || [] }; }; diff --git a/lib/reducers/ui.ts b/lib/reducers/ui.ts index 19a909a1..4486a69c 100644 --- a/lib/reducers/ui.ts +++ b/lib/reducers/ui.ts @@ -461,13 +461,7 @@ const reducer: IUiReducer = (state = initial, action) => { } } - if ( - typeof state.cols !== 'undefined' && - state.cols !== null && - typeof state.rows !== 'undefined' && - state.rows !== null && - (state.rows !== state_.rows || state.cols !== state_.cols) - ) { + if (state.cols !== null && state.rows !== null && (state.rows !== state_.rows || state.cols !== state_.cols)) { state_ = state_.merge({notifications: {resize: true}}, {deep: true}); } diff --git a/lib/utils/rpc.ts b/lib/utils/rpc.ts index 50d55dda..435c289c 100644 --- a/lib/utils/rpc.ts +++ b/lib/utils/rpc.ts @@ -28,6 +28,7 @@ export default class Client { this.emitter.emit('ready'); }, 0); } else { + // eslint-disable-next-line @typescript-eslint/no-unused-vars this.ipc.on('init', (ev: IpcRendererEvent, uid: string, profileName: string) => { // we cache so that if the object // gets re-instantiated we don't