Add stricter ESLint rules for Typescript files (#24926)
This commit is contained in:
parent
b878e3d8df
commit
5eeb40bdbe
39 changed files with 432 additions and 149 deletions
|
@ -1,5 +1,7 @@
|
|||
import React from 'react';
|
||||
import { injectIntl, defineMessages, InjectedIntl } from 'react-intl';
|
||||
|
||||
import type { InjectedIntl } from 'react-intl';
|
||||
import { injectIntl, defineMessages } from 'react-intl';
|
||||
|
||||
const messages = defineMessages({
|
||||
today: { id: 'relative_time.today', defaultMessage: 'today' },
|
||||
|
@ -187,16 +189,16 @@ const timeRemainingString = (
|
|||
return relativeTime;
|
||||
};
|
||||
|
||||
type Props = {
|
||||
interface Props {
|
||||
intl: InjectedIntl;
|
||||
timestamp: string;
|
||||
year: number;
|
||||
futureDate?: boolean;
|
||||
short?: boolean;
|
||||
};
|
||||
type States = {
|
||||
}
|
||||
interface States {
|
||||
now: number;
|
||||
};
|
||||
}
|
||||
class RelativeTimestamp extends React.Component<Props, States> {
|
||||
state = {
|
||||
now: this.props.intl.now(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue