Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
LabhanshAgrawal committed Dec 20, 2023
1 parent baac727 commit 776360b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
6 changes: 3 additions & 3 deletions app/config/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}
};

Expand Down Expand Up @@ -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) || []
};
};

Expand Down
8 changes: 1 addition & 7 deletions lib/reducers/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}

Expand Down
1 change: 1 addition & 0 deletions lib/utils/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 776360b

Please sign in to comment.