logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/
commit: f659c9c123622a5206f17f6f17711f0572fc2119
parent 1f56401a8ef04a1dfdc8e6405aa43a022588cbb2
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date:   Tue,  4 Feb 2025 13:52:31 +0000

Merge branch 'renovate/major-eslint-monorepo' into 'develop'

Update dependency eslint to v9

See merge request pleroma/pleroma-fe!2031

Diffstat:

D.eslintignore2--
D.eslintrc.js27---------------------------
Mbuild/utils.js14+++-----------
Mbuild/webpack.base.conf.js5+++--
Aeslint.config.mjs37+++++++++++++++++++++++++++++++++++++
Mpackage.json9+++++----
Msrc/App.js4++--
Msrc/boot/after_store.js2+-
Msrc/boot/routes.js2+-
Msrc/components/attachment/attachment.js4++--
Msrc/components/attachment/attachment.vue4++--
Msrc/components/chat_list_item/chat_list_item.js2+-
Msrc/components/checkbox/checkbox.vue2+-
Msrc/components/color_input/color_input.vue2+-
Msrc/components/conversation/conversation.js13+++++--------
Msrc/components/conversation/conversation.vue4++--
Msrc/components/edit_status_modal/edit_status_modal.vue2+-
Msrc/components/emoji_input/emoji_input.js2+-
Msrc/components/emoji_input/suggestor.js2--
Msrc/components/emoji_picker/emoji_picker.js2+-
Msrc/components/emoji_reactions/emoji_reactions.js2+-
Msrc/components/font_control/font_control.vue2+-
Msrc/components/gallery/gallery.vue4++--
Msrc/components/interface_language_switcher/interface_language_switcher.vue2+-
Msrc/components/list/list.vue2+-
Msrc/components/lists_edit/lists_edit.js4++--
Msrc/components/lists_edit/lists_edit.vue2+-
Msrc/components/media_modal/media_modal.vue2+-
Msrc/components/mention_link/mention_link.js2++
Msrc/components/modal/modal.vue1+
Msrc/components/moderation_tools/moderation_tools.js2+-
Msrc/components/opacity_input/opacity_input.vue2+-
Msrc/components/palette_editor/palette_editor.vue6+++---
Msrc/components/poll/poll.js2+-
Msrc/components/poll/poll_form.js2+-
Msrc/components/popover/popover.js14+++++++-------
Msrc/components/post_status_form/post_status_form.js8++++----
Msrc/components/post_status_modal/post_status_modal.vue2+-
Msrc/components/remote_follow/remote_follow.js1-
Msrc/components/roundness_input/roundness_input.vue2+-
Msrc/components/settings_modal/admin_tabs/emoji_tab.js8++++----
Msrc/components/settings_modal/admin_tabs/emoji_tab.vue8++++----
Msrc/components/settings_modal/helpers/boolean_setting.vue2+-
Msrc/components/settings_modal/helpers/choice_setting.vue2+-
Msrc/components/settings_modal/settings_modal.vue2+-
Msrc/components/settings_modal/tabs/appearance_tab.js10+++++-----
Msrc/components/settings_modal/tabs/appearance_tab.vue10+++++-----
Msrc/components/settings_modal/tabs/data_import_export_tab.js3+--
Msrc/components/settings_modal/tabs/mutes_and_blocks_tab.js3+--
Msrc/components/settings_modal/tabs/profile_tab.js7+++----
Msrc/components/settings_modal/tabs/security_tab/mfa.js2+-
Msrc/components/settings_modal/tabs/security_tab/security_tab.js2+-
Msrc/components/settings_modal/tabs/style_tab/style_tab.js6+++---
Msrc/components/settings_modal/tabs/style_tab/style_tab.vue10+++++-----
Msrc/components/settings_modal/tabs/style_tab/virtual_directives_tab.vue4++--
Msrc/components/settings_modal/tabs/theme_tab/theme_tab.js6+++---
Msrc/components/shadow_control/shadow_control.js2+-
Msrc/components/shadow_control/shadow_control.vue6+++---
Msrc/components/shout_panel/shout_panel.js2+-
Msrc/components/status/status.vue4++--
Msrc/components/status_action_buttons/buttons_definitions.js6+++---
Msrc/components/status_body/status_body.vue2+-
Msrc/components/status_content/status_content.vue2+-
Msrc/components/status_history_modal/status_history_modal.vue2+-
Msrc/components/status_popover/status_popover.js4++--
Msrc/components/thread_tree/thread_tree.js2+-
Msrc/components/thread_tree/thread_tree.vue2+-
Msrc/components/timeline/timeline.js2+-
Msrc/components/user_card/user_card.js1-
Msrc/components/user_list_menu/user_list_menu.js2+-
Msrc/components/user_reporting_modal/user_reporting_modal.vue2+-
Msrc/components/video_attachment/video_attachment.js2+-
Msrc/components/who_to_follow/who_to_follow.js2+-
Msrc/components/who_to_follow_panel/who_to_follow_panel.js4++--
Msrc/i18n/service_worker_messages.js1-
Msrc/lib/event_target_polyfill.js10++++++----
Msrc/main.js1+
Msrc/modules/adminSettings.js12++++++------
Msrc/modules/api.js4++--
Msrc/modules/auth_flow.js18+++++++++---------
Msrc/modules/chats.js22+++++++++++-----------
Msrc/modules/config.js12++++++------
Msrc/modules/notifications.js15+++++++++------
Msrc/modules/profileConfig.js2+-
Msrc/modules/serverSideStorage.js15++++++++++-----
Msrc/modules/statuses.js24++++++++++++------------
Msrc/modules/users.js4++--
Msrc/services/desktop_notification_utils/desktop_notification_utils.js2+-
Msrc/services/errors/errors.js2+-
Msrc/services/export_import/export_import.js2+-
Msrc/services/follow_manipulate/follow_manipulate.js4++--
Msrc/services/gesture_service/gesture_service.js2+-
Msrc/services/html_converter/utility.service.js2+-
Msrc/services/lists_fetcher/lists_fetcher.service.js2+-
Msrc/services/style_setter/style_setter.js14+++++++-------
Msrc/services/sw/sw.js2+-
Msrc/services/theme_data/iss_deserializer.js2+-
Msrc/services/theme_data/iss_serializer.js2+-
Msrc/services/theme_data/iss_utils.js2+-
Msrc/services/theme_data/theme3_slot_functions.js2+-
Msrc/services/theme_data/theme_data.service.js18+++++++++---------
Msrc/services/theme_data/theme_data_3.service.js4++--
Msrc/stores/interface.js2+-
Msrc/stores/lists.js4++--
Msrc/stores/polls.js2+-
Msrc/sw.js2+-
Mtest/unit/specs/components/user_profile.spec.js2+-
Mtest/unit/specs/modules/statuses.spec.js2+-
Mtest/unit/specs/services/html_converter/html_line_converter.spec.js2+-
Myarn.lock233+++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
110 files changed, 427 insertions(+), 363 deletions(-)

diff --git a/.eslintignore b/.eslintignore @@ -1,2 +0,0 @@ -build/*.js -config/*.js diff --git a/.eslintrc.js b/.eslintrc.js @@ -1,27 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - parser: '@babel/eslint-parser', - sourceType: 'module' - }, - // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style - extends: [ - 'standard', - 'plugin:vue/recommended' - ], - // required to lint *.vue files - plugins: [ - 'vue' - ], - // add your custom rules here - rules: { - // allow paren-less arrow functions - 'arrow-parens': 0, - // allow async-await - 'generator-star-spacing': 0, - // allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - 'vue/require-prop-types': 0, - 'vue/multi-word-component-names': 0 - } -} diff --git a/build/utils.js b/build/utils.js @@ -34,26 +34,18 @@ exports.cssLoaders = function (options) { use: generateLoaders(['css-loader', 'postcss-loader', 'less-loader']), }, { - test: /\.sass$/, + test: /\.scss$/, use: generateLoaders([ 'css-loader', 'postcss-loader', { loader: 'sass-loader', options: { - indentedSyntax: true + api: 'modern' } } ]) - }, - { - test: /\.scss$/, - use: generateLoaders(['css-loader', 'postcss-loader', 'sass-loader']) - }, - { - test: /\.styl(us)?$/, - use: generateLoaders(['css-loader', 'postcss-loader', 'stylus-loader']), - }, + } ] } diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js @@ -108,8 +108,9 @@ module.exports = { filename: 'sw-pleroma.js' }), new ESLintPlugin({ - extensions: ['js', 'vue'], - formatter: require('eslint-formatter-friendly') + formatter: require('eslint-formatter-friendly'), + overrideConfigFile: path.resolve(__dirname, '..', 'eslint.config.mjs'), + configType: 'flat' }), new StylelintPlugin({}), new VueLoaderPlugin(), diff --git a/eslint.config.mjs b/eslint.config.mjs @@ -0,0 +1,37 @@ +import vue from "eslint-plugin-vue"; +import js from "@eslint/js"; +import globals from "globals"; + + +export default [ + ...vue.configs['flat/recommended'], + js.configs.recommended, + { + files: ["**/*.js", "**/*.mjs", "**/*.vue"], + ignores: ["build/*.js", "config/*.js"], + + languageOptions: { + ecmaVersion: 2024, + sourceType: "module", + + parserOptions: { + parser: "@babel/eslint-parser", + }, + globals: { + ...globals.browser, + ...globals.mocha, + ...globals.chai, + ...globals.commonjs, + ...globals.serviceworker + } + }, + + rules: { + 'arrow-parens': 0, + 'generator-star-spacing': 0, + 'no-debugger': 0, + 'vue/require-prop-types': 0, + 'vue/multi-word-component-names': 0, + } + } +] diff --git a/package.json b/package.json @@ -12,8 +12,8 @@ "e2e": "node test/e2e/runner.js", "test": "yarn run unit && yarn run e2e", "stylelint": "yarn exec stylelint '**/*.scss' '**/*.vue'", - "lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs", - "lint-fix": "eslint --fix --ext .js,.vue src test/unit/specs test/e2e/specs" + "lint": "eslint src test/unit/specs test/e2e/specs", + "lint-fix": "eslint --fix src test/unit/specs test/e2e/specs" }, "dependencies": { "@babel/runtime": "7.26.7", @@ -32,6 +32,7 @@ "click-outside-vue3": "4.0.1", "cropperjs": "1.6.2", "escape-html": "1.0.3", + "globals": "^15.14.0", "hash-sum": "^2.0.0", "js-cookie": "3.0.5", "localforage": "1.10.0", @@ -74,14 +75,14 @@ "css-loader": "7.1.2", "css-minimizer-webpack-plugin": "7.0.0", "custom-event-polyfill": "1.0.7", - "eslint": "8.57.1", + "eslint": "9.19.0", "eslint-config-standard": "17.1.0", "eslint-formatter-friendly": "7.0.0", "eslint-plugin-import": "2.31.0", "eslint-plugin-n": "15.7.0", "eslint-plugin-promise": "6.6.0", "eslint-plugin-vue": "9.32.0", - "eslint-webpack-plugin": "3.2.0", + "eslint-webpack-plugin": "4.2.0", "eventsource-polyfill": "0.9.6", "express": "4.21.2", "function-bind": "1.1.2", diff --git a/src/App.js b/src/App.js @@ -47,10 +47,10 @@ export default { mobileActivePanel: 'timeline' }), watch: { - themeApplied (value) { + themeApplied () { this.removeSplash() }, - layoutType (value) { + layoutType () { document.getElementById('modal').classList = ['-' + this.layoutType] } }, diff --git a/src/boot/after_store.js b/src/boot/after_store.js @@ -79,7 +79,7 @@ const getInstanceConfig = async ({ store }) => { } } -const getBackendProvidedConfig = async ({ store }) => { +const getBackendProvidedConfig = async () => { try { const res = await window.fetch('/api/pleroma/frontend_configurations') if (res.ok) { diff --git a/src/boot/routes.js b/src/boot/routes.js @@ -43,7 +43,7 @@ export default (store) => { { name: 'root', path: '/', - redirect: _to => { + redirect: () => { return (store.state.users.currentUser ? store.state.instance.redirectRootLogin : store.state.instance.redirectRootNoLogin) || '/main/all' diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js @@ -145,7 +145,7 @@ const Attachment = { window.open(target.href, '_blank') } }, - openModal (event) { + openModal () { if (this.useModal) { this.$emit('setMedia') useMediaViewerStore().setCurrentMedia(this.attachment) @@ -153,7 +153,7 @@ const Attachment = { window.open(this.attachment.url) } }, - openModalForce (event) { + openModalForce () { this.$emit('setMedia') useMediaViewerStore().setCurrentMedia(this.attachment) }, diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue @@ -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> diff --git a/src/components/chat_list_item/chat_list_item.js b/src/components/chat_list_item/chat_list_item.js @@ -52,7 +52,7 @@ const ChatListItem = { } }, methods: { - openChat (_e) { + openChat () { if (this.chat.id) { this.$router.push({ name: 'chat', diff --git a/src/components/checkbox/checkbox.vue b/src/components/checkbox/checkbox.vue @@ -53,7 +53,7 @@ export default { } }, methods: { - onTransitionEnd (e) { + onTransitionEnd () { if (!this.indeterminate) { this.indeterminateTransitionFix = false } diff --git a/src/components/color_input/color_input.vue b/src/components/color_input/color_input.vue @@ -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" diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js @@ -114,7 +114,7 @@ const conversation = { suspendable () { if (this.isTreeView) { return Object.entries(this.statusContentProperties) - .every(([k, prop]) => !prop.replying && prop.mediaPlaying.length === 0) + .every(([, prop]) => !prop.replying && prop.mediaPlaying.length === 0) } if (this.$refs.statusComponent && this.$refs.statusComponent[0]) { return this.$refs.statusComponent.every(s => s.suspendable) @@ -272,11 +272,8 @@ 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 */ + + return reduce(this.conversation, (result, { id, in_reply_to_status_id: irid }) => { if (irid) { result[irid] = result[irid] || [] result[irid].push({ @@ -381,7 +378,7 @@ const conversation = { this.resetDisplayState() } }, - virtualHidden (value) { + virtualHidden () { this.$store.dispatch( 'setVirtualHeight', { statusId: this.statusId, height: `${this.$el.clientHeight}px` } @@ -477,7 +474,7 @@ const conversation = { // nothing found, fall back to toplevel return this.topLevel[0] ? this.topLevel[0].id : undefined }, - diveIntoStatus (id, preventScroll) { + diveIntoStatus (id) { this.tryScrollTo(id) }, diveToTopLevel () { diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue @@ -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> diff --git a/src/components/edit_status_modal/edit_status_modal.vue b/src/components/edit_status_modal/edit_status_modal.vue @@ -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"> diff --git a/src/components/emoji_input/emoji_input.js b/src/components/emoji_input/emoji_input.js @@ -265,7 +265,7 @@ const EmojiInput = { } }, watch: { - showSuggestions: function (newValue, oldValue) { + showSuggestions: function (newValue) { this.$emit('shown', newValue) if (newValue) { this.$refs.suggestorPopover.showPopover() diff --git a/src/components/emoji_input/suggestor.js b/src/components/emoji_input/suggestor.js @@ -116,7 +116,6 @@ 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 +123,6 @@ export const suggestUsers = ({ dispatch, state }) => { imageUrl: user.profile_image_url_original, replacement: '@' + user.screen_name + ' ' })) - /* eslint-enable camelcase */ suggestions = newSuggestions || [] return suggestions diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js @@ -352,7 +352,7 @@ const EmojiPicker = { }, allEmojiGroups () { return Object.entries(this.allCustomGroups) - .map(([_, v]) => v) + .map(([, v]) => v) .concat(this.unicodeEmojiGroups) }, stickerPickerEnabled () { diff --git a/src/components/emoji_reactions/emoji_reactions.js b/src/components/emoji_reactions/emoji_reactions.js @@ -71,7 +71,7 @@ const EmojiReactions = { unreact (emoji) { this.$store.dispatch('unreactWithEmoji', { id: this.status.id, emoji }) }, - async emojiOnClick (emoji, event) { + async emojiOnClick (emoji) { if (!this.loggedIn) return await this.fetchEmojiReactionsByIfMissing() diff --git a/src/components/font_control/font_control.vue b/src/components/font_control/font_control.vue @@ -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')" diff --git a/src/components/gallery/gallery.vue b/src/components/gallery/gallery.vue @@ -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> diff --git a/src/components/interface_language_switcher/interface_language_switcher.vue b/src/components/interface_language_switcher/interface_language_switcher.vue @@ -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" diff --git a/src/components/list/list.vue b/src/components/list/list.vue @@ -37,7 +37,7 @@ export default { }, getClass: { type: Function, - default: item => '' + default: () => '' }, nonInteractive: { type: Boolean, diff --git a/src/components/lists_edit/lists_edit.js b/src/components/lists_edit/lists_edit.js @@ -104,10 +104,10 @@ const ListsNew = { removeUser (userId) { useListsStore().removeListAccount({ accountId: userId, listId: this.id }) }, - onSearchLoading (results) { + onSearchLoading () { this.searchLoading = true }, - onSearchLoadingDone (results) { + onSearchLoadingDone () { this.searchLoading = false }, onSearchResults (results) { diff --git a/src/components/lists_edit/lists_edit.vue b/src/components/lists_edit/lists_edit.vue @@ -84,7 +84,7 @@ <ListsUserSearch @results="onSearchResults" @loading="onSearchLoading" - @loadingDone="onSearchLoadingDone" + @loading-done="onSearchLoadingDone" /> <div v-if="searchLoading" diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue @@ -2,7 +2,7 @@ <Modal v-if="showing" class="media-modal-view" - @backdropClicked="hideIfNotSwiped" + @backdrop-clicked="hideIfNotSwiped" > <SwipeClick v-if="type === 'image'" diff --git a/src/components/mention_link/mention_link.js b/src/components/mention_link/mention_link.js @@ -96,12 +96,14 @@ const MentionLink = { }, style () { if (this.highlight) { + /* eslint-disable no-unused-vars */ const { backgroundColor, backgroundPosition, backgroundImage, ...rest } = highlightStyle(this.highlight) + /* eslint-enable no-unused-vars */ return rest } }, diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue @@ -25,6 +25,7 @@ export default { default: false } }, + emits: ['backdropClicked'], computed: { classes () { return { diff --git a/src/components/moderation_tools/moderation_tools.js b/src/components/moderation_tools/moderation_tools.js @@ -100,7 +100,7 @@ const ModerationTools = { const user = this.user const { id, name } = user store.state.api.backendInteractor.deleteUser({ user }) - .then(e => { + .then(() => { this.$store.dispatch('markStatusesAsDeleted', status => user.id === status.user.id) const isProfile = this.$route.name === 'external-user-profile' || this.$route.name === 'user-profile' const isTargetUser = this.$route.params.name === name || this.$route.params.id === id diff --git a/src/components/opacity_input/opacity_input.vue b/src/components/opacity_input/opacity_input.vue @@ -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" diff --git a/src/components/palette_editor/palette_editor.vue b/src/components/palette_editor/palette_editor.vue @@ -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" @@ -87,7 +87,7 @@ const paletteExporter = newExporter({ }) const paletteImporter = newImporter({ accept: '.json', - onImport (parsed, filename) { + onImport (parsed) { emit('update:modelValue', parsed) } }) @@ -100,7 +100,7 @@ const importPalette = () => { paletteImporter.importData() } -const applyPalette = (data) => { +const applyPalette = () => { emit('applyPalette', getExportedObject()) } diff --git a/src/components/poll/poll.js b/src/components/poll/poll.js @@ -107,7 +107,7 @@ export default { this.loading = true usePollsStore().votePoll( { id: this.statusId, pollId: this.poll.id, choices: this.choiceIndices } - ).then(poll => { + ).then(() => { this.loading = false }) } diff --git a/src/components/poll/poll_form.js b/src/components/poll/poll_form.js @@ -105,7 +105,7 @@ export default { } return false }, - deleteOption (index, event) { + deleteOption (index) { if (this.options.length > 2) { this.options.splice(index, 1) } diff --git a/src/components/popover/popover.js b/src/components/popover/popover.js @@ -280,7 +280,7 @@ const Popover = { this.updateStyles() }, 1) }, - onMouseenter (e) { + onMouseenter () { if (this.trigger === 'hover') { this.lockReEntry = false clearTimeout(this.graceTimeout) @@ -288,12 +288,12 @@ const Popover = { this.showPopover() } }, - onMouseleave (e) { + onMouseleave () { if (this.trigger === 'hover' && this.childrenShown.size === 0) { this.graceTimeout = setTimeout(() => this.hidePopover(), 1) } }, - onMouseenterContent (e) { + onMouseenterContent () { if (this.trigger === 'hover' && !this.lockReEntry) { this.lockReEntry = true clearTimeout(this.graceTimeout) @@ -301,12 +301,12 @@ const Popover = { this.showPopover() } }, - onMouseleaveContent (e) { + onMouseleaveContent () { if (this.trigger === 'hover' && this.childrenShown.size === 0) { this.graceTimeout = setTimeout(() => this.hidePopover(), 1) } }, - onClick (e) { + onClick () { if (this.trigger === 'click') { if (this.hidden) { this.showPopover() @@ -324,10 +324,10 @@ const Popover = { this.hidePopover() if (this.parentPopover) this.parentPopover.onClickOutside(e) }, - onScroll (e) { + onScroll () { this.updateStyles() }, - onResize (e) { + onResize () { const content = this.$refs.content if (!content) return if (this.oldSize.width !== content.offsetWidth || this.oldSize.height !== content.offsetHeight) { diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js @@ -433,7 +433,7 @@ const PostStatusForm = { if (this.preview) this.previewStatus() this.saveable = false }, - async postStatus (event, newStatus, opts = {}) { + async postStatus (event, newStatus) { if (this.posting && !this.optimisticPosting) { return } if (this.disableSubmit) { return } if (this.emojiInputShown) { return } @@ -459,7 +459,7 @@ const PostStatusForm = { try { await this.setAllMediaDescriptions() - } catch (e) { + } catch { this.error = this.$t('post_status.media_description_error') this.posting = false return @@ -603,7 +603,7 @@ const PostStatusForm = { this.showDropIcon = 'hide' } }, - fileDragStop (e) { + fileDragStop () { // The false-setting is done with delay because just using leave-events // directly caused unwanted flickering, this is not perfect either but // much less noticable. @@ -618,7 +618,7 @@ const PostStatusForm = { this.showDropIcon = 'show' } }, - onEmojiInputInput (e) { + onEmojiInputInput () { this.$nextTick(() => { this.resize(this.$refs.textarea) }) diff --git a/src/components/post_status_modal/post_status_modal.vue b/src/components/post_status_modal/post_status_modal.vue @@ -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"> diff --git a/src/components/remote_follow/remote_follow.js b/src/components/remote_follow/remote_follow.js @@ -2,7 +2,6 @@ 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` } diff --git a/src/components/roundness_input/roundness_input.vue b/src/components/roundness_input/roundness_input.vue @@ -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" diff --git a/src/components/settings_modal/admin_tabs/emoji_tab.js b/src/components/settings_modal/admin_tabs/emoji_tab.js @@ -93,7 +93,7 @@ const EmojiTab = { this.displayError(resp.error) return Promise.reject(resp) } - }).then(done => { + }).then(() => { this.$refs.createPackPopover.hidePopover() this.packName = this.newPackName @@ -110,7 +110,7 @@ const EmojiTab = { this.displayError(resp.error) return Promise.reject(resp) } - }).then(done => { + }).then(() => { delete this.editedMetadata[this.packName] this.deleteModalVisible = false @@ -167,7 +167,7 @@ const EmojiTab = { return resultingPromise }) - .then(finished => allPacks) + .then(() => allPacks) .catch(data => { this.displayError(data) }) @@ -226,7 +226,7 @@ const EmojiTab = { this.displayError(resp.error) return Promise.reject(resp) } - }).then(done => { + }).then(() => { this.packName = this.remotePackDownloadAs this.remotePackDownloadAs = '' }) diff --git a/src/components/settings_modal/admin_tabs/emoji_tab.vue b/src/components/settings_modal/admin_tabs/emoji_tab.vue @@ -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 diff --git a/src/components/settings_modal/helpers/boolean_setting.vue b/src/components/settings_modal/helpers/boolean_setting.vue @@ -7,7 +7,7 @@ :model-value="visibleState" :disabled="shouldBeDisabled" :indeterminate="isIndeterminate" - @update:modelValue="update" + @update:model-value="update" > <span class="label" diff --git a/src/components/settings_modal/helpers/choice_setting.vue b/src/components/settings_modal/helpers/choice_setting.vue @@ -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" diff --git a/src/components/settings_modal/settings_modal.vue b/src/components/settings_modal/settings_modal.vue @@ -111,7 +111,7 @@ <Checkbox :model-value="!!expertLevel" - @update:modelValue="expertLevel = Number($event)" + @update:model-value="expertLevel = Number($event)" > {{ $t("settings.expert_mode") }} </Checkbox> diff --git a/src/components/settings_modal/tabs/appearance_tab.js b/src/components/settings_modal/tabs/appearance_tab.js @@ -67,7 +67,7 @@ const AppearanceTab = { value: i - 1, label: this.$t(`settings.style.themes3.hacks.forced_roundness_mode_${mode}`) })), - underlayOverrideModes: ['none', 'opaque', 'transparent'].map((mode, i) => ({ + underlayOverrideModes: ['none', 'opaque', 'transparent'].map((mode) => ({ key: mode, value: mode, label: this.$t(`settings.style.themes3.hacks.underlay_override_mode_${mode}`) @@ -234,7 +234,7 @@ const AppearanceTab = { cOrange, wallpaper } - return Object.fromEntries(Object.entries(result).filter(([k, v]) => v)) + return Object.fromEntries(Object.entries(result).filter(([, v]) => v)) }) return result }, @@ -276,7 +276,7 @@ const AppearanceTab = { const { customTheme, customThemeSource } = this.mergedConfig return customTheme != null || customThemeSource != null }, - isCustomStyleUsed (name) { + isCustomStyleUsed () { const { styleCustomData } = this.mergedConfig return styleCustomData != null }, @@ -348,7 +348,7 @@ const AppearanceTab = { useInterfaceStore().setPaletteCustom(data) this.userPalette = data }, - resetTheming (name) { + resetTheming () { useInterfaceStore().setStyle('stock') }, previewTheme (key, version, input) { @@ -378,7 +378,7 @@ const AppearanceTab = { directives: Object.fromEntries( Object .entries(directives) - .filter(([k, v]) => k && k !== 'name') + .filter(([k]) => k && k !== 'name') .map(([k, v]) => ['--' + k, 'color | ' + v]) ) } diff --git a/src/components/settings_modal/tabs/appearance_tab.vue b/src/components/settings_modal/tabs/appearance_tab.vue @@ -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> diff --git a/src/components/settings_modal/tabs/data_import_export_tab.js b/src/components/settings_modal/tabs/data_import_export_tab.js @@ -72,7 +72,6 @@ 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 @@ -80,7 +79,7 @@ const DataImportExportTab = { }, addBackup () { this.$store.state.api.backendInteractor.addBackup() - .then((res) => { + .then(() => { this.addedBackup = true this.addBackupError = false }) diff --git a/src/components/settings_modal/tabs/mutes_and_blocks_tab.js b/src/components/settings_modal/tabs/mutes_and_blocks_tab.js @@ -85,7 +85,6 @@ 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 @@ -126,7 +125,7 @@ const MutesAndBlocks = { return urls.filter(url => !this.user.domainMutes.includes(url)) }, queryKnownDomains (query) { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { resolve(this.knownDomains.filter(url => url.toLowerCase().includes(query))) }) }, diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js @@ -133,15 +133,14 @@ const ProfileTab = { const params = { 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) { @@ -167,7 +166,7 @@ const ProfileTab = { } return false }, - deleteField (index, event) { + deleteField (index) { this.newFields.splice(index, 1) }, uploadFile (slot, e) { @@ -190,7 +189,7 @@ const ProfileTab = { }) return } - // eslint-disable-next-line no-undef + const reader = new FileReader() reader.onload = ({ target }) => { const img = target.result diff --git a/src/components/settings_modal/tabs/security_tab/mfa.js b/src/components/settings_modal/tabs/security_tab/mfa.js @@ -89,7 +89,7 @@ const Mfa = { this.backupCodes.getNewCodes = true }, confirmBackupCodes () { // confirm getting new backup codes - this.fetchBackupCodes().then((res) => { + this.fetchBackupCodes().then(() => { this.backupCodes.getNewCodes = false }) }, diff --git a/src/components/settings_modal/tabs/security_tab/security_tab.js b/src/components/settings_modal/tabs/security_tab/security_tab.js @@ -124,7 +124,7 @@ const SecurityTab = { }, addAlias () { this.$store.state.api.backendInteractor.addAlias({ alias: this.addAliasTarget }) - .then((res) => { + .then(() => { this.addedAlias = true this.addAliasError = false this.addAliasTarget = '' diff --git a/src/components/settings_modal/tabs/style_tab/style_tab.js b/src/components/settings_modal/tabs/style_tab/style_tab.js @@ -78,14 +78,14 @@ export default { Preview, VirtualDirectivesTab }, - setup (props, context) { + setup () { const exports = {} const interfaceStore = useInterfaceStore() // All rules that are made by editor const allEditedRules = ref(interfaceStore.styleDataUsed || {}) const styleDataUsed = computed(() => interfaceStore.styleDataUsed) - watch([styleDataUsed], (value) => { + watch([styleDataUsed], () => { onImport(interfaceStore.styleDataUsed) }, { once: true }) @@ -227,7 +227,7 @@ export default { componentKeysAll .map( key => [key, componentsContext(key).default] - ).filter(([key, component]) => !component.virtual && !component.notEditable) + ).filter(([, component]) => !component.virtual && !component.notEditable) ) exports.componentsMap = componentsMap const componentKeys = [...componentsMap.keys()] diff --git a/src/components/settings_modal/tabs/style_tab/style_tab.vue b/src/components/settings_modal/tabs/style_tab/style_tab.vue @@ -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> diff --git a/src/components/settings_modal/tabs/style_tab/virtual_directives_tab.vue b/src/components/settings_modal/tabs/style_tab/virtual_directives_tab.vue @@ -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"> diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.js b/src/components/settings_modal/tabs/theme_tab/theme_tab.js @@ -480,7 +480,7 @@ export default { } this.dismissWarning() }, - loadThemeFromLocalStorage (confirmLoadSource = false, forceSnapshot = false) { + loadThemeFromLocalStorage (confirmLoadSource = false) { const theme = this.themeDataUsed?.source if (theme) { this.loadTheme( @@ -536,7 +536,7 @@ export default { this.tempImportFile = parsed this.loadTheme(parsed, 'file', forceSource) }, - onImportFailure (result) { + onImportFailure () { useInterfaceStore().pushGlobalNotice({ messageKey: 'settings.invalid_theme_imported', level: 'error' }) }, importValidator (parsed) { @@ -757,7 +757,7 @@ export default { } }, selected () { - this.selectedTheme = Object.entries(this.availableStyles).find(([k, s]) => { + this.selectedTheme = Object.entries(this.availableStyles).find(([, s]) => { if (Array.isArray(s)) { return s[0] === this.selected } else { diff --git a/src/components/shadow_control/shadow_control.js b/src/components/shadow_control/shadow_control.js @@ -151,7 +151,7 @@ export default { } }, watch: { - selected (value) { + selected () { this.$emit('subShadowSelected', this.selectedId) } }, diff --git a/src/components/shadow_control/shadow_control.vue b/src/components/shadow_control/shadow_control.vue @@ -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" diff --git a/src/components/shout_panel/shout_panel.js b/src/components/shout_panel/shout_panel.js @@ -38,7 +38,7 @@ const shoutPanel = { } }, watch: { - messages (newVal) { + messages () { const scrollEl = this.$el.querySelector('.chat-window') if (!scrollEl) return if (scrollEl.scrollTop + scrollEl.offsetHeight + 20 > scrollEl.scrollHeight) { diff --git a/src/components/status/status.vue b/src/components/status/status.vue @@ -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> diff --git a/src/components/status_action_buttons/buttons_definitions.js b/src/components/status_action_buttons/buttons_definitions.js @@ -109,7 +109,7 @@ export const BUTTONS = [{ status.user.id === currentUser.id && PUBLIC_SCOPES.has(status.visibility) }, - action ({ status, dispatch, emit }) { + action ({ status, dispatch }) { if (status.pinned) { return dispatch('unpinStatus', { id: status.id }) } else { @@ -130,7 +130,7 @@ export const BUTTONS = [{ ? 'status.unbookmark' : 'status.bookmark', if: ({ loggedIn }) => loggedIn, - action ({ status, dispatch, emit }) { + action ({ status, dispatch }) { if (status.bookmarked) { return dispatch('unbookmark', { id: status.id }) } else { @@ -175,7 +175,7 @@ export const BUTTONS = [{ currentUser.privileges.includes('messages_delete') ) }, - confirm: ({ status, getters }) => getters.mergedConfig.modalOnDelete, + confirm: ({ getters }) => getters.mergedConfig.modalOnDelete, confirmStrings: { title: 'status.delete_confirm_title', body: 'status.delete_confirm', diff --git a/src/components/status_body/status_body.vue b/src/components/status_body/status_body.vue @@ -52,7 +52,7 @@ :faint="compact" :greentext="mergedConfig.greentext" :attentions="status.attentions" - @parseReady="onParseReady" + @parse-ready="onParseReady" /> <button diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue @@ -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 diff --git a/src/components/status_history_modal/status_history_modal.vue b/src/components/status_history_modal/status_history_modal.vue @@ -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"> diff --git a/src/components/status_popover/status_popover.js b/src/components/status_popover/status_popover.js @@ -34,8 +34,8 @@ const StatusPopover = { return } this.$store.dispatch('fetchStatus', this.statusId) - .then(data => (this.error = false)) - .catch(e => (this.error = true)) + .then(() => (this.error = false)) + .catch(() => (this.error = true)) } } }, diff --git a/src/components/thread_tree/thread_tree.js b/src/components/thread_tree/thread_tree.js @@ -81,7 +81,7 @@ const ThreadTree = { toggleCurrentProp (name) { this.toggleStatusContentProperty(this.status.id, name) }, - setCurrentProp (name, newVal) { + setCurrentProp (name) { this.setStatusContentProperty(this.status.id, name) } } diff --git a/src/components/thread_tree/thread_tree.vue b/src/components/thread_tree/thread_tree.vue @@ -32,7 +32,7 @@ :dive="dive ? () => dive(status.id) : undefined" @goto="setHighlight" - @toggleExpanded="toggleExpanded" + @toggle-expanded="toggleExpanded" /> <div v-if="currentReplies.length && threadShowing" diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js @@ -241,7 +241,7 @@ const Timeline = { // statuses will be nearby statuses before and after it this.virtualScrollIndex = approxIndex }, - scrollLoad (e) { + scrollLoad () { const bodyBRect = document.body.getBoundingClientRect() const height = Math.max(bodyBRect.height, -(bodyBRect.y)) if (this.timeline.loading === false && diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js @@ -85,7 +85,6 @@ 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` }, diff --git a/src/components/user_list_menu/user_list_menu.js b/src/components/user_list_menu/user_list_menu.js @@ -81,7 +81,7 @@ const UserListMenu = { const user = this.user const { id, name } = user store.state.api.backendInteractor.deleteUser({ user }) - .then(e => { + .then(() => { this.$store.dispatch('markStatusesAsDeleted', status => user.id === status.user.id) const isProfile = this.$route.name === 'external-user-profile' || this.$route.name === 'user-profile' const isTargetUser = this.$route.params.name === name || this.$route.params.id === id diff --git a/src/components/user_reporting_modal/user_reporting_modal.vue b/src/components/user_reporting_modal/user_reporting_modal.vue @@ -1,7 +1,7 @@ <template> <Modal v-if="isOpen" - @backdropClicked="closeModal" + @backdrop-clicked="closeModal" > <div class="user-reporting-panel panel"> <div class="panel-heading"> diff --git a/src/components/video_attachment/video_attachment.js b/src/components/video_attachment/video_attachment.js @@ -24,7 +24,7 @@ const VideoAttachment = { } this.$emit('play') }, - onPaused (e) { + onPaused () { this.$emit('pause') }, setHasAudio (e) { diff --git a/src/components/who_to_follow/who_to_follow.js b/src/components/who_to_follow/who_to_follow.js @@ -15,7 +15,7 @@ const WhoToFollow = { }, methods: { showWhoToFollow (reply) { - reply.forEach((i, index) => { + reply.forEach((i) => { this.$store.state.api.backendInteractor.fetchUser({ id: i.acct }) .then((externalUser) => { if (!externalUser.error) { diff --git a/src/components/who_to_follow_panel/who_to_follow_panel.js b/src/components/who_to_follow_panel/who_to_follow_panel.js @@ -54,7 +54,7 @@ const WhoToFollowPanel = { } }, watch: { - user: function (user, oldUser) { + user: function () { if (this.suggestionsEnabled) { getWhoToFollow(this) } @@ -62,7 +62,7 @@ const WhoToFollowPanel = { }, mounted: function () { - this.usersToFollow = new Array(3).fill().map(x => ( + this.usersToFollow = new Array(3).fill().map(() => ( { img: this.$store.state.instance.defaultAvatar, name: '', diff --git a/src/i18n/service_worker_messages.js b/src/i18n/service_worker_messages.js @@ -1,4 +1,3 @@ -/* eslint-disable import/no-webpack-loader-syntax */ // This module exports only the notification part of the i18n, // which is useful for the service worker diff --git a/src/lib/event_target_polyfill.js b/src/lib/event_target_polyfill.js @@ -1,9 +1,11 @@ import EventTargetPolyfill from '@ungap/event-target' try { - /* eslint-disable no-new */ - new EventTarget() - /* eslint-enable no-new */ -} catch (e) { + // for some reason eslint both likes and dislikes + // no-new here so we just call something useless + // so it stops reporting this file + const et = new EventTarget() + et.dispatchEvent() +} catch { window.EventTarget = EventTargetPolyfill } diff --git a/src/main.js b/src/main.js @@ -1,3 +1,4 @@ +/* global process */ import { createStore } from 'vuex' import { createPinia } from 'pinia' diff --git a/src/modules/adminSettings.js b/src/modules/adminSettings.js @@ -60,7 +60,7 @@ const adminSettingsStorage = { } }, actions: { - loadFrontendsStuff ({ state, rootState, dispatch, commit }) { + loadFrontendsStuff ({ rootState, commit }) { rootState.api.backendInteractor.fetchAvailableFrontends() .then(frontends => commit('setAvailableFrontends', { frontends })) }, @@ -84,7 +84,7 @@ const adminSettingsStorage = { .then(backendDescriptions => dispatch('setInstanceAdminDescriptions', { backendDescriptions })) } }, - setInstanceAdminSettings ({ state, commit, dispatch }, { backendDbConfig }) { + setInstanceAdminSettings ({ state, commit }, { backendDbConfig }) { const config = state.config || {} const modifiedPaths = new Set() backendDbConfig.configs.forEach(c => { @@ -108,7 +108,7 @@ const adminSettingsStorage = { commit('updateAdminSettings', { config, modifiedPaths }) commit('resetAdminDraft') }, - setInstanceAdminDescriptions ({ state, commit, dispatch }, { backendDescriptions }) { + setInstanceAdminDescriptions ({ commit }, { backendDescriptions }) { const convert = ({ children, description, label, key = '<ROOT>', group, suggestions }, path, acc) => { const newPath = group ? [group, key] : [key] const obj = { description, label, suggestions } @@ -127,7 +127,7 @@ const adminSettingsStorage = { // This action takes draft state, diffs it with live config state and then pushes // only differences between the two. Difference detection only work up to subkey (third) level. - pushAdminDraft ({ rootState, state, commit, dispatch }) { + pushAdminDraft ({ rootState, state, dispatch }) { // TODO cleanup paths in modifiedPaths const convert = (value) => { if (typeof value !== 'object') { @@ -177,7 +177,7 @@ const adminSettingsStorage = { .then(() => rootState.api.backendInteractor.fetchInstanceDBConfig()) .then(backendDbConfig => dispatch('setInstanceAdminSettings', { backendDbConfig })) }, - pushAdminSetting ({ rootState, state, commit, dispatch }, { path, value }) { + pushAdminSetting ({ rootState, dispatch }, { path, value }) { const [group, key, ...rest] = Array.isArray(path) ? path : path.split(/\./g) const clone = {} // not actually cloning the entire thing to avoid excessive writes set(clone, rest, value) @@ -205,7 +205,7 @@ const adminSettingsStorage = { .then(() => rootState.api.backendInteractor.fetchInstanceDBConfig()) .then(backendDbConfig => dispatch('setInstanceAdminSettings', { backendDbConfig })) }, - resetAdminSetting ({ rootState, state, commit, dispatch }, { path }) { + resetAdminSetting ({ rootState, state, dispatch }, { path }) { const [group, key, subkey] = path.split(/\./g) state.modifiedPaths.delete(path) diff --git a/src/modules/api.js b/src/modules/api.js @@ -27,7 +27,7 @@ const api = { addFetcher (state, { fetcherName, fetcher }) { state.fetchers[fetcherName] = fetcher }, - removeFetcher (state, { fetcherName, fetcher }) { + removeFetcher (state, { fetcherName }) { state.fetchers[fetcherName].stop() delete state.fetchers[fetcherName] }, @@ -294,7 +294,7 @@ const api = { setWsToken (store, token) { store.commit('setWsToken', token) }, - initializeSocket ({ dispatch, commit, state, rootState }) { + initializeSocket ({ commit, state, rootState }) { // Set up websocket connection const token = state.wsToken if (rootState.instance.shoutAvailable && typeof token !== 'undefined' && state.socket === null) { diff --git a/src/modules/auth_flow.js b/src/modules/auth_flow.js @@ -19,19 +19,19 @@ const resetState = (state) => { // getters const getters = { - settings: (state, getters) => { + settings: (state) => { return state.settings }, - requiredPassword: (state, getters, rootState) => { + requiredPassword: (state) => { return state.strategy === PASSWORD_STRATEGY }, - requiredToken: (state, getters, rootState) => { + requiredToken: (state) => { return state.strategy === TOKEN_STRATEGY }, - requiredTOTP: (state, getters, rootState) => { + requiredTOTP: (state) => { return state.strategy === TOTP_STRATEGY }, - requiredRecovery: (state, getters, rootState) => { + requiredRecovery: (state) => { return state.strategy === RECOVERY_STRATEGY } } @@ -67,10 +67,10 @@ 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 }) + + async login ({ state, dispatch, commit }, { access_token: accessToken }) { + commit('setToken', accessToken, { root: true }) + await dispatch('loginUser', accessToken, { root: true }) resetState(state) } } diff --git a/src/modules/chats.js b/src/modules/chats.js @@ -53,7 +53,7 @@ const chats = { stopFetchingChats ({ commit }) { commit('setChatListFetcher', { fetcher: undefined }) }, - fetchChats ({ dispatch, rootState, commit }, params = {}) { + fetchChats ({ dispatch, rootState }) { return rootState.api.backendInteractor.chats() .then(({ chats }) => { dispatch('addNewChats', { chats }) @@ -73,13 +73,13 @@ const chats = { }, // Opened Chats - startFetchingCurrentChat ({ commit, dispatch }, { fetcher }) { + startFetchingCurrentChat ({ dispatch }, { fetcher }) { dispatch('setCurrentChatFetcher', { fetcher }) }, - setCurrentChatFetcher ({ rootState, commit }, { fetcher }) { + setCurrentChatFetcher ({ commit }, { fetcher }) { commit('setCurrentChatFetcher', { fetcher }) }, - addOpenedChat ({ rootState, commit, dispatch }, { chat }) { + addOpenedChat ({ commit, dispatch }, { chat }) { commit('addOpenedChat', { dispatch, chat: parseChat(chat) }) dispatch('addNewUsers', [chat.account]) }, @@ -89,7 +89,7 @@ const chats = { resetChatNewMessageCount ({ commit }, value) { commit('resetChatNewMessageCount', value) }, - clearCurrentChat ({ rootState, commit, dispatch }, value) { + clearCurrentChat ({ commit }) { commit('setCurrentChatId', { chatId: undefined }) commit('setCurrentChatFetcher', { fetcher: undefined }) }, @@ -111,7 +111,7 @@ const chats = { dispatch('clearCurrentChat') commit('resetChats', { commit }) }, - clearOpenedChats ({ rootState, commit, dispatch, rootGetters }) { + clearOpenedChats ({ commit }) { commit('clearOpenedChats', { commit }) }, handleMessageError ({ commit }, value) { @@ -122,7 +122,7 @@ const chats = { } }, mutations: { - setChatListFetcher (state, { commit, fetcher }) { + setChatListFetcher (state, { fetcher }) { const prevFetcher = state.chatListFetcher if (prevFetcher) { prevFetcher.stop() @@ -136,7 +136,7 @@ const chats = { } state.fetcher = fetcher && fetcher() }, - addOpenedChat (state, { _dispatch, chat }) { + addOpenedChat (state, { chat }) { state.currentChatId = chat.id state.openedChats[chat.id] = chat @@ -165,7 +165,7 @@ const chats = { } }) }, - updateChat (state, { _dispatch, chat: updatedChat, _rootGetters }) { + updateChat (state, { chat: updatedChat }) { const chat = getChatById(state, updatedChat.id) if (chat) { chat.lastMessage = updatedChat.lastMessage @@ -175,7 +175,7 @@ const chats = { if (!chat) { state.chatList.data.unshift(updatedChat) } state.chatList.idStore[updatedChat.id] = updatedChat }, - deleteChat (state, { _dispatch, id, _rootGetters }) { + deleteChat (state, { id }) { state.chats.data = state.chats.data.filter(conversation => conversation.last_status.id !== id ) @@ -206,7 +206,7 @@ const chats = { chatService.deleteMessage(chatMessageService, messageId) } }, - resetChatNewMessageCount (state, _value) { + resetChatNewMessageCount (state) { const chatMessageService = state.openedChatMessageServices[state.currentChatId] chatService.resetNewMessageCount(chatMessageService) }, diff --git a/src/modules/config.js b/src/modules/config.js @@ -38,13 +38,13 @@ export const multiChoiceProperties = [ // caching the instance default properties export const instanceDefaultProperties = Object.entries(defaultState) - .filter(([key, value]) => value === undefined) - .map(([key, value]) => key) + .filter(([, value]) => value === undefined) + .map(([key]) => key) const config = { state: { ...defaultState }, getters: { - defaultConfig (state, getters, rootState, rootGetters) { + defaultConfig (state, getters, rootState) { const { instance } = rootState return { ...defaultState, @@ -58,7 +58,7 @@ const config = { return { ...defaultConfig, // Do not override with undefined - ...Object.fromEntries(Object.entries(state).filter(([k, v]) => v !== undefined)) + ...Object.fromEntries(Object.entries(state).filter(([, v]) => v !== undefined)) } } }, @@ -94,10 +94,10 @@ const config = { name => dispatch('setOption', { name, value: data[name] }) ) }, - setHighlight ({ commit, dispatch }, { user, color, type }) { + setHighlight ({ commit }, { user, color, type }) { commit('setHighlight', { user, color, type }) }, - setOptionTemporarily ({ commit, dispatch, state, rootState }, { name, value }) { + setOptionTemporarily ({ commit, dispatch, state }, { name, value }) { if (useInterfaceStore().temporaryChangesTimeoutId !== null) { console.warn('Can\'t track more than one temporary change') return diff --git a/src/modules/notifications.js b/src/modules/notifications.js @@ -36,7 +36,10 @@ export const notifications = { }) }, clearNotifications (state) { - state = emptyNotifications() + const blankState = defaultState() + Object.keys(state).forEach(k => { + state[k] = blankState[k] + }) }, updateNotificationsMinMaxId (state, id) { state.maxId = id > state.maxId ? id : state.maxId @@ -67,7 +70,7 @@ export const notifications = { } }, actions: { - addNewNotifications (store, { notifications, older }) { + addNewNotifications (store, { notifications }) { const { commit, dispatch, state, rootState } = store const validNotifications = notifications.filter((notification) => { // If invalid notification, update ids but don't add it to store @@ -130,10 +133,10 @@ export const notifications = { } } }, - setNotificationsLoading ({ rootState, commit }, { value }) { + setNotificationsLoading ({ commit }, { value }) { commit('setNotificationsLoading', { value }) }, - setNotificationsSilence ({ rootState, commit }, { value }) { + setNotificationsSilence ({ commit }, { value }) { commit('setNotificationsSilence', { value }) }, markNotificationsAsSeen ({ rootState, state, commit }) { @@ -155,14 +158,14 @@ export const notifications = { closeDesktopNotification(rootState, { id }) }) }, - dismissNotificationLocal ({ rootState, commit }, { id }) { + dismissNotificationLocal ({ commit }, { id }) { commit('dismissNotification', { id }) }, dismissNotification ({ rootState, commit }, { id }) { commit('dismissNotification', { id }) rootState.api.backendInteractor.dismissNotification({ id }) }, - updateNotification ({ rootState, commit }, { id, updater }) { + updateNotification ({ commit }, { id, updater }) { commit('updateNotification', { id, updater }) } } diff --git a/src/modules/profileConfig.js b/src/modules/profileConfig.js @@ -118,7 +118,7 @@ const profileConfig = { } }, actions: { - setProfileOption ({ rootState, state, commit, dispatch }, { name, value }) { + setProfileOption ({ rootState, state, commit }, { name, value }) { const oldValue = get(state, name) const map = settingsMap[name] if (!map) throw new Error('Invalid server-side setting') diff --git a/src/modules/serverSideStorage.js b/src/modules/serverSideStorage.js @@ -200,7 +200,7 @@ const _mergeJournal = (...journals) => { .sort((a, b) => a.timestamp > b.timestamp ? 1 : -1) } -export const _mergePrefs = (recent, stale, allFlagKeys) => { +export const _mergePrefs = (recent, stale) => { if (!stale) return recent if (!recent) return stale const { _journal: recentJournal, ...recentData } = recent @@ -217,7 +217,7 @@ export const _mergePrefs = (recent, stale, allFlagKeys) => { */ const resultOutput = { ...recentData } const totalJournal = _mergeJournal(staleJournal, recentJournal) - totalJournal.forEach(({ path, timestamp, operation, command, args }) => { + totalJournal.forEach(({ path, operation, args }) => { if (path.startsWith('_')) { console.error(`journal contains entry to edit internal (starts with _) field '${path}', something is incorrect here, ignoring.`) return @@ -303,10 +303,13 @@ export const _doMigrations = (cache) => { } export const mutations = { - clearServerSideStorage (state, userData) { - state = { ...cloneDeep(defaultState) } + clearServerSideStorage (state) { + const blankState = { ...cloneDeep(defaultState) } + Object.keys(state).forEach(k => { + state[k] = blankState[k] + }) }, - setServerSideStorage (state, userData, test) { + setServerSideStorage (state, userData) { const live = userData.storage state.raw = live let cache = state.cache @@ -334,8 +337,10 @@ export const mutations = { if (!needUpload && recent && stale) { console.debug('Checking if data needs merging...') // discarding timestamps and versions + /* eslint-disable no-unused-vars */ const { _timestamp: _0, _version: _1, ...recentData } = recent const { _timestamp: _2, _version: _3, ...staleData } = stale + /* eslint-enable no-unused-vars */ dirty = !isEqual(recentData, staleData) console.debug(`Data ${dirty ? 'needs' : 'doesn\'t need'} merging`) } diff --git a/src/modules/statuses.js b/src/modules/statuses.js @@ -223,7 +223,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us return status } - const favoriteStatus = (favorite, counter) => { + const favoriteStatus = (favorite) => { const status = find(allStatuses, { id: favorite.in_reply_to_status_id }) if (status) { // This is our favorite, so the relevant bit. @@ -273,7 +273,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us favoriteStatus(favorite) } }, - follow: (follow) => { + follow: () => { // NOOP, it is known status but we don't do anything about it for now }, default: (unknown) => { @@ -433,7 +433,7 @@ export const mutations = { newStatus.fave_num = newStatus.favoritedBy.length newStatus.favorited = !!newStatus.favoritedBy.find(({ id }) => currentUser.id === id) }, - addEmojiReactionsBy (state, { id, emojiReactions, currentUser }) { + addEmojiReactionsBy (state, { id, emojiReactions }) { const status = state.allStatusesObject[id] status.emoji_reactions = emojiReactions }, @@ -492,22 +492,22 @@ export const mutations = { const statuses = { state: defaultState(), actions: { - addNewStatuses ({ rootState, commit, dispatch, state }, { statuses, showImmediately = false, timeline = false, noIdUpdate = false, userId, pagination }) { + addNewStatuses ({ rootState, commit }, { statuses, showImmediately = false, timeline = false, noIdUpdate = false, userId, pagination }) { commit('addNewStatuses', { statuses, showImmediately, timeline, noIdUpdate, user: rootState.users.currentUser, userId, pagination }) }, fetchStatus ({ rootState, dispatch }, id) { return rootState.api.backendInteractor.fetchStatus({ id }) .then((status) => dispatch('addNewStatuses', { statuses: [status] })) }, - fetchStatusSource ({ rootState, dispatch }, status) { + fetchStatusSource ({ rootState }, status) { return apiService.fetchStatusSource({ id: status.id, credentials: rootState.users.currentUser.credentials }) }, - fetchStatusHistory ({ rootState, dispatch }, status) { + fetchStatusHistory (_, status) { return apiService.fetchStatusHistory({ status }) }, - deleteStatus ({ rootState, commit, dispatch }, status) { + deleteStatus ({ rootState, commit }, status) { apiService.deleteStatus({ id: status.id, credentials: rootState.users.currentUser.credentials }) - .then((_) => { + .then(() => { commit('setDeleted', { status }) }) .catch((e) => { @@ -584,10 +584,10 @@ const statuses = { commit('setBookmarkedConfirm', { status }) }) }, - queueFlush ({ rootState, commit }, { timeline, id }) { + queueFlush ({ commit }, { timeline, id }) { commit('queueFlush', { timeline, id }) }, - queueFlushAll ({ rootState, commit }) { + queueFlushAll ({ commit }) { commit('queueFlushAll') }, fetchFavsAndRepeats ({ rootState, commit }, id) { @@ -605,7 +605,7 @@ const statuses = { commit('addOwnReaction', { id, emoji, currentUser }) rootState.api.backendInteractor.reactWithEmoji({ id, emoji }).then( - ok => { + () => { dispatch('fetchEmojiReactionsBy', id) } ) @@ -616,7 +616,7 @@ const statuses = { commit('removeOwnReaction', { id, emoji, currentUser }) rootState.api.backendInteractor.unreactWithEmoji({ id, emoji }).then( - ok => { + () => { dispatch('fetchEmojiReactionsBy', id) } ) diff --git a/src/modules/users.js b/src/modules/users.js @@ -509,8 +509,8 @@ const users = { const notificationsObject = store.rootState.notifications.idStore const relevantNotifications = Object.entries(notificationsObject) - .filter(([k, val]) => notificationIds.includes(k)) - .map(([k, val]) => val) + .filter(([k]) => notificationIds.includes(k)) + .map(([, val]) => val) // Reconnect users to notifications each(relevantNotifications, (notification) => { diff --git a/src/services/desktop_notification_utils/desktop_notification_utils.js b/src/services/desktop_notification_utils/desktop_notification_utils.js @@ -29,7 +29,7 @@ export const closeDesktopNotification = (rootState, { id }) => { } } -export const closeAllDesktopNotifications = (rootState) => { +export const closeAllDesktopNotifications = () => { if (!('Notification' in window && window.Notification.permission === 'granted')) return if (isSWSupported()) { diff --git a/src/services/errors/errors.js b/src/services/errors/errors.js @@ -48,7 +48,7 @@ export class RegistrationError extends Error { } else { this.message = error } - } catch (e) { + } catch { // can't parse it, so just treat it like a string this.message = error } diff --git a/src/services/export_import/export_import.js b/src/services/export_import/export_import.js @@ -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 { diff --git a/src/services/follow_manipulate/follow_manipulate.js b/src/services/follow_manipulate/follow_manipulate.js @@ -16,7 +16,7 @@ const fetchRelationship = (attempt, userId, store) => new Promise((resolve, reje } }) -export const requestFollow = (userId, store) => new Promise((resolve, reject) => { +export const requestFollow = (userId, store) => new Promise((resolve) => { store.state.api.backendInteractor.followUser({ id: userId }) .then((updated) => { store.commit('updateUserRelationship', [updated]) @@ -41,7 +41,7 @@ export const requestFollow = (userId, store) => new Promise((resolve, reject) => }) }) -export const requestUnfollow = (userId, store) => new Promise((resolve, reject) => { +export const requestUnfollow = (userId, store) => new Promise((resolve) => { store.state.api.backendInteractor.unfollowUser({ id: userId }) .then((updated) => { store.commit('updateUserRelationship', [updated]) diff --git a/src/services/gesture_service/gesture_service.js b/src/services/gesture_service/gesture_service.js @@ -184,7 +184,7 @@ class SwipeAndClickGesture { } } - click (event) { + click () { if (!this._preventNextClick) { this.swipelessClickCallback() } diff --git a/src/services/html_converter/utility.service.js b/src/services/html_converter/utility.service.js @@ -23,7 +23,7 @@ export const getAttrs = (tag, filter) => { .replace(/\/?$/, '') .trim() const attrs = Array.from(innertag.matchAll(/([a-z]+[a-z0-9-]*)(?:=("[^"]+?"|'[^']+?'))?/gi)) - .map(([trash, key, value]) => [key, value]) + .map(([, key, value]) => [key, value]) .map(([k, v]) => { if (!v) return [k, true] return [k, v.substring(1, v.length - 1)] diff --git a/src/services/lists_fetcher/lists_fetcher.service.js b/src/services/lists_fetcher/lists_fetcher.service.js @@ -2,7 +2,7 @@ import { useListsStore } from 'src/stores/lists.js' import apiService from '../api/api.service.js' import { promiseInterval } from '../promise_interval/promise_interval.js' -const fetchAndUpdate = ({ store, credentials }) => { +const fetchAndUpdate = ({ credentials }) => { return apiService.fetchLists({ credentials }) .then(lists => { useListsStore().setLists(lists) diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js @@ -48,7 +48,7 @@ const adoptStyleSheets = (styles) => { export const generateTheme = (inputRuleset, callbacks, debug) => { const { - onNewRule = (rule, isLazy) => {}, + onNewRule = () => {}, onLazyFinished = () => {}, onEagerFinished = () => {} } = callbacks @@ -123,8 +123,8 @@ export const tryLoadCache = async () => { export const applyTheme = ( input, - onEagerFinish = data => {}, - onFinish = data => {}, + onEagerFinish = () => {}, + onFinish = () => {}, debug ) => { const eagerStyles = createStyleSheet(EAGER_STYLE_ID) @@ -217,7 +217,7 @@ const extractStyleConfig = ({ console.log(defaultState) const defaultStyleConfig = extractStyleConfig(defaultState) -export const applyConfig = (input, i18n) => { +export const applyConfig = (input) => { const config = extractStyleConfig(input) if (config === defaultStyleConfig) { @@ -228,7 +228,7 @@ export const applyConfig = (input, i18n) => { const rules = Object .entries(config) - .filter(([k, v]) => v) + .filter(([, v]) => v) .map(([k, v]) => `--${k}: ${v}`).join(';') document.getElementById('style-config')?.remove() @@ -283,7 +283,7 @@ export const getResourcesIndex = async (url, parser = JSON.parse) => { const builtinData = await window.fetch(url, { cache }) const builtinResources = await builtinData.json() builtin = resourceTransform(builtinResources) - } catch (e) { + } catch { builtin = [] console.warn(`Builtin resources at ${url} unavailable`) } @@ -292,7 +292,7 @@ export const getResourcesIndex = async (url, parser = JSON.parse) => { const customData = await window.fetch(customUrl, { cache }) const customResources = await customData.json() custom = resourceTransform(customResources) - } catch (e) { + } catch { custom = [] console.warn(`Custom resources at ${customUrl} unavailable`) } diff --git a/src/services/sw/sw.js b/src/services/sw/sw.js @@ -138,7 +138,7 @@ export function unregisterPushNotifications (token) { .then((registration) => { return unsubscribePush(registration).then((result) => [registration, result]) }) - .then(([registration, unsubResult]) => { + .then(([, unsubResult]) => { if (!unsubResult) { console.warn('Push subscription cancellation wasn\'t successful') } diff --git a/src/services/theme_data/iss_deserializer.js b/src/services/theme_data/iss_deserializer.js @@ -45,7 +45,7 @@ export const deserializeShadow = string => { } else { return [mode, result[i]] } - }).filter(([k, v]) => v !== false).slice(1)) + }).filter(([, v]) => v !== false).slice(1)) return { x, y, blur, spread, color, alpha, inset, name } } diff --git a/src/services/theme_data/iss_serializer.js b/src/services/theme_data/iss_serializer.js @@ -1,7 +1,7 @@ import { unroll } from './iss_utils.js' import { deserializeShadow } from './iss_deserializer.js' -export const serializeShadow = (s, throwOnInvalid) => { +export const serializeShadow = (s) => { if (typeof s === 'object') { const inset = s.inset ? 'inset ' : '' const name = s.name ? ` #${s.name} ` : '' diff --git a/src/services/theme_data/iss_utils.js b/src/services/theme_data/iss_utils.js @@ -100,7 +100,7 @@ export const genericRuleToSelector = components => (rule, ignoreOutOfTreeSelecto let arraySelector = Array.isArray(selector) ? selector : [selector] if (ignoreOutOfTreeSelector || liteMode) arraySelector = [arraySelector[0]] arraySelector - .sort((a, b) => { + .sort((a) => { if (a.startsWith(':')) return 1 if (/^[a-z]/.exec(a)) return -1 else return 0 diff --git a/src/services/theme_data/theme3_slot_functions.js b/src/services/theme_data/theme3_slot_functions.js @@ -131,7 +131,7 @@ export const shadowFunctions = { '[alpha]: (Optional) border opacity, defaults to 1 (fully opaque)', '[inset]: (Optional) whether border should be on the inside or outside, defaults to inside' ], - exec: (args, { findColor }) => { + exec: (args) => { const [color, side, alpha = '1', widthArg = '1', inset = 'inset'] = args const width = Number(widthArg) diff --git a/src/services/theme_data/theme_data.service.js b/src/services/theme_data/theme_data.service.js @@ -218,7 +218,7 @@ export const getLayerSlot = ( */ export const SLOT_ORDERED = topoSort( Object.entries(SLOT_INHERITANCE) - .sort(([aK, aV], [bK, bV]) => ((aV && aV.priority) || 0) - ((bV && bV.priority) || 0)) + .sort(([, aV], [, bV]) => ((aV && aV.priority) || 0) - ((bV && bV.priority) || 0)) .reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {}) ) @@ -226,7 +226,7 @@ export const SLOT_ORDERED = topoSort( * All opacity slots used in color slots, their default values and affected * color slots. */ -export const OPACITIES = Object.entries(SLOT_INHERITANCE).reduce((acc, [k, v]) => { +export const OPACITIES = Object.entries(SLOT_INHERITANCE).reduce((acc, [k]) => { const opacity = getOpacitySlot(k, SLOT_INHERITANCE, getDependencies) if (opacity) { return { @@ -489,7 +489,7 @@ export const generateColors = (themeData) => { return { rules: { colors: Object.entries(htmlColors.complete) - .filter(([k, v]) => v) + .filter(([, v]) => v) .map(([k, v]) => `--${k}: ${v}`) .join(';') }, @@ -506,10 +506,10 @@ export const generateRadii = (input) => { if (typeof input.btnRadius !== 'undefined') { inputRadii = Object .entries(input) - .filter(([k, v]) => k.endsWith('Radius')) + .filter(([k]) => k.endsWith('Radius')) .reduce((acc, e) => { acc[e[0].split('Radius')[0]] = e[1]; return acc }, {}) } - const radii = Object.entries(inputRadii).filter(([k, v]) => v).reduce((acc, [k, v]) => { + const radii = Object.entries(inputRadii).filter(([, v]) => v).reduce((acc, [k, v]) => { acc[k] = v return acc }, { @@ -526,7 +526,7 @@ export const generateRadii = (input) => { return { rules: { - radii: Object.entries(radii).filter(([k, v]) => v).map(([k, v]) => `--${k}Radius: ${v}px`).join(';') + radii: Object.entries(radii).filter(([, v]) => v).map(([k, v]) => `--${k}Radius: ${v}px`).join(';') }, theme: { radii @@ -535,8 +535,8 @@ export const generateRadii = (input) => { } export const generateFonts = (input) => { - const fonts = Object.entries(input.fonts || {}).filter(([k, v]) => v).reduce((acc, [k, v]) => { - acc[k] = Object.entries(v).filter(([k, v]) => v).reduce((acc, [k, v]) => { + const fonts = Object.entries(input.fonts || {}).filter(([, v]) => v).reduce((acc, [k, v]) => { + acc[k] = Object.entries(v).filter(([, v]) => v).reduce((acc, [k, v]) => { acc[k] = v return acc }, acc[k]) @@ -560,7 +560,7 @@ export const generateFonts = (input) => { rules: { fonts: Object .entries(fonts) - .filter(([k, v]) => v) + .filter(([, v]) => v) .map(([k, v]) => `--${k}Font: ${v.family}`).join(';') }, theme: { diff --git a/src/services/theme_data/theme_data_3.service.js b/src/services/theme_data/theme_data_3.service.js @@ -117,7 +117,7 @@ export const findColor = (color, { dynamicVars, staticVars }) => { Static: ${JSON.stringify(staticVars, null, 2)} Dynamic: -${JSON.stringify(dynamicVars, null, 2)}`) +${JSON.stringify(dynamicVars, null, 2)}`, e) } } @@ -417,7 +417,7 @@ export const init = ({ dynamicVars.stacked = stacked[selector] dynamicVars.background = computed[selector].background - const dynamicSlots = Object.entries(computedDirectives).filter(([k, v]) => k.startsWith('--')) + const dynamicSlots = Object.entries(computedDirectives).filter(([k]) => k.startsWith('--')) dynamicSlots.forEach(([k, v]) => { const [type, value] = v.split('|').map(x => x.trim()) // woah, Extreme! diff --git a/src/stores/interface.js b/src/stores/interface.js @@ -427,7 +427,7 @@ export const useInterfaceStore = defineStore('interface', { const cleanDirectives = Object.fromEntries( Object .entries(x.directives) - .filter(([k, v]) => k) + .filter(([k]) => k) ) return { name: x.variant, ...cleanDirectives } diff --git a/src/stores/lists.js b/src/stores/lists.js @@ -8,13 +8,13 @@ export const useListsStore = defineStore('lists', { allListsObject: {} }), getters: { - findListTitle (state) { + findListTitle () { return (id) => { if (!this.allListsObject[id]) return return this.allListsObject[id].title } }, - findListAccounts (state) { + findListAccounts () { return (id) => [...this.allListsObject[id].accountIds] } }, diff --git a/src/stores/polls.js b/src/stores/polls.js @@ -47,7 +47,7 @@ export const usePollsStore = defineStore('polls', { this.trackedPolls[pollId] = 0 } }, - votePoll ({ id, pollId, choices }) { + votePoll ({ pollId, choices }) { return window.vuex.state.api.backendInteractor.vote({ pollId, choices }).then(poll => { this.mergeOrAddPoll(poll) return poll diff --git a/src/sw.js b/src/sw.js @@ -33,7 +33,7 @@ const setSettings = async () => { state.allowedNotificationTypes = new Set( notificationsNativeArray - .filter(([k, v]) => v) + .filter(([, v]) => v) .map(([k]) => { switch (k) { case 'mentions': diff --git a/test/unit/specs/components/user_profile.spec.js b/test/unit/specs/components/user_profile.spec.js @@ -17,7 +17,7 @@ const testGetters = { findUser: state => getters.findUser(state.users), findUserByName: state => getters.findUserByName(state.users), relationship: state => getters.relationship(state.users), - mergedConfig: state => ({ + mergedConfig: () => ({ colors: '', highlight: {}, customTheme: { diff --git a/test/unit/specs/modules/statuses.spec.js b/test/unit/specs/modules/statuses.spec.js @@ -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, diff --git a/test/unit/specs/services/html_converter/html_line_converter.spec.js b/test/unit/specs/services/html_converter/html_line_converter.spec.js @@ -78,7 +78,7 @@ describe('html_line_converter', () => { }) }) describe('with processor that replaces lines with word "_" should match expected line when', () => { - const processorReplace = (line) => '_' + const processorReplace = () => '_' it('fed with regular HTML with newlines', () => { const input = '1<br/>2<p class="lol">3 4</p> 5 \n 6 <p > 7 <br> 8 </p> <br>\n<br/>' const output = '_<br/>_<p class="lol">_</p>_\n_<p >_<br>_</p> <br>\n<br/>' diff --git a/yarn.lock b/yarn.lock @@ -861,30 +861,59 @@ dependencies: eslint-visitor-keys "^3.4.3" -"@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.12.1": version "4.12.1" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== +"@eslint/config-array@^0.19.0": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.2.tgz#3060b809e111abfc97adb0bb1172778b90cb46aa" + integrity sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w== + dependencies: + "@eslint/object-schema" "^2.1.6" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/core@^0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.10.0.tgz#23727063c21b335f752dbb3a16450f6f9cbc9091" + integrity sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw== + dependencies: + "@types/json-schema" "^7.0.15" + +"@eslint/eslintrc@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c" + integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" + espree "^10.0.1" + globals "^14.0.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.57.1": - version "8.57.1" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" - integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== +"@eslint/js@9.19.0": + version "9.19.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.19.0.tgz#51dbb140ed6b49d05adc0b171c41e1a8713b7789" + integrity sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ== + +"@eslint/object-schema@^2.1.6": + version "2.1.6" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.6.tgz#58369ab5b5b3ca117880c0f6c0b0f32f6950f24f" + integrity sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA== + +"@eslint/plugin-kit@^0.2.5": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz#ee07372035539e7847ef834e3f5e7b79f09e3a81" + integrity sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A== + dependencies: + "@eslint/core" "^0.10.0" + levn "^0.4.1" "@fortawesome/fontawesome-common-types@6.7.2": version "6.7.2" @@ -917,24 +946,33 @@ resolved "https://registry.yarnpkg.com/@fortawesome/vue-fontawesome/-/vue-fontawesome-3.0.8.tgz#1e8032df151173d8174ac9f5a28da3c0f5a495e4" integrity sha512-yyHHAj4G8pQIDfaIsMvQpwKMboIZtcHTUvPqXjOHyldh1O1vZfH4W03VDPv5RvI9P6DLTzJQlmVgj9wCf7c2Fw== -"@humanwhocodes/config-array@^0.13.0": - version "0.13.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" - integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== +"@humanfs/core@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== + +"@humanfs/node@^0.16.6": + version "0.16.6" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" + integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== dependencies: - "@humanwhocodes/object-schema" "^2.0.3" - debug "^4.3.1" - minimatch "^3.0.5" + "@humanfs/core" "^0.19.1" + "@humanwhocodes/retry" "^0.3.0" "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== +"@humanwhocodes/retry@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" + integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== + +"@humanwhocodes/retry@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b" + integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA== "@intlify/bundle-utils@3.4.0": version "3.4.0" @@ -1122,7 +1160,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": +"@nodelib/fs.walk@^1.2.3": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -1332,7 +1370,7 @@ "@types/estree" "*" "@types/json-schema" "*" -"@types/eslint@^7.29.0 || ^8.4.1": +"@types/eslint@^8.56.10": version "8.56.12" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.12.tgz#1657c814ffeba4d2f84c0d4ba0f44ca7ea1ca53a" integrity sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g== @@ -1376,7 +1414,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": +"@types/json-schema@*", "@types/json-schema@^7.0.15", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -1437,11 +1475,6 @@ resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== -"@ungap/structured-clone@^1.2.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz#d06bbb384ebcf6c505fde1c3d0ed4ddffe0aaff8" - integrity sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g== - "@vue/babel-helper-vue-jsx-merge-props@1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz#8d53a1e21347db8edbe54d339902583176de09f2" @@ -2740,7 +2773,7 @@ cropperjs@1.6.2: resolved "https://registry.yarnpkg.com/cropperjs/-/cropperjs-1.6.2.tgz#d1a5d627d880581cca41b7901f06923500e4201b" integrity sha512-nhymn9GdnV3CqiEHJVai54TULFAE3VshJTXSqSJKa8yXAKyBKDWdhHarnlIPrshJ0WMFTGuFvG02YjLXfPiuOA== -cross-spawn@7.0.6, cross-spawn@^7.0.0, cross-spawn@^7.0.2: +cross-spawn@7.0.6, cross-spawn@^7.0.0, cross-spawn@^7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -3149,13 +3182,6 @@ doctrine@^2.1.0: dependencies: esutils "^2.0.2" -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - dom-converter@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" @@ -3630,7 +3656,7 @@ eslint-scope@5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.1.1, eslint-scope@^7.2.2: +eslint-scope@^7.1.1: version "7.2.2" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== @@ -3638,6 +3664,14 @@ eslint-scope@^7.1.1, eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" +eslint-scope@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442" + integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + eslint-utils@^2.0.0, eslint-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" @@ -3667,60 +3701,70 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint-webpack-plugin@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/eslint-webpack-plugin/-/eslint-webpack-plugin-3.2.0.tgz#1978cdb9edc461e4b0195a20da950cf57988347c" - integrity sha512-avrKcGncpPbPSUHX6B3stNGzkKFto3eL+DKM4+VyMrVnhPc3vRczVlCq3uhuFOdRvDHTVXuzwk1ZKUrqDQHQ9w== +eslint-visitor-keys@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" + integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== + +eslint-webpack-plugin@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-webpack-plugin/-/eslint-webpack-plugin-4.2.0.tgz#41f54b25379908eb9eca8645bc997c90cfdbd34e" + integrity sha512-rsfpFQ01AWQbqtjgPRr2usVRxhWDuG0YDYcG8DJOteD3EFnpeuYuOwk0PQiN7PRBTqS6ElNdtPZPggj8If9WnA== dependencies: - "@types/eslint" "^7.29.0 || ^8.4.1" - jest-worker "^28.0.2" + "@types/eslint" "^8.56.10" + jest-worker "^29.7.0" micromatch "^4.0.5" normalize-path "^3.0.0" - schema-utils "^4.0.0" + schema-utils "^4.2.0" -eslint@8.57.1: - version "8.57.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" - integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== +eslint@9.19.0: + version "9.19.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.19.0.tgz#ffa1d265fc4205e0f8464330d35f09e1d548b1bf" + integrity sha512-ug92j0LepKlbbEv6hD911THhoRHmbdXt2gX+VDABAW/Ir7D3nqKdv5Pf5vtlyY6HQMTEP2skXY43ueqTCWssEA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.1" - "@humanwhocodes/config-array" "^0.13.0" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.19.0" + "@eslint/core" "^0.10.0" + "@eslint/eslintrc" "^3.2.0" + "@eslint/js" "9.19.0" + "@eslint/plugin-kit" "^0.2.5" + "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" + "@humanwhocodes/retry" "^0.4.1" + "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" ajv "^6.12.4" chalk "^4.0.0" - cross-spawn "^7.0.2" + cross-spawn "^7.0.6" debug "^4.3.2" - doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" + eslint-scope "^8.2.0" + eslint-visitor-keys "^4.2.0" + espree "^10.3.0" + esquery "^1.5.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" + file-entry-cache "^8.0.0" find-up "^5.0.0" glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" ignore "^5.2.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" + +espree@^10.0.1, espree@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a" + integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== + dependencies: + acorn "^8.14.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.2.0" espree@^6.0.0: version "6.2.1" @@ -3731,7 +3775,7 @@ espree@^6.0.0: acorn-jsx "^5.2.0" eslint-visitor-keys "^1.1.0" -espree@^9.3.1, espree@^9.6.0, espree@^9.6.1: +espree@^9.3.1: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== @@ -3745,7 +3789,7 @@ esprima@^4.0.1: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.0, esquery@^1.4.2: +esquery@^1.4.0, esquery@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== @@ -3909,6 +3953,13 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== + dependencies: + flat-cache "^4.0.0" + filelist@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" @@ -4006,6 +4057,14 @@ flat-cache@^3.0.4: keyv "^4.5.3" rimraf "^3.0.2" +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.4" + flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" @@ -4266,13 +4325,23 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.19.0, globals@^13.24.0: +globals@^13.24.0: version "13.24.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== dependencies: type-fest "^0.20.2" +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== + +globals@^15.14.0: + version "15.14.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.14.0.tgz#b8fd3a8941ff3b4d38f3319d433b61bbb482e73f" + integrity sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig== + globalthis@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" @@ -4320,11 +4389,6 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - growl@1.10.5: version "1.10.5" resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" @@ -4802,11 +4866,6 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -5048,7 +5107,7 @@ jest-worker@^27.4.5: merge-stream "^2.0.0" supports-color "^8.0.0" -jest-worker@^28.0.2, jest-worker@^28.1.0: +jest-worker@^28.1.0: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.3.tgz#7e3c4ce3fa23d1bb6accb169e7f396f98ed4bb98" integrity sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g== @@ -5331,7 +5390,7 @@ karma@6.4.4: ua-parser-js "^0.7.30" yargs "^16.1.1" -keyv@^4.5.3: +keyv@^4.5.3, keyv@^4.5.4: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== @@ -5932,7 +5991,7 @@ mini-css-extract-plugin@2.9.2: schema-utils "^4.0.0" tapable "^2.2.1" -minimatch@3.1.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@3.1.2, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -8187,7 +8246,7 @@ terser@^5.10.0, terser@^5.31.1: commander "^2.20.0" source-map-support "~0.5.20" -text-table@0.2.0, text-table@^0.2.0: +text-table@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==