This commit is contained in:
Nathan Bierema 2024-08-04 20:05:52 -04:00
parent c9dbfcef54
commit 5923d744c7
6 changed files with 14 additions and 16 deletions

View File

@ -385,7 +385,7 @@ export interface RequestBase {
libConfig?: LibConfig;
actionsById?: string;
computedStates?: string;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
payload?: {} | string;
liftedState?: Partial<State>;
}

View File

@ -11,7 +11,6 @@ interface State {
selected: string | undefined;
}
// eslint-disable-next-line @typescript-eslint/ban-types
export default class Settings extends Component<Props, State> {
state: State = { selected: undefined };
@ -27,7 +26,7 @@ export default class Settings extends Component<Props, State> {
{ name: 'State Tree', component: StateTree },
];
return (
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
<Tabs<{}>
tabs={tabs as any}
selected={this.state.selected || tabs[0].name}

View File

@ -21,7 +21,7 @@ type Props = DispatchProps & OwnProps;
class ChartTab extends Component<Props> {
node?: HTMLDivElement | null;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
renderChart?: (nextState?: {} | null | undefined) => void;
shouldComponentUpdate() {
@ -40,7 +40,7 @@ class ChartTab extends Component<Props> {
this.node!.innerHTML = '';
this.createChart(nextProps);
} else if (nextProps.data !== this.props.data) {
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
this.renderChart!(nextProps.data as {} | null | undefined);
}
}
@ -51,7 +51,7 @@ class ChartTab extends Component<Props> {
createChart(props: Props) {
this.renderChart = tree(this.node!, this.getChartTheme(props.theme));
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
this.renderChart(props.data as {} | null | undefined);
}

View File

@ -19,7 +19,7 @@ export const StyledContainer = styled.div`
padding: 2px 3px;
border-radius: 3px;
position: relative;
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base07};
display: inline-block;
}
@ -44,7 +44,7 @@ export const StyledContainer = styled.div`
.jsondiffpatch-modified .jsondiffpatch-right-value:before {
vertical-align: top;
padding: 2px;
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base0E};
content: ' => ';
}
@ -52,7 +52,7 @@ export const StyledContainer = styled.div`
.jsondiffpatch-added .jsondiffpatch-value pre,
.jsondiffpatch-modified .jsondiffpatch-right-value pre,
.jsondiffpatch-textdiff-added {
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
background: ${(props: ThemedStyledProps<{}, Theme>) =>
effects.color(props.theme.base0B, 'alpha', 0.2)};
}
@ -60,7 +60,7 @@ export const StyledContainer = styled.div`
.jsondiffpatch-deleted pre,
.jsondiffpatch-modified .jsondiffpatch-left-value pre,
.jsondiffpatch-textdiff-deleted {
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
background: ${(props: ThemedStyledProps<{}, Theme>) =>
effects.color(props.theme.base08, 'alpha', 0.2)};
text-decoration: line-through;
@ -129,13 +129,13 @@ export const StyledContainer = styled.div`
padding: 2px 0;
padding-right: 5px;
vertical-align: top;
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base0D};
}
.jsondiffpatch-property-name:after {
content: ': ';
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base07};
}
@ -172,7 +172,7 @@ export const StyledContainer = styled.div`
}
.jsondiffpatch-value pre:after {
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base07};
content: ',';
}
@ -196,7 +196,7 @@ export const StyledContainer = styled.div`
.jsondiffpatch-moved .jsondiffpatch-moved-destination {
display: inline-block;
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
background: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base0A};
}

View File

@ -94,7 +94,6 @@ function updateState(
const actionsById = request.actionsById;
if (actionsById) {
payload = {
// eslint-disable-next-line @typescript-eslint/ban-types
...payload,
actionsById: parseJSON(actionsById, serialize),
computedStates: parseJSON(request.computedStates, serialize),

View File

@ -20,7 +20,7 @@ export default function commitExcessActions(liftedState: State, n = 1) {
}
liftedState.skippedActionIds = liftedState.skippedActionIds.filter(
(id) => idsToDelete.indexOf(id) === -1,
(id) => !idsToDelete.includes(id),
);
liftedState.stagedActionIds = [
0,