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",
|
"@typescript-eslint/ban-types": "off",
|
||||||
"no-shadow": "off",
|
"no-shadow": "off",
|
||||||
"@typescript-eslint/no-shadow": ["error"],
|
"@typescript-eslint/no-shadow": ["error"],
|
||||||
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
|
||||||
"@typescript-eslint/no-unsafe-assignment": "off",
|
"@typescript-eslint/no-unsafe-assignment": "off",
|
||||||
"@typescript-eslint/no-unsafe-call": "off",
|
"@typescript-eslint/no-unsafe-call": "off",
|
||||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ const _importConf = () => {
|
||||||
export const _import = () => {
|
export const _import = () => {
|
||||||
const imported = _importConf();
|
const imported = _importConf();
|
||||||
defaultConfig = imported.defaultCfg;
|
defaultConfig = imported.defaultCfg;
|
||||||
const result = _init(imported!);
|
const result = _init(imported);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ const findNextSessionUid = (state: Immutable<ITermState>, group: Immutable<ITerm
|
||||||
|
|
||||||
const {children} = state.termGroups[group.parentUid!];
|
const {children} = state.termGroups[group.parentUid!];
|
||||||
const nextUid = findPrevious(children.asMutable(), group.uid);
|
const nextUid = findPrevious(children.asMutable(), group.uid);
|
||||||
return findFirstSession(state, state.termGroups[nextUid!]);
|
return findFirstSession(state, state.termGroups[nextUid]);
|
||||||
};
|
};
|
||||||
|
|
||||||
export function ptyExitTermGroup(sessionUid: string) {
|
export function ptyExitTermGroup(sessionUid: string) {
|
||||||
|
|
@ -168,7 +168,7 @@ export function exitActiveTermGroup() {
|
||||||
effect() {
|
effect() {
|
||||||
const {sessions, termGroups} = getState();
|
const {sessions, termGroups} = getState();
|
||||||
const {uid} = findBySession(termGroups, sessions.activeUid!)!;
|
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) {
|
if (childGroups.length === 1) {
|
||||||
console.log('ignoring move for single group');
|
console.log('ignoring move for single group');
|
||||||
} else {
|
} else {
|
||||||
const index = getNeighborIndex(childGroups, uid!, type);
|
const index = getNeighborIndex(childGroups, uid, type);
|
||||||
const {sessionUid} = termGroups.termGroups[childGroups[index]];
|
const {sessionUid} = termGroups.termGroups[childGroups[index]];
|
||||||
dispatch(setActiveSession(sessionUid!));
|
dispatch(setActiveSession(sessionUid!));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ export default class Notification extends React.PureComponent<NotificationProps,
|
||||||
setDismissTimer() {
|
setDismissTimer() {
|
||||||
this.dismissTimer = setTimeout(() => {
|
this.dismissTimer = setTimeout(() => {
|
||||||
this.handleDismiss();
|
this.handleDismiss();
|
||||||
}, this.props.dismissAfter!);
|
}, this.props.dismissAfter);
|
||||||
}
|
}
|
||||||
|
|
||||||
resetDismissTimer() {
|
resetDismissTimer() {
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ const getPluginName = (path: string) => pathModule.basename(path);
|
||||||
const getPluginVersion = (path: string): string | null => {
|
const getPluginVersion = (path: string): string | null => {
|
||||||
let version = null;
|
let version = null;
|
||||||
try {
|
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) {
|
} catch (err) {
|
||||||
console.warn(`No package.json found in ${path}`);
|
console.warn(`No package.json found in ${path}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue