manual lint

This commit is contained in:
Henry Jameson 2026-01-06 17:32:22 +02:00
commit 1c53ac84cc
36 changed files with 204 additions and 107 deletions

View file

@ -82,7 +82,9 @@ export default {
contrast: {
required: false,
type: Object,
default: () => ({}),
default: () => ({
/* no-op */
}),
},
showRatio: {
required: false,

View file

@ -5,7 +5,9 @@ const DialogModal = {
type: Boolean,
},
onCancel: {
default: () => {},
default: () => {
/* no-op */
},
type: Function,
},
},

View file

@ -45,7 +45,6 @@ library.add(
)
const NavPanel = {
props: ['forceExpand', 'forceEditMode'],
created() {},
components: {
BookmarkFoldersMenuContent,
ListsMenuContent,

View file

@ -1,7 +1,8 @@
import { flattenDeep, unescape } from 'lodash'
import { flattenDeep, unescape as ldUnescape } from 'lodash'
import HashtagLink from 'src/components/hashtag_link/hashtag_link.vue'
import { MENTIONS_LIMIT } from 'src/components/mentions_line/mentions_line.js'
import MentionsLine from 'src/components/mentions_line/mentions_line.vue'
import StillImage from 'src/components/still-image/still-image.vue'
import StillImageEmojiPopover from 'src/components/still-image/still-image-emoji-popover.vue'
import { convertHtmlToLines } from 'src/services/html_converter/html_line_converter.service.js'
import { convertHtmlToTree } from 'src/services/html_converter/html_tree_converter.service.js'
@ -268,7 +269,7 @@ export default {
const emptyText = item.trim() === ''
if (emptyText) return item
if (!encounteredTextReverse) encounteredTextReverse = true
return unescape(item)
return ldUnescape(item)
} else if (Array.isArray(item)) {
// Handle tag nodes
const [opener, children] = item

View file

@ -17,14 +17,18 @@ const BlockList = withLoadMore({
fetch: (props, $store) => $store.dispatch('fetchBlocks'),
select: (props, $store) =>
get($store.state.users.currentUser, 'blockIds', []),
destroy: () => {},
destroy: () => {
/* no-op */
},
childPropName: 'items',
})(SelectableList)
const MuteList = withLoadMore({
fetch: (props, $store) => $store.dispatch('fetchMutes'),
select: (props, $store) => get($store.state.users.currentUser, 'muteIds', []),
destroy: () => {},
destroy: () => {
/* no-op */
},
childPropName: 'items',
})(SelectableList)

View file

@ -1,6 +1,8 @@
const Confirm = {
props: ['disabled'],
data: () => ({}),
data: () => ({
/* no-op */
}),
methods: {
confirm() {
this.$emit('confirm')

View file

@ -8,7 +8,9 @@ export default {
}),
},
},
data: () => ({}),
data: () => ({
/* no-op */
}),
computed: {
inProgress() {
return this.backupCodes.inProgress

View file

@ -56,8 +56,7 @@ import Preview from '../old_theme_tab/theme_preview.vue'
import VirtualDirectivesTab from './virtual_directives_tab.vue'
// helper for debugging
// eslint-disable-next-line no-unused-vars
const toValue = (x) => JSON.parse(JSON.stringify(x === undefined ? 'null' : x))
// const toValue = (x) => JSON.parse(JSON.stringify(x === undefined ? 'null' : x))
// helper to make states comparable
const normalizeStates = (states) =>

View file

@ -7,8 +7,7 @@ import { serializeShadow } from 'src/services/theme_data/iss_serializer.js'
import { computed, inject, ref, watch } from 'vue'
// helper for debugging
// eslint-disable-next-line no-unused-vars
const toValue = (x) => JSON.parse(JSON.stringify(x === undefined ? 'null' : x))
// const toValue = (x) => JSON.parse(JSON.stringify(x === undefined ? 'null' : x))
export default {
components: {

View file

@ -20,7 +20,7 @@ import {
faThumbtack,
faTimes,
} from '@fortawesome/free-solid-svg-icons'
import { unescape, uniqBy } from 'lodash'
import { unescape as ldUnescape, uniqBy } from 'lodash'
import MentionLink from 'src/components/mention_link/mention_link.vue'
import MentionsLine from 'src/components/mentions_line/mentions_line.vue'
import RichContent from 'src/components/rich_content/rich_content.jsx'
@ -425,7 +425,7 @@ const Status = {
},
replySubject() {
if (!this.status.summary) return ''
const decodedSummary = unescape(this.status.summary)
const decodedSummary = ldUnescape(this.status.summary)
const behavior = this.mergedConfig.subjectLineBehavior
const startsWithRe = decodedSummary.match(/^re[: ]/i)
if ((behavior !== 'noop' && startsWithRe) || behavior === 'masto') {

View file

@ -123,7 +123,12 @@ export default {
this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji })
}
},
doActionWrap(button, close = () => {}) {
doActionWrap(
button,
close = () => {
/* no-op */
},
) {
if (
this.button.interactive ? !this.button.interactive(this.funcArg) : false
)

View file

@ -20,7 +20,9 @@ const StatusActionButtons = {
currentConfirmTitle: '',
currentConfirmOkText: '',
currentConfirmCancelText: '',
currentConfirmAction: () => {},
currentConfirmAction: () => {
/* no-op */
},
randomSeed: genRandomSeed(),
}
},

View file

@ -15,7 +15,7 @@
:func-arg="funcArg"
:get-class="getClass"
:get-component="getComponent"
:close="() => {}"
:close="() => { /* no-op */ }"
:do-action="doAction"
@interacted="e => $emit('interacted')"
/>

View file

@ -54,10 +54,15 @@ const ThreadTree = {
return selfSuspendable
},
reverseLookupTable() {
return this.conversation.reduce((table, status, index) => {
table[status.id] = index
return table
}, {})
return this.conversation.reduce(
(table, status, index) => {
table[status.id] = index
return table
},
{
/* no-op */
},
)
},
currentReplies() {
return this.getReplies(this.status.id).map(({ id }) =>
@ -75,9 +80,15 @@ const ThreadTree = {
statusById(id) {
return this.conversation[this.reverseLookupTable[id]]
},
collapseThread() {},
showThread() {},
showAllSubthreads() {},
collapseThread() {
/* no-op */
},
showThread() {
/* no-op */
},
showAllSubthreads() {
/* no-op */
},
toggleCurrentProp(name) {
this.toggleStatusContentProperty(this.status.id, name)
},

View file

@ -13,7 +13,7 @@ import {
} from '@fortawesome/free-solid-svg-icons'
import isEqual from 'lodash/isEqual'
import merge from 'lodash/merge'
import unescape from 'lodash/unescape'
import ldUnescape from 'lodash/unescape'
import Checkbox from 'src/components/checkbox/checkbox.vue'
import ColorInput from 'src/components/color_input/color_input.vue'
import DialogModal from 'src/components/dialog_modal/dialog_modal.vue'
@ -128,7 +128,7 @@ export default {
newName: user.name_unescaped,
editingName: false,
newBio: unescape(user.description),
newBio: ldUnescape(user.description),
editingBio: false,
newAvatar: null,