mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Fix @typescript-eslint/no-unnecessary-type-assertion errors
This commit is contained in:
parent
fe2653c5c0
commit
ae70054e59
6 changed files with 6 additions and 7 deletions
|
|
@ -104,7 +104,6 @@
|
|||
"@typescript-eslint/ban-types": "off",
|
||||
"no-shadow": "off",
|
||||
"@typescript-eslint/no-shadow": ["error"],
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
||||
"@typescript-eslint/no-unsafe-assignment": "off",
|
||||
"@typescript-eslint/no-unsafe-call": "off",
|
||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ const _importConf = () => {
|
|||
export const _import = () => {
|
||||
const imported = _importConf();
|
||||
defaultConfig = imported.defaultCfg;
|
||||
const result = _init(imported!);
|
||||
const result = _init(imported);
|
||||
return result;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ const findNextSessionUid = (state: Immutable<ITermState>, group: Immutable<ITerm
|
|||
|
||||
const {children} = state.termGroups[group.parentUid!];
|
||||
const nextUid = findPrevious(children.asMutable(), group.uid);
|
||||
return findFirstSession(state, state.termGroups[nextUid!]);
|
||||
return findFirstSession(state, state.termGroups[nextUid]);
|
||||
};
|
||||
|
||||
export function ptyExitTermGroup(sessionUid: string) {
|
||||
|
|
@ -168,7 +168,7 @@ export function exitActiveTermGroup() {
|
|||
effect() {
|
||||
const {sessions, termGroups} = getState();
|
||||
const {uid} = findBySession(termGroups, sessions.activeUid!)!;
|
||||
dispatch(userExitTermGroup(uid!));
|
||||
dispatch(userExitTermGroup(uid));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ function moveToNeighborPane(type: typeof UI_MOVE_NEXT_PANE | typeof UI_MOVE_PREV
|
|||
if (childGroups.length === 1) {
|
||||
console.log('ignoring move for single group');
|
||||
} else {
|
||||
const index = getNeighborIndex(childGroups, uid!, type);
|
||||
const index = getNeighborIndex(childGroups, uid, type);
|
||||
const {sessionUid} = termGroups.termGroups[childGroups[index]];
|
||||
dispatch(setActiveSession(sessionUid!));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export default class Notification extends React.PureComponent<NotificationProps,
|
|||
setDismissTimer() {
|
||||
this.dismissTimer = setTimeout(() => {
|
||||
this.handleDismiss();
|
||||
}, this.props.dismissAfter!);
|
||||
}, this.props.dismissAfter);
|
||||
}
|
||||
|
||||
resetDismissTimer() {
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ const getPluginName = (path: string) => pathModule.basename(path);
|
|||
const getPluginVersion = (path: string): string | null => {
|
||||
let version = null;
|
||||
try {
|
||||
version = (window.require(pathModule.resolve(path, 'package.json')) as any).version as string;
|
||||
version = window.require(pathModule.resolve(path, 'package.json')).version as string;
|
||||
} catch (err) {
|
||||
console.warn(`No package.json found in ${path}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue