Update linters (#1897)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
renovate[bot] 2022-03-05 20:40:00 +01:00 committed by GitHub
parent 6b84cf6b59
commit e9df9b6672
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 222 additions and 254 deletions

View file

@ -45,13 +45,13 @@ export const ImportHistoryButton: React.FC = () => {
uploadInput.current.value = ''
}, [uploadInput])
const handleUpload = async (event: React.ChangeEvent<HTMLInputElement>) => {
const handleUpload = (event: React.ChangeEvent<HTMLInputElement>): void => {
const { validity, files } = event.target
if (files && files[0] && validity.valid) {
const file = files[0]
setFilename(file.name)
if (file.type !== 'application/json' && file.type !== '') {
await dispatchUiNotification('common.errorOccurred', 'landing.history.modal.importHistoryError.textWithFile', {
void dispatchUiNotification('common.errorOccurred', 'landing.history.modal.importHistoryError.textWithFile', {
contentI18nOptions: {
fileName
}
@ -60,7 +60,7 @@ export const ImportHistoryButton: React.FC = () => {
return
}
const fileReader = new FileReader()
fileReader.onload = async (event) => {
fileReader.onload = (event) => {
if (event.target && event.target.result) {
try {
const result = event.target.result as string
@ -71,7 +71,7 @@ export const ImportHistoryButton: React.FC = () => {
onImportHistory(data.entries)
} else {
// probably a newer version we can't support
await dispatchUiNotification(
void dispatchUiNotification(
'common.errorOccurred',
'landing.history.modal.importHistoryError.tooNewVersion',
{
@ -88,7 +88,7 @@ export const ImportHistoryButton: React.FC = () => {
}
resetInputField()
} catch {
await dispatchUiNotification(
void dispatchUiNotification(
'common.errorOccurred',
'landing.history.modal.importHistoryError.textWithFile',
{
@ -102,7 +102,7 @@ export const ImportHistoryButton: React.FC = () => {
}
fileReader.readAsText(file)
} else {
await dispatchUiNotification(
void dispatchUiNotification(
'common.errorOccurred',
'landing.history.modal.importHistoryError.textWithOutFile',
{}