Skip to content

Commit 776360b

Browse files
fix lint errors
1 parent baac727 commit 776360b

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

app/config/init.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const _syntaxValidation = (cfg: string) => {
2121
return new vm.Script(cfg, {filename: '.hyper.js'});
2222
} catch (_err) {
2323
const err = _err as {name: string};
24-
notify(`Error loading config: ${err.name}`, `${err}`, {error: err});
24+
notify(`Error loading config: ${err.name}`, JSON.stringify(err), {error: err});
2525
}
2626
};
2727

@@ -55,8 +55,8 @@ const _init = (userCfg: rawConfig, defaultCfg: rawConfig): parsedConfig => {
5555
// Merging platform specific keymaps with user defined keymaps
5656
keymaps: mapKeys({...defaultCfg.keymaps, ...userCfg?.keymaps}),
5757
// Ignore undefined values in plugin and localPlugins array Issue #1862
58-
plugins: (userCfg?.plugins && userCfg.plugins.filter(Boolean)) || [],
59-
localPlugins: (userCfg?.localPlugins && userCfg.localPlugins.filter(Boolean)) || []
58+
plugins: userCfg?.plugins?.filter(Boolean) || [],
59+
localPlugins: userCfg?.localPlugins?.filter(Boolean) || []
6060
};
6161
};
6262

lib/reducers/ui.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -461,13 +461,7 @@ const reducer: IUiReducer = (state = initial, action) => {
461461
}
462462
}
463463

464-
if (
465-
typeof state.cols !== 'undefined' &&
466-
state.cols !== null &&
467-
typeof state.rows !== 'undefined' &&
468-
state.rows !== null &&
469-
(state.rows !== state_.rows || state.cols !== state_.cols)
470-
) {
464+
if (state.cols !== null && state.rows !== null && (state.rows !== state_.rows || state.cols !== state_.cols)) {
471465
state_ = state_.merge({notifications: {resize: true}}, {deep: true});
472466
}
473467

lib/utils/rpc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export default class Client {
2828
this.emitter.emit('ready');
2929
}, 0);
3030
} else {
31+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
3132
this.ipc.on('init', (ev: IpcRendererEvent, uid: string, profileName: string) => {
3233
// we cache so that if the object
3334
// gets re-instantiated we don't

0 commit comments

Comments
 (0)