biome check --write
This commit is contained in:
parent
9262e803ec
commit
b05a501236
225 changed files with 1177 additions and 1266 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import { each, map, concat, last, get } from 'lodash'
|
||||
import { concat, each, get, last, map } from 'lodash'
|
||||
import {
|
||||
parseStatus,
|
||||
parseSource,
|
||||
parseUser,
|
||||
parseNotification,
|
||||
parseAttachment,
|
||||
parseChat,
|
||||
parseLinkHeaderPagination,
|
||||
parseNotification,
|
||||
parseSource,
|
||||
parseStatus,
|
||||
parseUser,
|
||||
} from '../entity_normalizer/entity_normalizer.service.js'
|
||||
import { RegistrationError, StatusCodeError } from '../errors/errors'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import bookmarkFoldersFetcher from '../../services/bookmark_folders_fetcher/bookmark_folders_fetcher.service.js'
|
||||
import followRequestFetcher from '../../services/follow_request_fetcher/follow_request_fetcher.service'
|
||||
import listsFetcher from '../../services/lists_fetcher/lists_fetcher.service.js'
|
||||
import apiService, {
|
||||
getMastodonSocketURI,
|
||||
ProcessedWS,
|
||||
} from '../api/api.service.js'
|
||||
import timelineFetcher from '../timeline_fetcher/timeline_fetcher.service.js'
|
||||
import notificationsFetcher from '../notifications_fetcher/notifications_fetcher.service.js'
|
||||
import followRequestFetcher from '../../services/follow_request_fetcher/follow_request_fetcher.service'
|
||||
import listsFetcher from '../../services/lists_fetcher/lists_fetcher.service.js'
|
||||
import bookmarkFoldersFetcher from '../../services/bookmark_folders_fetcher/bookmark_folders_fetcher.service.js'
|
||||
import timelineFetcher from '../timeline_fetcher/timeline_fetcher.service.js'
|
||||
|
||||
const backendInteractorService = (credentials) => ({
|
||||
startFetchingTimeline({
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useBookmarkFoldersStore } from 'src/stores/bookmark_folders.js'
|
||||
import apiService from '../api/api.service.js'
|
||||
import { promiseInterval } from '../promise_interval/promise_interval.js'
|
||||
import { useBookmarkFoldersStore } from 'src/stores/bookmark_folders.js'
|
||||
|
||||
const fetchAndUpdate = ({ credentials }) => {
|
||||
return apiService
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { invertLightness, contrastRatio, convert } from 'chromatism'
|
||||
import { contrastRatio, convert, invertLightness } from 'chromatism'
|
||||
|
||||
// useful for visualizing color when debugging
|
||||
// const consoleColor = (color) => console.debug('%c##########', 'background: ' + color + '; color: ' + color)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { reduce, find } from 'lodash'
|
||||
import { find, reduce } from 'lodash'
|
||||
|
||||
export const replaceWord = (str, toReplace, replacement) => {
|
||||
return str.slice(0, toReplace.start) + replacement + str.slice(toReplace.end)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import {
|
||||
showDesktopNotification as swDesktopNotification,
|
||||
closeDesktopNotification as swCloseDesktopNotification,
|
||||
isSWSupported,
|
||||
closeDesktopNotification as swCloseDesktopNotification,
|
||||
showDesktopNotification as swDesktopNotification,
|
||||
} from '../sw/sw.js'
|
||||
|
||||
const state = { failCreateNotif: false }
|
||||
|
||||
export const showDesktopNotification = (rootState, desktopNotificationOpts) => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import escape from 'escape-html'
|
||||
import { parseLinkHeader } from '@web3-storage/parse-link-header'
|
||||
import { isStatusNotification } from '../notification_utils/notification_utils.js'
|
||||
import escape from 'escape-html'
|
||||
import punycode from 'punycode.js'
|
||||
import { isStatusNotification } from '../notification_utils/notification_utils.js'
|
||||
|
||||
/** NOTICE! **
|
||||
* Do not initialize UI-generated data here.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { getTagName } from './utility.service.js'
|
||||
import { unescape } from 'lodash'
|
||||
import { getTagName } from './utility.service.js'
|
||||
|
||||
/**
|
||||
* This is a not-so-tiny purpose-built HTML parser/processor. This parses html
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import languagesObject from '../../i18n/messages'
|
||||
import ISO6391 from 'iso-639-1'
|
||||
import _ from 'lodash'
|
||||
import languagesObject from '../../i18n/messages'
|
||||
|
||||
const specialLanguageCodes = {
|
||||
pdc: 'en',
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
import { muteFilterHits } from '../status_parser/status_parser.js'
|
||||
import { showDesktopNotification } from '../desktop_notification_utils/desktop_notification_utils.js'
|
||||
import { useI18nStore } from 'src/stores/i18n.js'
|
||||
import { useAnnouncementsStore } from 'src/stores/announcements'
|
||||
|
||||
import FaviconService from 'src/services/favicon_service/favicon_service.js'
|
||||
import { useAnnouncementsStore } from 'src/stores/announcements'
|
||||
import { useI18nStore } from 'src/stores/i18n.js'
|
||||
import { showDesktopNotification } from '../desktop_notification_utils/desktop_notification_utils.js'
|
||||
import { muteFilterHits } from '../status_parser/status_parser.js'
|
||||
|
||||
export const ACTIONABLE_NOTIFICATION_TYPES = new Set([
|
||||
'mention',
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import * as DateUtils from 'src/services/date_utils/date_utils.js'
|
||||
import { uniq } from 'lodash'
|
||||
import * as DateUtils from 'src/services/date_utils/date_utils.js'
|
||||
|
||||
const pollFallbackValues = {
|
||||
pollType: 'single',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { defineAsyncComponent, shallowReactive, h } from 'vue'
|
||||
import { defineAsyncComponent, h, shallowReactive } from 'vue'
|
||||
|
||||
/* By default async components don't have any way to recover, if component is
|
||||
* failed, it is failed forever. This helper tries to remedy that by recreating
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { init, getEngineChecksum } from '../theme_data/theme_data_3.service.js'
|
||||
import { getCssRules } from '../theme_data/css_utils.js'
|
||||
import { defaultState } from 'src/modules/default_config_state.js'
|
||||
import { chunk, throttle } from 'lodash'
|
||||
import localforage from 'localforage'
|
||||
import { chunk, throttle } from 'lodash'
|
||||
import { defaultState } from 'src/modules/default_config_state.js'
|
||||
import { getCssRules } from '../theme_data/css_utils.js'
|
||||
import { getEngineChecksum, init } from '../theme_data/theme_data_3.service.js'
|
||||
|
||||
// On platforms where this is not supported, it will return undefined
|
||||
// Otherwise it will return an array
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { unroll } from './iss_utils.js'
|
||||
import { deserializeShadow } from './iss_deserializer.js'
|
||||
import { unroll } from './iss_utils.js'
|
||||
|
||||
export const serializeShadow = (s) => {
|
||||
if (typeof s === 'object') {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { invertLightness, brightness } from 'chromatism'
|
||||
import { brightness, invertLightness } from 'chromatism'
|
||||
import { alphaBlend, mixrgb } from '../color_convert/color_convert.js'
|
||||
/* This is a definition of all layer combinations
|
||||
* each key is a topmost layer, each value represents layer underneath
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { convert, brightness } from 'chromatism'
|
||||
import { brightness, convert } from 'chromatism'
|
||||
import {
|
||||
alphaBlend,
|
||||
arithmeticBlend,
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { convert, brightness, contrastRatio } from 'chromatism'
|
||||
import { brightness, contrastRatio, convert } from 'chromatism'
|
||||
import {
|
||||
rgb2hex,
|
||||
rgba2css,
|
||||
alphaBlendLayers,
|
||||
getCssColor,
|
||||
getTextColor,
|
||||
relativeLuminance,
|
||||
getCssColor,
|
||||
rgb2hex,
|
||||
rgba2css,
|
||||
} from '../color_convert/color_convert.js'
|
||||
import { LAYERS, DEFAULT_OPACITY, SLOT_INHERITANCE } from './pleromafe.js'
|
||||
import { DEFAULT_OPACITY, LAYERS, SLOT_INHERITANCE } from './pleromafe.js'
|
||||
|
||||
/*
|
||||
* # What's all this?
|
||||
|
|
|
|||
|
|
@ -1,29 +1,28 @@
|
|||
import { convert, brightness } from 'chromatism'
|
||||
import { brightness, convert } from 'chromatism'
|
||||
import sum from 'hash-sum'
|
||||
import { flattenDeep, sortBy } from 'lodash'
|
||||
import {
|
||||
alphaBlend,
|
||||
getTextColor,
|
||||
rgba2css,
|
||||
mixrgb,
|
||||
relativeLuminance,
|
||||
rgba2css,
|
||||
} from '../color_convert/color_convert.js'
|
||||
import { deserializeShadow } from './iss_deserializer.js'
|
||||
|
||||
import {
|
||||
findRules,
|
||||
genericRuleToSelector,
|
||||
getAllPossibleCombinations,
|
||||
normalizeCombination,
|
||||
unroll,
|
||||
} from './iss_utils.js'
|
||||
import {
|
||||
colorFunctions,
|
||||
shadowFunctions,
|
||||
process,
|
||||
shadowFunctions,
|
||||
} from './theme3_slot_functions.js'
|
||||
|
||||
import {
|
||||
unroll,
|
||||
getAllPossibleCombinations,
|
||||
genericRuleToSelector,
|
||||
normalizeCombination,
|
||||
findRules,
|
||||
} from './iss_utils.js'
|
||||
import { deserializeShadow } from './iss_deserializer.js'
|
||||
|
||||
// Ensuring the order of components
|
||||
const components = {
|
||||
Root: null,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import { camelCase } from 'lodash'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import apiService from '../api/api.service.js'
|
||||
import { promiseInterval } from '../promise_interval/promise_interval.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
|
||||
const update = ({
|
||||
store,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { hex2rgb } from '../color_convert/color_convert.js'
|
||||
|
||||
const highlightStyle = (prefs) => {
|
||||
if (prefs === undefined) return
|
||||
const { color, type } = prefs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue