+
{{ userName }} {{ $t('profile.network.followingNobody') }}
@@ -143,7 +143,7 @@ -+
{{ userName }} {{ $t('profile.network.followedByNobody') }}
@@ -337,7 +337,7 @@ export default { }, socialMediaLinks() { const { socialMedia = [] } = this.user - return socialMedia.map(socialMedia => { + return socialMedia.map((socialMedia) => { const { url } = socialMedia const matches = url.match(/^(?:https?:\/\/)?(?:[^@\n])?(?:www\.)?([^:/\n?]+)/g) const [domain] = matches || [] @@ -364,7 +364,7 @@ export default { }, methods: { removePostFromList(deletedPost) { - this.posts = this.posts.filter(post => { + this.posts = this.posts.filter((post) => { return post.id !== deletedPost.id }) }, @@ -447,7 +447,7 @@ export default { this.resetPostList() this.$apollo.queries.profilePagePosts.refetch() }) - .catch(error => this.$toast.error(error.message)) + .catch((error) => this.$toast.error(error.message)) }, unpinPost(post) { this.$apollo @@ -460,7 +460,7 @@ export default { this.resetPostList() this.$apollo.queries.profilePagePosts.refetch() }) - .catch(error => this.$toast.error(error.message)) + .catch((error) => this.$toast.error(error.message)) }, optimisticFollow({ followedByCurrentUser }) { /* @@ -473,7 +473,7 @@ export default { this.user.followedBy = [currentUser, ...this.user.followedBy] } else { this.user.followedByCount-- - this.user.followedBy = this.user.followedBy.filter(user => user.id !== currentUser.id) + this.user.followedBy = this.user.followedBy.filter((user) => user.id !== currentUser.id) } this.user.followedByCurrentUser = followedByCurrentUser }, diff --git a/webapp/pages/settings/embeds.vue b/webapp/pages/settings/embeds.vue index 01e508ad9..4b0ef95d7 100644 --- a/webapp/pages/settings/embeds.vue +++ b/webapp/pages/settings/embeds.vue @@ -58,7 +58,7 @@ export default { } }, mounted() { - axios.get('/api/providers.json').then(response => { + axios.get('/api/providers.json').then((response) => { this.providers = response.data }) if (this.currentUser.allowEmbedIframes) this.disabled = this.currentUser.allowEmbedIframes diff --git a/webapp/pages/settings/index.vue b/webapp/pages/settings/index.vue index 3eac46665..9766ab81c 100644 --- a/webapp/pages/settings/index.vue +++ b/webapp/pages/settings/index.vue @@ -73,11 +73,11 @@ export default { } }, form: { - get: function() { + get: function () { const { name, slug, locationName, about } = this.currentUser return { name, slug, locationName, about } }, - set: function(formData) { + set: function (formData) { this.formData = formData }, }, @@ -128,7 +128,7 @@ export default { return [] } const output = [] - res.data.features.forEach(item => { + res.data.features.forEach((item) => { output.push({ label: item.place_name, value: item.place_name, @@ -162,7 +162,7 @@ export default { cancelToken: this.axiosSource.token, }, ) - .then(res => { + .then((res) => { this.cities = this.processCityResults(res) }) .finally(() => { diff --git a/webapp/pages/settings/my-email-address/enter-nonce.spec.js b/webapp/pages/settings/my-email-address/enter-nonce.spec.js index 3e0ed5a4c..3e3f032f6 100644 --- a/webapp/pages/settings/my-email-address/enter-nonce.spec.js +++ b/webapp/pages/settings/my-email-address/enter-nonce.spec.js @@ -10,7 +10,7 @@ describe('EnterNoncePage', () => { beforeEach(() => { wrapper = null mocks = { - $t: jest.fn(t => t), + $t: jest.fn((t) => t), $route: { query: {}, }, diff --git a/webapp/pages/settings/my-email-address/enter-nonce.vue b/webapp/pages/settings/my-email-address/enter-nonce.vue index 4faae6692..8ee9d8ee7 100644 --- a/webapp/pages/settings/my-email-address/enter-nonce.vue +++ b/webapp/pages/settings/my-email-address/enter-nonce.vue @@ -35,11 +35,11 @@ export default { }, computed: { form: { - get: function() { + get: function () { const { email = '', nonce = '' } = this.$route.query return { email, nonce } }, - set: function(formData) { + set: function (formData) { this.formData = formData }, }, diff --git a/webapp/pages/settings/my-email-address/index.spec.js b/webapp/pages/settings/my-email-address/index.spec.js index dd64c1733..22654afd0 100644 --- a/webapp/pages/settings/my-email-address/index.spec.js +++ b/webapp/pages/settings/my-email-address/index.spec.js @@ -21,7 +21,7 @@ describe('EmailSettingsIndexPage', () => { }, }) mocks = { - $t: jest.fn(t => t), + $t: jest.fn((t) => t), $toast: { success: jest.fn(), error: jest.fn(), diff --git a/webapp/pages/settings/my-email-address/index.vue b/webapp/pages/settings/my-email-address/index.vue index ffb1a0cc5..2d2cc406f 100644 --- a/webapp/pages/settings/my-email-address/index.vue +++ b/webapp/pages/settings/my-email-address/index.vue @@ -51,11 +51,11 @@ export default { currentUser: 'auth/user', }), form: { - get: function() { + get: function () { const { email } = this.currentUser return { email } }, - set: function(formData) { + set: function (formData) { this.formData = formData }, }, diff --git a/webapp/pages/settings/my-email-address/verify.spec.js b/webapp/pages/settings/my-email-address/verify.spec.js index e9c2e5a34..66407ad1f 100644 --- a/webapp/pages/settings/my-email-address/verify.spec.js +++ b/webapp/pages/settings/my-email-address/verify.spec.js @@ -27,7 +27,7 @@ describe('EmailVerifyPage', () => { }, }) mocks = { - $t: jest.fn(t => t), + $t: jest.fn((t) => t), $toast: { success: jest.fn(), error: jest.fn(), diff --git a/webapp/pages/settings/my-social-media.vue b/webapp/pages/settings/my-social-media.vue index d909f4008..5753fc405 100644 --- a/webapp/pages/settings/my-social-media.vue +++ b/webapp/pages/settings/my-social-media.vue @@ -141,7 +141,7 @@ export default { }, update: (store, { data }) => { const socialMedia = this.currentUser.socialMedia.filter( - element => element.id !== link.id, + (element) => element.id !== link.id, ) this.setCurrentUser({ ...this.currentUser, @@ -159,7 +159,7 @@ export default { const isEditing = !!this.editingLink.id const url = this.formData.socialMediaUrl - const duplicateUrl = this.socialMediaLinks.find(link => link.url === url) + const duplicateUrl = this.socialMediaLinks.find((link) => link.url === url) if (duplicateUrl && duplicateUrl.id !== this.editingLink.id) { return this.$toast.error(this.$t('settings.social-media.requireUnique')) } diff --git a/webapp/plugins/axios.js b/webapp/plugins/axios.js index 0071857ec..04dd68a2e 100644 --- a/webapp/plugins/axios.js +++ b/webapp/plugins/axios.js @@ -1,5 +1,5 @@ export default ({ $axios, app }) => { - $axios.onRequest(config => { + $axios.onRequest((config) => { /* eslint-disable-next-line no-console */ console.log(Object.keys(app)) // add current ui language diff --git a/webapp/plugins/base-components.js b/webapp/plugins/base-components.js index 7f3f7d7b2..90cb301bc 100644 --- a/webapp/plugins/base-components.js +++ b/webapp/plugins/base-components.js @@ -2,7 +2,7 @@ import Vue from 'vue' const componentFiles = require.context('../components/_new/generic', true, /Base[a-zA-Z]+\.vue/) -componentFiles.keys().forEach(fileName => { +componentFiles.keys().forEach((fileName) => { const component = componentFiles(fileName) const componentConfig = component.default || component const componentName = component.name || fileName.replace(/^.+\//, '').replace('.vue', '') diff --git a/webapp/plugins/i18n.js b/webapp/plugins/i18n.js index e3f0c5fd2..c355472eb 100644 --- a/webapp/plugins/i18n.js +++ b/webapp/plugins/i18n.js @@ -11,7 +11,7 @@ export default ({ app, req, cookie, store }) => { const debug = app.$env && app.$env.NODE_ENV !== 'production' const key = 'locale' - const changeHandler = async mutation => { + const changeHandler = async (mutation) => { if (process.server) return const newLocale = mutation.payload.locale @@ -24,7 +24,7 @@ export default ({ app, req, cookie, store }) => { app.$cookies.set(key, newLocale) if (!app.$i18n.localeExists(newLocale)) { - import(`~/locales/${newLocale}.json`).then(res => { + import(`~/locales/${newLocale}.json`).then((res) => { app.$i18n.add(newLocale, res.default) }) } @@ -45,7 +45,7 @@ export default ({ app, req, cookie, store }) => { // }) Vue.use(vuexI18n.plugin, store, { - onTranslationNotFound: function(locale, key) { + onTranslationNotFound: function (locale, key) { if (debug) { /* eslint-disable-next-line no-console */ console.warn(`vuex-i18n :: Key '${key}' not found for locale '${locale}'`) @@ -77,7 +77,7 @@ export default ({ app, req, cookie, store }) => { } } - const availableLocales = locales.filter(lang => !!lang.enabled) + const availableLocales = locales.filter((lang) => !!lang.enabled) const locale = find(availableLocales, ['code', userLocale]) ? userLocale : 'en' if (locale !== 'en') { @@ -89,7 +89,7 @@ export default ({ app, req, cookie, store }) => { Vue.i18n.fallback('en') if (process.browser) { - store.subscribe(mutation => { + store.subscribe((mutation) => { if (mutation.type === 'i18n/SET_LOCALE') { changeHandler(mutation) } diff --git a/webapp/plugins/keep-alive.js b/webapp/plugins/keep-alive.js index 91d7ed1f0..ad5e5b27c 100644 --- a/webapp/plugins/keep-alive.js +++ b/webapp/plugins/keep-alive.js @@ -4,7 +4,7 @@ let lastRoute const keepAliveHook = {} if (!process.server) { - keepAliveHook.install = Vue => { + keepAliveHook.install = (Vue) => { const keepAlivePages = process.env.keepAlivePages || [] Vue.mixin({ diff --git a/webapp/plugins/vue-directives.js b/webapp/plugins/vue-directives.js index f54c02167..7f09b2fb0 100644 --- a/webapp/plugins/vue-directives.js +++ b/webapp/plugins/vue-directives.js @@ -15,7 +15,7 @@ export default ({ app }) => { Vue.directive('router-link', { bind: (el, binding) => { - binding.clickEventListener = e => { + binding.clickEventListener = (e) => { if (!e.metaKey && !e.ctrlKey) { e.preventDefault() app.router.push(el.getAttribute('href')) diff --git a/webapp/plugins/vue-filters.js b/webapp/plugins/vue-filters.js index 66c4ca248..e6fcaf1dc 100644 --- a/webapp/plugins/vue-filters.js +++ b/webapp/plugins/vue-filters.js @@ -38,7 +38,7 @@ export default ({ app = {} }) => { return '' } if (truncate > 0) { - value = value.map(item => { + value = value.map((item) => { return app.$filters.truncate(item, truncate) }) } @@ -46,7 +46,7 @@ export default ({ app = {} }) => { }, listByKey: (values, key, glue, truncate) => { return app.$filters.list( - values.map(item => item[key]), + values.map((item) => item[key]), glue, truncate, ) @@ -58,7 +58,7 @@ export default ({ app = {} }) => { }) .replace(/\s+/g, '') }, - removeLinks: content => { + removeLinks: (content) => { if (!content) return '' // remove all links from excerpt to prevent issues with the surrounding link let excerpt = content.replace(/