eslint --fix

This commit is contained in:
Henry Jameson 2025-02-04 14:14:31 +02:00
parent bb2de0f567
commit d9aca590bb
38 changed files with 62 additions and 62 deletions

View file

@ -238,8 +238,8 @@
ref="flash" ref="flash"
class="flash" class="flash"
:src="attachment.large_thumb_url || attachment.url" :src="attachment.large_thumb_url || attachment.url"
@playerOpened="setFlashLoaded(true)" @player-opened="setFlashLoaded(true)"
@playerClosed="setFlashLoaded(false)" @player-closed="setFlashLoaded(false)"
/> />
</span> </span>
</div> </div>

View file

@ -15,7 +15,7 @@
:model-value="present" :model-value="present"
:disabled="disabled" :disabled="disabled"
class="opt" class="opt"
@update:modelValue="updateValue(typeof modelValue === 'undefined' ? fallback : undefined)" @update:model-value="updateValue(typeof modelValue === 'undefined' ? fallback : undefined)"
/> />
<div <div
class="input color-input-field" class="input color-input-field"

View file

@ -272,11 +272,11 @@ const conversation = {
}, },
replies () { replies () {
let i = 1 let i = 1
// eslint-disable-next-line camelcase
return reduce(this.conversation, (result, { id, in_reply_to_status_id }) => { return reduce(this.conversation, (result, { id, in_reply_to_status_id }) => {
/* eslint-disable camelcase */
const irid = in_reply_to_status_id const irid = in_reply_to_status_id
/* eslint-enable camelcase */
if (irid) { if (irid) {
result[irid] = result[irid] || [] result[irid] = result[irid] || []
result[irid].push({ result[irid].push({

View file

@ -123,7 +123,7 @@
:controlled-set-media-playing="(newVal) => toggleStatusContentProperty(status.id, 'mediaPlaying', newVal)" :controlled-set-media-playing="(newVal) => toggleStatusContentProperty(status.id, 'mediaPlaying', newVal)"
@goto="setHighlight" @goto="setHighlight"
@toggleExpanded="toggleExpanded" @toggle-expanded="toggleExpanded"
/> />
<div <div
v-if="showOtherRepliesButtonBelowStatus && getReplies(status.id).length > 1" v-if="showOtherRepliesButtonBelowStatus && getReplies(status.id).length > 1"
@ -217,7 +217,7 @@
:toggle-status-content-property="toggleStatusContentProperty" :toggle-status-content-property="toggleStatusContentProperty"
@goto="setHighlight" @goto="setHighlight"
@toggleExpanded="toggleExpanded" @toggle-expanded="toggleExpanded"
/> />
</article> </article>
</div> </div>

View file

@ -2,7 +2,7 @@
<Modal <Modal
v-if="isFormVisible" v-if="isFormVisible"
class="edit-form-modal-view" class="edit-form-modal-view"
@backdropClicked="closeModal" @backdrop-clicked="closeModal"
> >
<div class="edit-form-modal-panel panel"> <div class="edit-form-modal-panel panel">
<div class="panel-heading"> <div class="panel-heading">

View file

@ -116,7 +116,7 @@ export const suggestUsers = ({ dispatch, state }) => {
const screenNameAlphabetically = a.screen_name > b.screen_name ? 1 : -1 const screenNameAlphabetically = a.screen_name > b.screen_name ? 1 : -1
return diff + nameAlphabetically + screenNameAlphabetically return diff + nameAlphabetically + screenNameAlphabetically
/* eslint-disable camelcase */
}).map((user) => ({ }).map((user) => ({
user, user,
displayText: user.screen_name_ui, displayText: user.screen_name_ui,
@ -124,7 +124,7 @@ export const suggestUsers = ({ dispatch, state }) => {
imageUrl: user.profile_image_url_original, imageUrl: user.profile_image_url_original,
replacement: '@' + user.screen_name + ' ' replacement: '@' + user.screen_name + ' '
})) }))
/* eslint-enable camelcase */
suggestions = newSuggestions || [] suggestions = newSuggestions || []
return suggestions return suggestions

View file

@ -86,7 +86,7 @@
:id="name + '-local-font-switcher'" :id="name + '-local-font-switcher'"
:model-value="modelValue?.family" :model-value="modelValue?.family"
class="custom-font" class="custom-font"
@update:modelValue="v => $emit('update:modelValue', { ...(modelValue || {}), family: v })" @update:model-value="v => $emit('update:modelValue', { ...(modelValue || {}), family: v })"
> >
<optgroup <optgroup
:label="$t('settings.style.themes3.font.group-builtin')" :label="$t('settings.style.themes3.font.group-builtin')"

View file

@ -32,8 +32,8 @@
:description="descriptions && descriptions[attachment.id]" :description="descriptions && descriptions[attachment.id]"
:hide-description="size === 'small' || tooManyAttachments && hidingLong" :hide-description="size === 'small' || tooManyAttachments && hidingLong"
:style="itemStyle(attachment.id, row.items)" :style="itemStyle(attachment.id, row.items)"
@setMedia="onMedia" @set-media="onMedia"
@naturalSizeLoad="onNaturalSizeLoad" @natural-size-load="onNaturalSizeLoad"
/> />
</div> </div>
</div> </div>

View file

@ -13,7 +13,7 @@
<Select <Select
class="language-select" class="language-select"
:model-value="controlledLanguage[index]" :model-value="controlledLanguage[index]"
@update:modelValue="val => setLanguageAt(index, val)" @update:model-value="val => setLanguageAt(index, val)"
> >
<option <option
v-for="lang in languages" v-for="lang in languages"

View file

@ -84,7 +84,7 @@
<ListsUserSearch <ListsUserSearch
@results="onSearchResults" @results="onSearchResults"
@loading="onSearchLoading" @loading="onSearchLoading"
@loadingDone="onSearchLoadingDone" @loading-done="onSearchLoadingDone"
/> />
<div <div
v-if="searchLoading" v-if="searchLoading"

View file

@ -2,7 +2,7 @@
<Modal <Modal
v-if="showing" v-if="showing"
class="media-modal-view" class="media-modal-view"
@backdropClicked="hideIfNotSwiped" @backdrop-clicked="hideIfNotSwiped"
> >
<SwipeClick <SwipeClick
v-if="type === 'image'" v-if="type === 'image'"

View file

@ -15,7 +15,7 @@
:model-value="present" :model-value="present"
:disabled="disabled" :disabled="disabled"
class="opt" class="opt"
@update:modelValue="$emit('update:modelValue', !present ? fallback : undefined)" @update:model-value="$emit('update:modelValue', !present ? fallback : undefined)"
/> />
<input <input
:id="name" :id="name"

View file

@ -10,7 +10,7 @@
:model-value="props.modelValue[key]" :model-value="props.modelValue[key]"
:fallback="fallback(key)" :fallback="fallback(key)"
:label="$t('settings.style.themes3.palette.' + key)" :label="$t('settings.style.themes3.palette.' + key)"
@update:modelValue="value => updatePalette(key, value)" @update:model-value="value => updatePalette(key, value)"
/> />
<button <button
class="btn button-default palette-import-button" class="btn button-default palette-import-button"

View file

@ -3,7 +3,7 @@
v-if="isLoggedIn && !resettingForm" v-if="isLoggedIn && !resettingForm"
:is-open="modalActivated" :is-open="modalActivated"
class="post-form-modal-view" class="post-form-modal-view"
@backdropClicked="closeModal" @backdrop-clicked="closeModal"
> >
<div class="post-form-modal-panel panel"> <div class="post-form-modal-panel panel">
<div class="panel-heading"> <div class="panel-heading">

View file

@ -2,7 +2,7 @@ export default {
props: ['user'], props: ['user'],
computed: { computed: {
subscribeUrl () { subscribeUrl () {
// eslint-disable-next-line no-undef
const serverUrl = new URL(this.user.statusnet_profile_url) const serverUrl = new URL(this.user.statusnet_profile_url)
return `${serverUrl.protocol}//${serverUrl.host}/main/ostatus` return `${serverUrl.protocol}//${serverUrl.host}/main/ostatus`
} }

View file

@ -15,7 +15,7 @@
:model-value="present" :model-value="present"
:disabled="disabled" :disabled="disabled"
class="opt" class="opt"
@update:modelValue="$emit('update:modelValue', !present ? fallback : undefined)" @update:model-value="$emit('update:modelValue', !present ? fallback : undefined)"
/> />
<input <input
:id="name" :id="name"

View file

@ -312,8 +312,8 @@
new-upload new-upload
:title="$t('admin_dash.emoji.adding_new')" :title="$t('admin_dash.emoji.adding_new')"
:pack-name="packName" :pack-name="packName"
@updatePackFiles="updatePackFiles" @update-pack-files="updatePackFiles"
@displayError="displayError" @display-error="displayError"
> >
<template #trigger> <template #trigger>
<FAIcon <FAIcon
@ -334,8 +334,8 @@
:shortcode="shortcode" :shortcode="shortcode"
:file="file" :file="file"
:pack-name="packName" :pack-name="packName"
@updatePackFiles="updatePackFiles" @update-pack-files="updatePackFiles"
@displayError="displayError" @display-error="displayError"
> >
<template #trigger> <template #trigger>
<StillImage <StillImage

View file

@ -7,7 +7,7 @@
:model-value="visibleState" :model-value="visibleState"
:disabled="shouldBeDisabled" :disabled="shouldBeDisabled"
:indeterminate="isIndeterminate" :indeterminate="isIndeterminate"
@update:modelValue="update" @update:model-value="update"
> >
<span <span
class="label" class="label"

View file

@ -13,7 +13,7 @@
<Select <Select
:model-value="realDraftMode ? draft :state" :model-value="realDraftMode ? draft :state"
:disabled="disabled" :disabled="disabled"
@update:modelValue="update" @update:model-value="update"
> >
<option <option
v-for="option in realOptions" v-for="option in realOptions"

View file

@ -111,7 +111,7 @@
<Checkbox <Checkbox
:model-value="!!expertLevel" :model-value="!!expertLevel"
@update:modelValue="expertLevel = Number($event)" @update:model-value="expertLevel = Number($event)"
> >
{{ $t("settings.expert_mode") }} {{ $t("settings.expert_mode") }}
</Checkbox> </Checkbox>

View file

@ -158,7 +158,7 @@
:compact="true" :compact="true"
:apply="true" :apply="true"
:disabled="switchInProgress" :disabled="switchInProgress"
@applyPalette="data => setPaletteCustom(data)" @apply-palette="data => setPaletteCustom(data)"
/> />
</template> </template>
<template v-else-if="customThemeVersion === 'v2'"> <template v-else-if="customThemeVersion === 'v2'">
@ -247,7 +247,7 @@
:label="$t('settings.style.fonts.components.interface')" :label="$t('settings.style.fonts.components.interface')"
:fallback="{ family: 'sans-serif' }" :fallback="{ family: 'sans-serif' }"
no-inherit="1" no-inherit="1"
@update:modelValue="v => updateFont('interface', v)" @update:model-value="v => updateFont('interface', v)"
/> />
</li> </li>
<li> <li>
@ -257,7 +257,7 @@
name="input" name="input"
:fallback="{ family: 'inherit' }" :fallback="{ family: 'inherit' }"
:label="$t('settings.style.fonts.components.input')" :label="$t('settings.style.fonts.components.input')"
@update:modelValue="v => updateFont('input', v)" @update:model-value="v => updateFont('input', v)"
/> />
</li> </li>
<li> <li>
@ -267,7 +267,7 @@
name="post" name="post"
:fallback="{ family: 'inherit' }" :fallback="{ family: 'inherit' }"
:label="$t('settings.style.fonts.components.post')" :label="$t('settings.style.fonts.components.post')"
@update:modelValue="v => updateFont('post', v)" @update:model-value="v => updateFont('post', v)"
/> />
</li> </li>
<li> <li>
@ -277,7 +277,7 @@
name="postCode" name="postCode"
:fallback="{ family: 'monospace' }" :fallback="{ family: 'monospace' }"
:label="$t('settings.style.fonts.components.monospace')" :label="$t('settings.style.fonts.components.monospace')"
@update:modelValue="v => updateFont('monospace', v)" @update:model-value="v => updateFont('monospace', v)"
/> />
</li> </li>
<h3>{{ $t('settings.columns') }}</h3> <h3>{{ $t('settings.columns') }}</h3>

View file

@ -72,7 +72,7 @@ const DataImportExportTab = {
// check is it's a local user // check is it's a local user
if (user && user.is_local) { if (user && user.is_local) {
// append the instance address // append the instance address
// eslint-disable-next-line no-undef
return user.screen_name + '@' + location.hostname return user.screen_name + '@' + location.hostname
} }
return user.screen_name return user.screen_name

View file

@ -85,7 +85,7 @@ const MutesAndBlocks = {
// check is it's a local user // check is it's a local user
if (user && user.is_local) { if (user && user.is_local) {
// append the instance address // append the instance address
// eslint-disable-next-line no-undef
return user.screen_name + '@' + location.hostname return user.screen_name + '@' + location.hostname
} }
return user.screen_name return user.screen_name

View file

@ -134,14 +134,14 @@ const ProfileTab = {
note: this.newBio, note: this.newBio,
locked: this.newLocked, locked: this.newLocked,
// Backend notation. // Backend notation.
/* eslint-disable camelcase */
display_name: this.newName, display_name: this.newName,
fields_attributes: this.newFields.filter(el => el != null), fields_attributes: this.newFields.filter(el => el != null),
actor_type: this.actorType, actor_type: this.actorType,
show_role: this.showRole, show_role: this.showRole,
birthday: this.newBirthday || '', birthday: this.newBirthday || '',
show_birthday: this.showBirthday show_birthday: this.showBirthday
/* eslint-enable camelcase */
} }
if (this.emailLanguage) { if (this.emailLanguage) {
@ -190,7 +190,7 @@ const ProfileTab = {
}) })
return return
} }
// eslint-disable-next-line no-undef
const reader = new FileReader() const reader = new FileReader()
reader.onload = ({ target }) => { reader.onload = ({ target }) => {
const img = target.result const img = target.result

View file

@ -147,7 +147,7 @@
> >
<Checkbox <Checkbox
:value="selectedState.has(state)" :value="selectedState.has(state)"
@update:modelValue="(v) => updateSelectedStates(state, v)" @update:model-value="(v) => updateSelectedStates(state, v)"
> >
{{ state }} {{ state }}
</Checkbox> </Checkbox>
@ -337,7 +337,7 @@
:no-preview="true" :no-preview="true"
:compact="true" :compact="true"
:static-vars="staticVars" :static-vars="staticVars"
@subShadowSelected="onSubShadow" @sub-shadow-selected="onSubShadow"
/> />
</div> </div>
</tab-switcher> </tab-switcher>
@ -373,8 +373,8 @@
:model-value="palettes" :model-value="palettes"
:selected-id="selectedPaletteId" :selected-id="selectedPaletteId"
:get-add-value="getNewPalette" :get-add-value="getNewPalette"
@update:modelValue="onPalettesUpdate" @update:model-value="onPalettesUpdate"
@update:selectedId="e => selectedPaletteId = e" @update:selected-id="e => selectedPaletteId = e"
/> />
<div class="list-edit-area"> <div class="list-edit-area">
<StringSetting <StringSetting
@ -393,7 +393,7 @@
key="variables" key="variables"
:label="$t('settings.style.themes3.editor.variables_tab')" :label="$t('settings.style.themes3.editor.variables_tab')"
:model-value="virtualDirectives" :model-value="virtualDirectives"
@update:modelValue="updateVirtualDirectives" @update:model-value="updateVirtualDirectives"
/> />
</tab-switcher> </tab-switcher>
</div> </div>

View file

@ -28,8 +28,8 @@
:model-value="modelValue" :model-value="modelValue"
:selected-id="selectedVirtualDirectiveId" :selected-id="selectedVirtualDirectiveId"
:get-add-value="getNewVirtualDirective" :get-add-value="getNewVirtualDirective"
@update:modelValue="e => emit('update:modelValue', e)" @update:model-value="e => emit('update:modelValue', e)"
@update:selectedId="e => selectedVirtualDirectiveId = e" @update:selected-id="e => selectedVirtualDirectiveId = e"
/> />
<div class="list-edit-area"> <div class="list-edit-area">
<div class="variable-selector"> <div class="variable-selector">

View file

@ -35,7 +35,7 @@
:selected-id="selectedId" :selected-id="selectedId"
:get-add-value="getNewSubshadow" :get-add-value="getNewSubshadow"
:disabled="disabled" :disabled="disabled"
@update:selectedId="onSelectChange" @update:selected-id="onSelectChange"
/> />
</div> </div>
<div class="shadow-tweak"> <div class="shadow-tweak">
@ -170,12 +170,12 @@
:fallback="getColorFallback" :fallback="getColorFallback"
:show-optional-checkbox="false" :show-optional-checkbox="false"
name="shadow" name="shadow"
@update:modelValue="e => updateProperty('color', e)" @update:model-value="e => updateProperty('color', e)"
/> />
<OpacityInput <OpacityInput
:model-value="selected?.alpha" :model-value="selected?.alpha"
:disabled="disabled || !present" :disabled="disabled || !present"
@update:modelValue="e => updateProperty('alpha', e)" @update:model-value="e => updateProperty('alpha', e)"
/> />
<i18n-t <i18n-t
scope="global" scope="global"

View file

@ -403,7 +403,7 @@
:controlled-toggle-showing-long-subject="controlledToggleShowingLongSubject" :controlled-toggle-showing-long-subject="controlledToggleShowingLongSubject"
@mediaplay="addMediaPlaying($event)" @mediaplay="addMediaPlaying($event)"
@mediapause="removeMediaPlaying($event)" @mediapause="removeMediaPlaying($event)"
@parseReady="setHeadTailLinks" @parse-ready="setHeadTailLinks"
/> />
<article <article
@ -539,7 +539,7 @@
v-if="!noHeading && !isPreview" v-if="!noHeading && !isPreview"
:status="status" :status="status"
:replying="replying" :replying="replying"
@toggleReplying="toggleReplying" @toggle-replying="toggleReplying"
/> />
</div> </div>
</div> </div>

View file

@ -52,7 +52,7 @@
:faint="compact" :faint="compact"
:greentext="mergedConfig.greentext" :greentext="mergedConfig.greentext"
:attentions="status.attentions" :attentions="status.attentions"
@parseReady="onParseReady" @parse-ready="onParseReady"
/> />
<button <button

View file

@ -14,7 +14,7 @@
:toggle-showing-tall="toggleShowingTall" :toggle-showing-tall="toggleShowingTall"
:toggle-expanding-subject="toggleExpandingSubject" :toggle-expanding-subject="toggleExpandingSubject"
:toggle-showing-long-subject="toggleShowingLongSubject" :toggle-showing-long-subject="toggleShowingLongSubject"
@parseReady="$emit('parseReady', $event)" @parse-ready="$emit('parseReady', $event)"
> >
<div v-if="status.poll && status.poll.options && !compact"> <div v-if="status.poll && status.poll.options && !compact">
<Poll <Poll

View file

@ -2,7 +2,7 @@
<Modal <Modal
v-if="modalActivated" v-if="modalActivated"
class="status-history-modal-view" class="status-history-modal-view"
@backdropClicked="closeModal" @backdrop-clicked="closeModal"
> >
<div class="status-history-modal-panel panel"> <div class="status-history-modal-panel panel">
<div class="panel-heading"> <div class="panel-heading">

View file

@ -32,7 +32,7 @@
:dive="dive ? () => dive(status.id) : undefined" :dive="dive ? () => dive(status.id) : undefined"
@goto="setHighlight" @goto="setHighlight"
@toggleExpanded="toggleExpanded" @toggle-expanded="toggleExpanded"
/> />
<div <div
v-if="currentReplies.length && threadShowing" v-if="currentReplies.length && threadShowing"

View file

@ -85,7 +85,7 @@ export default {
return this.user.id !== this.$store.state.users.currentUser.id return this.user.id !== this.$store.state.users.currentUser.id
}, },
subscribeUrl () { subscribeUrl () {
// eslint-disable-next-line no-undef
const serverUrl = new URL(this.user.statusnet_profile_url) const serverUrl = new URL(this.user.statusnet_profile_url)
return `${serverUrl.protocol}//${serverUrl.host}/main/ostatus` return `${serverUrl.protocol}//${serverUrl.host}/main/ostatus`
}, },

View file

@ -1,7 +1,7 @@
<template> <template>
<Modal <Modal
v-if="isOpen" v-if="isOpen"
@backdropClicked="closeModal" @backdrop-clicked="closeModal"
> >
<div class="user-reporting-panel panel"> <div class="user-reporting-panel panel">
<div class="panel-heading"> <div class="panel-heading">

View file

@ -1,9 +1,9 @@
import EventTargetPolyfill from '@ungap/event-target' import EventTargetPolyfill from '@ungap/event-target'
try { try {
/* eslint-disable no-new */
new EventTarget() new EventTarget()
/* eslint-enable no-new */
} catch (e) { } catch (e) {
window.EventTarget = EventTargetPolyfill window.EventTarget = EventTargetPolyfill
} }

View file

@ -67,7 +67,7 @@ const mutations = {
// actions // actions
const actions = { const actions = {
// eslint-disable-next-line camelcase
async login ({ state, dispatch, commit }, { access_token }) { async login ({ state, dispatch, commit }, { access_token }) {
commit('setToken', access_token, { root: true }) commit('setToken', access_token, { root: true })
await dispatch('loginUser', access_token, { root: true }) await dispatch('loginUser', access_token, { root: true })

View file

@ -42,7 +42,7 @@ export const newImporter = ({
filePicker.addEventListener('change', event => { filePicker.addEventListener('change', event => {
if (event.target.files[0]) { if (event.target.files[0]) {
const filename = event.target.files[0].name const filename = event.target.files[0].name
// eslint-disable-next-line no-undef
const reader = new FileReader() const reader = new FileReader()
reader.onload = ({ target }) => { reader.onload = ({ target }) => {
try { try {

View file

@ -1,6 +1,6 @@
import { defaultState, mutations, prepareStatus } from '../../../../src/modules/statuses.js' import { defaultState, mutations, prepareStatus } from '../../../../src/modules/statuses.js'
// eslint-disable-next-line camelcase
const makeMockStatus = ({ id, text, type = 'status' }) => { const makeMockStatus = ({ id, text, type = 'status' }) => {
return { return {
id, id,