Migrate conversations to ESLint

This commit is contained in:
Chris Svenningsen 2020-09-14 12:51:27 -07:00 committed by Josh Perez
parent b4f0f3c685
commit 372aa44e49
90 changed files with 1261 additions and 1165 deletions

View file

@ -21,7 +21,7 @@ export interface Props {
const UPDATE_FREQUENCY = 60 * 1000;
export class Timestamp extends React.Component<Props> {
private interval: any;
private interval: NodeJS.Timeout | null;
constructor(props: Props) {
super(props);
@ -29,22 +29,24 @@ export class Timestamp extends React.Component<Props> {
this.interval = null;
}
public componentDidMount() {
public componentDidMount(): void {
const update = () => {
this.setState({
// Used to trigger renders
// eslint-disable-next-line react/no-unused-state
lastUpdated: Date.now(),
});
};
this.interval = setInterval(update, UPDATE_FREQUENCY);
}
public componentWillUnmount() {
public componentWillUnmount(): void {
if (this.interval) {
clearInterval(this.interval);
}
}
public render() {
public render(): JSX.Element | null {
const {
direction,
i18n,