Disable the linter on lines it complaints about UNSAFE_componentWillMount
This commit is contained in:
parent
0a6f54da33
commit
6d0d77f98e
6 changed files with 6 additions and 6 deletions
|
@ -117,7 +117,7 @@ export default class Dropdown extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: [REACT-WARNING] Replace component with real class, use constructor for refs
|
// TODO: [REACT-WARNING] Replace component with real class, use constructor for refs
|
||||||
UNSAFE_componentWillMount() {
|
UNSAFE_componentWillMount() { // eslint-disable-line camelcase
|
||||||
this._button = createRef();
|
this._button = createRef();
|
||||||
// Listen for all clicks on the document so we can close the
|
// Listen for all clicks on the document so we can close the
|
||||||
// menu when the user clicks somewhere else
|
// menu when the user clicks somewhere else
|
||||||
|
|
|
@ -332,7 +332,7 @@ export default class SendMessageComposer extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: [REACT-WARNING] Move this to constructor
|
// TODO: [REACT-WARNING] Move this to constructor
|
||||||
UNSAFE_componentWillMount() {
|
UNSAFE_componentWillMount() { // eslint-disable-line camelcase
|
||||||
const partCreator = new CommandPartCreator(this.props.room, this.context);
|
const partCreator = new CommandPartCreator(this.props.room, this.context);
|
||||||
const parts = this._restoreStoredEditorState(partCreator) || [];
|
const parts = this._restoreStoredEditorState(partCreator) || [];
|
||||||
this.model = new EditorModel(parts, partCreator);
|
this.model = new EditorModel(parts, partCreator);
|
||||||
|
|
|
@ -39,7 +39,7 @@ export default class AdvancedRoomSettingsTab extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: [REACT-WARNING] Move this to constructor
|
// TODO: [REACT-WARNING] Move this to constructor
|
||||||
UNSAFE_componentWillMount() {
|
UNSAFE_componentWillMount() { // eslint-disable-line camelcase
|
||||||
// we handle lack of this object gracefully later, so don't worry about it failing here.
|
// we handle lack of this object gracefully later, so don't worry about it failing here.
|
||||||
const room = MatrixClientPeg.get().getRoom(this.props.roomId);
|
const room = MatrixClientPeg.get().getRoom(this.props.roomId);
|
||||||
room.getRecommendedVersion().then((v) => {
|
room.getRecommendedVersion().then((v) => {
|
||||||
|
|
|
@ -38,7 +38,7 @@ export default class NotificationsSettingsTab extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: [REACT-WARNING] Replace component with real class, use constructor for refs
|
// TODO: [REACT-WARNING] Replace component with real class, use constructor for refs
|
||||||
UNSAFE_componentWillMount() {
|
UNSAFE_componentWillMount() { // eslint-disable-line camelcase
|
||||||
Notifier.getSoundForRoom(this.props.roomId).then((soundData) => {
|
Notifier.getSoundForRoom(this.props.roomId).then((soundData) => {
|
||||||
if (!soundData) {
|
if (!soundData) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -42,7 +42,7 @@ export default class SecurityRoomSettingsTab extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: [REACT-WARNING] Move this to constructor
|
// TODO: [REACT-WARNING] Move this to constructor
|
||||||
async UNSAFE_componentWillMount(): void {
|
async UNSAFE_componentWillMount(): void { // eslint-disable-line camelcase
|
||||||
MatrixClientPeg.get().on("RoomState.events", this._onStateEvent);
|
MatrixClientPeg.get().on("RoomState.events", this._onStateEvent);
|
||||||
|
|
||||||
const room = MatrixClientPeg.get().getRoom(this.props.roomId);
|
const room = MatrixClientPeg.get().getRoom(this.props.roomId);
|
||||||
|
|
|
@ -69,7 +69,7 @@ export default class GeneralUserSettingsTab extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: [REACT-WARNING] Move this to constructor
|
// TODO: [REACT-WARNING] Move this to constructor
|
||||||
async UNSAFE_componentWillMount() {
|
async UNSAFE_componentWillMount() { // eslint-disable-line camelcase
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
|
|
||||||
const serverSupportsSeparateAddAndBind = await cli.doesServerSupportSeparateAddAndBind();
|
const serverSupportsSeparateAddAndBind = await cli.doesServerSupportSeparateAddAndBind();
|
||||||
|
|
Loading…
Reference in a new issue