[build] upgrade eslint to 9.37.0 (#88)
Co-authored-by: tobi <tobi.smethurst@protonmail.com> Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/88 Co-authored-by: Zoë Bijl <moiety@noreply.codeberg.org> Co-committed-by: Zoë Bijl <moiety@noreply.codeberg.org>
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { defineMessages } from 'react-intl';
|
||||
import { defineMessages } from "react-intl";
|
||||
|
||||
const messages = defineMessages({
|
||||
unexpectedTitle: { id: 'alert.unexpected.title', defaultMessage: 'Oops!' },
|
||||
unexpectedMessage: { id: 'alert.unexpected.message', defaultMessage: 'An unexpected error occurred.' },
|
||||
rateLimitedTitle: { id: 'alert.rate_limited.title', defaultMessage: 'Rate limited' },
|
||||
rateLimitedMessage: { id: 'alert.rate_limited.message', defaultMessage: 'Please retry after {retry_time, time, medium}.' },
|
||||
unexpectedTitle: { id: "alert.unexpected.title", defaultMessage: "Oops!" },
|
||||
unexpectedMessage: { id: "alert.unexpected.message", defaultMessage: "An unexpected error occurred." },
|
||||
rateLimitedTitle: { id: "alert.rate_limited.title", defaultMessage: "Rate limited" },
|
||||
rateLimitedMessage: { id: "alert.rate_limited.message", defaultMessage: "Please retry after {retry_time, time, medium}." },
|
||||
});
|
||||
|
||||
export const ALERT_SHOW = 'ALERT_SHOW';
|
||||
export const ALERT_DISMISS = 'ALERT_DISMISS';
|
||||
export const ALERT_CLEAR = 'ALERT_CLEAR';
|
||||
export const ALERT_NOOP = 'ALERT_NOOP';
|
||||
export const ALERT_SHOW = "ALERT_SHOW";
|
||||
export const ALERT_DISMISS = "ALERT_DISMISS";
|
||||
export const ALERT_CLEAR = "ALERT_CLEAR";
|
||||
export const ALERT_NOOP = "ALERT_NOOP";
|
||||
|
||||
export const dismissAlert = alert => ({
|
||||
type: ALERT_DISMISS,
|
||||
@@ -36,11 +36,11 @@ export const showAlertForError = (error, skipNotFound = false) => {
|
||||
}
|
||||
|
||||
// Rate limit errors
|
||||
if (status === 429 && headers['x-ratelimit-reset']) {
|
||||
if (status === 429 && headers["x-ratelimit-reset"]) {
|
||||
return showAlert({
|
||||
title: messages.rateLimitedTitle,
|
||||
message: messages.rateLimitedMessage,
|
||||
values: { 'retry_time': new Date(headers['x-ratelimit-reset']) },
|
||||
values: { "retry_time": new Date(headers["x-ratelimit-reset"]) },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user