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"
class="flash"
:src="attachment.large_thumb_url || attachment.url"
@playerOpened="setFlashLoaded(true)"
@playerClosed="setFlashLoaded(false)"
@player-opened="setFlashLoaded(true)"
@player-closed="setFlashLoaded(false)"
/>
</span>
</div>

View file

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

View file

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

View file

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

View file

@ -2,7 +2,7 @@
<Modal
v-if="isFormVisible"
class="edit-form-modal-view"
@backdropClicked="closeModal"
@backdrop-clicked="closeModal"
>
<div class="edit-form-modal-panel panel">
<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
return diff + nameAlphabetically + screenNameAlphabetically
/* eslint-disable camelcase */
}).map((user) => ({
user,
displayText: user.screen_name_ui,
@ -124,7 +124,7 @@ export const suggestUsers = ({ dispatch, state }) => {
imageUrl: user.profile_image_url_original,
replacement: '@' + user.screen_name + ' '
}))
/* eslint-enable camelcase */
suggestions = newSuggestions || []
return suggestions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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