manual lint
This commit is contained in:
parent
1654234e32
commit
1c53ac84cc
36 changed files with 204 additions and 107 deletions
|
|
@ -550,7 +550,7 @@ const fetchFriends = ({ id, maxId, sinceId, limit = 20, credentials }) => {
|
|||
}
|
||||
|
||||
const exportFriends = ({ id, credentials }) => {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO refactor this
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
let friends = []
|
||||
|
|
@ -1794,7 +1794,14 @@ export const ProcessedWS = ({
|
|||
return eventTarget
|
||||
}
|
||||
|
||||
export const handleMastoWS = (wsEvent, { onAuthenticated = () => {} } = {}) => {
|
||||
export const handleMastoWS = (
|
||||
wsEvent,
|
||||
{
|
||||
onAuthenticated = () => {
|
||||
/* no-op */
|
||||
},
|
||||
} = {},
|
||||
) => {
|
||||
const { data } = wsEvent
|
||||
if (!data) return
|
||||
const parsedEvent = JSON.parse(data)
|
||||
|
|
|
|||
|
|
@ -9,9 +9,13 @@ const fetchAndUpdate = ({ credentials }) => {
|
|||
(bookmarkFolders) => {
|
||||
useBookmarkFoldersStore().setBookmarkFolders(bookmarkFolders)
|
||||
},
|
||||
() => {},
|
||||
(rej) => {
|
||||
console.error(rej)
|
||||
},
|
||||
)
|
||||
.catch(() => {})
|
||||
.catch((e) => {
|
||||
console.error(e)
|
||||
})
|
||||
}
|
||||
|
||||
const startFetching = ({ credentials, store }) => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { parseLinkHeader } from '@web3-storage/parse-link-header'
|
||||
import escape from 'escape-html'
|
||||
import escapeHtml from 'escape-html'
|
||||
import punycode from 'punycode.js'
|
||||
import { isStatusNotification } from '../notification_utils/notification_utils.js'
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ export const parseUser = (data) => {
|
|||
}
|
||||
|
||||
output.emoji = data.emojis
|
||||
output.name = escape(data.display_name)
|
||||
output.name = escapeHtml(data.display_name)
|
||||
output.name_html = output.name
|
||||
output.name_unescaped = data.display_name
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ export const parseUser = (data) => {
|
|||
output.fields = data.fields
|
||||
output.fields_html = data.fields.map((field) => {
|
||||
return {
|
||||
name: escape(field.name),
|
||||
name: escapeHtml(field.name),
|
||||
value: field.value,
|
||||
}
|
||||
})
|
||||
|
|
@ -367,13 +367,13 @@ export const parseStatus = (data) => {
|
|||
output.retweeted_status = parseStatus(data.reblog)
|
||||
}
|
||||
|
||||
output.summary_raw_html = escape(data.spoiler_text)
|
||||
output.summary_raw_html = escapeHtml(data.spoiler_text)
|
||||
output.external_url = data.url
|
||||
output.poll = data.poll
|
||||
if (output.poll) {
|
||||
output.poll.options = (output.poll.options || []).map((field) => ({
|
||||
...field,
|
||||
title_html: escape(field.title),
|
||||
title_html: escapeHtml(field.title),
|
||||
}))
|
||||
}
|
||||
output.pinned = data.pinned
|
||||
|
|
|
|||
|
|
@ -9,9 +9,13 @@ const fetchAndUpdate = ({ store, credentials }) => {
|
|||
store.commit('setFollowRequests', requests)
|
||||
store.commit('addNewUsers', requests)
|
||||
},
|
||||
() => {},
|
||||
(rej) => {
|
||||
console.error(rej)
|
||||
},
|
||||
)
|
||||
.catch(() => {})
|
||||
.catch((e) => {
|
||||
console.error(e)
|
||||
})
|
||||
}
|
||||
|
||||
const startFetching = ({ credentials, store }) => {
|
||||
|
|
|
|||
|
|
@ -93,12 +93,14 @@ class SwipeAndClickGesture {
|
|||
perpendicularTolerance = 1.0,
|
||||
disableClickThreshold = 1,
|
||||
}) {
|
||||
const nop = () => {}
|
||||
const noop = () => {
|
||||
/* no-op */
|
||||
}
|
||||
this.direction = direction
|
||||
this.swipePreviewCallback = swipePreviewCallback || nop
|
||||
this.swipeEndCallback = swipeEndCallback || nop
|
||||
this.swipeCancelCallback = swipeCancelCallback || nop
|
||||
this.swipelessClickCallback = swipelessClickCallback || nop
|
||||
this.swipePreviewCallback = swipePreviewCallback || noop
|
||||
this.swipeEndCallback = swipeEndCallback || noop
|
||||
this.swipeCancelCallback = swipeCancelCallback || noop
|
||||
this.swipelessClickCallback = swipelessClickCallback || noop
|
||||
this.threshold =
|
||||
typeof threshold === 'function' ? threshold : () => threshold
|
||||
this.disableClickThreshold =
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { unescape } from 'lodash'
|
||||
import { unescape as ldUnescape } from 'lodash'
|
||||
import { getTagName } from './utility.service.js'
|
||||
|
||||
/**
|
||||
|
|
@ -64,7 +64,7 @@ export const convertHtmlToTree = (html = '') => {
|
|||
|
||||
const handleOpen = (tag) => {
|
||||
const curBuf = getCurrentBuffer()
|
||||
const newLevel = [unescape(tag), []]
|
||||
const newLevel = [ldUnescape(tag), []]
|
||||
levels.push(newLevel)
|
||||
curBuf.push(newLevel)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,9 +9,13 @@ const fetchAndUpdate = ({ credentials }) => {
|
|||
(lists) => {
|
||||
useListsStore().setLists(lists)
|
||||
},
|
||||
() => {},
|
||||
(rej) => {
|
||||
console.error(rej)
|
||||
},
|
||||
)
|
||||
.catch(() => {})
|
||||
.catch((e) => {
|
||||
console.error(e)
|
||||
})
|
||||
}
|
||||
|
||||
const startFetching = ({ credentials, store }) => {
|
||||
|
|
|
|||
|
|
@ -77,9 +77,15 @@ const LAZY_STYLE_ID = 'pleroma-lazy-styles'
|
|||
|
||||
export const generateTheme = (inputRuleset, callbacks, debug) => {
|
||||
const {
|
||||
onNewRule = () => {},
|
||||
onLazyFinished = () => {},
|
||||
onEagerFinished = () => {},
|
||||
onNewRule = () => {
|
||||
/* no-op */
|
||||
},
|
||||
onLazyFinished = () => {
|
||||
/* no-op */
|
||||
},
|
||||
onEagerFinished = () => {
|
||||
/* no-op */
|
||||
},
|
||||
} = callbacks
|
||||
|
||||
const themes3 = init({
|
||||
|
|
@ -152,8 +158,12 @@ export const tryLoadCache = async () => {
|
|||
|
||||
export const applyTheme = (
|
||||
input,
|
||||
onEagerFinish = () => {},
|
||||
onFinish = () => {},
|
||||
onEagerFinish = () => {
|
||||
/* no-op */
|
||||
},
|
||||
onFinish = () => {
|
||||
/* no-op */
|
||||
},
|
||||
debug,
|
||||
) => {
|
||||
const eagerStyles = createStyleSheet(EAGER_STYLE_ID, 10)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue