Enable @typescript-eslint/explicit-member-accessibility
on /src (#9785)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src * Prettier
This commit is contained in:
parent
51554399fb
commit
f1e8e7f140
396 changed files with 1110 additions and 1098 deletions
|
@ -69,7 +69,7 @@ class Category extends React.PureComponent<IProps> {
|
|||
);
|
||||
};
|
||||
|
||||
render() {
|
||||
public render() {
|
||||
const { emojis, name, heightBefore, viewportHeight, scrollTop } = this.props;
|
||||
if (!emojis || emojis.length === 0) {
|
||||
return null;
|
||||
|
|
|
@ -30,7 +30,7 @@ interface IProps {
|
|||
}
|
||||
|
||||
class Emoji extends React.PureComponent<IProps> {
|
||||
render() {
|
||||
public render() {
|
||||
const { onClick, onMouseEnter, onMouseLeave, emoji, selectedEmojis } = this.props;
|
||||
const isSelected = selectedEmojis && selectedEmojis.has(emoji.unicode);
|
||||
return (
|
||||
|
|
|
@ -57,7 +57,7 @@ class EmojiPicker extends React.Component<IProps, IState> {
|
|||
|
||||
private scrollRef = React.createRef<AutoHideScrollbar<"div">>();
|
||||
|
||||
constructor(props: IProps) {
|
||||
public constructor(props: IProps) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
|
@ -249,7 +249,7 @@ class EmojiPicker extends React.Component<IProps, IState> {
|
|||
return CATEGORY_HEADER_HEIGHT + Math.ceil(count / EMOJIS_PER_ROW) * EMOJI_HEIGHT;
|
||||
}
|
||||
|
||||
render() {
|
||||
public render() {
|
||||
let heightBefore = 0;
|
||||
return (
|
||||
<div className="mx_EmojiPicker" data-testid="mx_EmojiPicker">
|
||||
|
|
|
@ -82,7 +82,7 @@ class Header extends React.PureComponent<IProps> {
|
|||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
public render() {
|
||||
return (
|
||||
<nav
|
||||
className="mx_EmojiPicker_header"
|
||||
|
|
|
@ -24,7 +24,7 @@ interface IProps {
|
|||
}
|
||||
|
||||
class Preview extends React.PureComponent<IProps> {
|
||||
render() {
|
||||
public render() {
|
||||
const {
|
||||
unicode,
|
||||
label,
|
||||
|
|
|
@ -40,7 +40,7 @@ interface IState {
|
|||
}
|
||||
|
||||
class QuickReactions extends React.Component<IProps, IState> {
|
||||
constructor(props) {
|
||||
public constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
hover: null,
|
||||
|
@ -59,7 +59,7 @@ class QuickReactions extends React.Component<IProps, IState> {
|
|||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
public render() {
|
||||
return (
|
||||
<section className="mx_EmojiPicker_footer mx_EmojiPicker_quick mx_EmojiPicker_category">
|
||||
<h2 className="mx_EmojiPicker_quick_header mx_EmojiPicker_category_label">
|
||||
|
|
|
@ -38,10 +38,10 @@ interface IState {
|
|||
}
|
||||
|
||||
class ReactionPicker extends React.Component<IProps, IState> {
|
||||
static contextType = RoomContext;
|
||||
public static contextType = RoomContext;
|
||||
public context!: React.ContextType<typeof RoomContext>;
|
||||
|
||||
constructor(props: IProps, context: React.ContextType<typeof RoomContext>) {
|
||||
public constructor(props: IProps, context: React.ContextType<typeof RoomContext>) {
|
||||
super(props, context);
|
||||
|
||||
this.state = {
|
||||
|
@ -50,7 +50,7 @@ class ReactionPicker extends React.Component<IProps, IState> {
|
|||
this.addListeners();
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
public componentDidUpdate(prevProps) {
|
||||
if (prevProps.reactions !== this.props.reactions) {
|
||||
this.addListeners();
|
||||
this.onReactionsChange();
|
||||
|
@ -65,7 +65,7 @@ class ReactionPicker extends React.Component<IProps, IState> {
|
|||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
public componentWillUnmount() {
|
||||
if (this.props.reactions) {
|
||||
this.props.reactions.removeListener(RelationsEvent.Add, this.onReactionsChange);
|
||||
this.props.reactions.removeListener(RelationsEvent.Remove, this.onReactionsChange);
|
||||
|
@ -130,7 +130,7 @@ class ReactionPicker extends React.Component<IProps, IState> {
|
|||
return true;
|
||||
};
|
||||
|
||||
render() {
|
||||
public render() {
|
||||
return (
|
||||
<EmojiPicker
|
||||
onChoose={this.onChoose}
|
||||
|
|
|
@ -30,7 +30,7 @@ interface IProps {
|
|||
class Search extends React.PureComponent<IProps> {
|
||||
private inputRef = React.createRef<HTMLInputElement>();
|
||||
|
||||
componentDidMount() {
|
||||
public componentDidMount() {
|
||||
// For some reason, neither the autoFocus nor just calling focus() here worked, so here's a window.setTimeout
|
||||
window.setTimeout(() => this.inputRef.current.focus(), 0);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ class Search extends React.PureComponent<IProps> {
|
|||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
public render() {
|
||||
let rightButton;
|
||||
if (this.props.query) {
|
||||
rightButton = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue