diff --git a/webapp/app/router.scrollBehavior.js b/webapp/app/router.scrollBehavior.js
index a87054048..d34c4c38a 100644
--- a/webapp/app/router.scrollBehavior.js
+++ b/webapp/app/router.scrollBehavior.js
@@ -1,4 +1,4 @@
-export default function (to, from, savedPosition) {
+export default function(to, from, savedPosition) {
if (savedPosition) return savedPosition
// Edge case: If you click on a notification from a comment and then on the
diff --git a/webapp/assets/_new/icons/index.js b/webapp/assets/_new/icons/index.js
index bc9ef6638..daa0714f2 100644
--- a/webapp/assets/_new/icons/index.js
+++ b/webapp/assets/_new/icons/index.js
@@ -2,7 +2,7 @@ const svgFileList = require.context('./svgs', true, /\.svg/)
const icons = {}
const iconNames = []
-svgFileList.keys().forEach((fileName) => {
+svgFileList.keys().forEach(fileName => {
const svgCode = svgFileList(fileName)
const iconName = fileName.replace('./', '').replace('.svg', '')
icons[iconName] = svgCode
diff --git a/webapp/components/AvatarMenu/AvatarMenu.spec.js b/webapp/components/AvatarMenu/AvatarMenu.spec.js
index 85f5c32a8..c432a5ad8 100644
--- a/webapp/components/AvatarMenu/AvatarMenu.spec.js
+++ b/webapp/components/AvatarMenu/AvatarMenu.spec.js
@@ -21,7 +21,7 @@ describe('AvatarMenu.vue', () => {
return { href: '/profile/u343/matt' }
}),
},
- $t: jest.fn((a) => a),
+ $t: jest.fn(a => a),
}
getters = {
'auth/user': () => {
@@ -86,21 +86,21 @@ describe('AvatarMenu.vue', () => {
it('displays a link to user profile', () => {
const profileLink = wrapper
.findAll('.ds-menu-item span')
- .at(wrapper.vm.routes.findIndex((route) => route.path === '/profile/u343/matt'))
+ .at(wrapper.vm.routes.findIndex(route => route.path === '/profile/u343/matt'))
expect(profileLink.exists()).toBe(true)
})
it('displays a link to the notifications page', () => {
const notificationsLink = wrapper
.findAll('.ds-menu-item span')
- .at(wrapper.vm.routes.findIndex((route) => route.path === '/notifications'))
+ .at(wrapper.vm.routes.findIndex(route => route.path === '/notifications'))
expect(notificationsLink.exists()).toBe(true)
})
it('displays a link to the settings page', () => {
const settingsLink = wrapper
.findAll('.ds-menu-item span')
- .at(wrapper.vm.routes.findIndex((route) => route.path === '/settings'))
+ .at(wrapper.vm.routes.findIndex(route => route.path === '/settings'))
expect(settingsLink.exists()).toBe(true)
})
})
@@ -121,7 +121,7 @@ describe('AvatarMenu.vue', () => {
it('displays a link to moderation page', () => {
const moderationLink = wrapper
.findAll('.ds-menu-item span')
- .at(wrapper.vm.routes.findIndex((route) => route.path === '/moderation'))
+ .at(wrapper.vm.routes.findIndex(route => route.path === '/moderation'))
expect(moderationLink.exists()).toBe(true)
})
@@ -147,7 +147,7 @@ describe('AvatarMenu.vue', () => {
it('displays a link to admin page', () => {
const adminLink = wrapper
.findAll('.ds-menu-item span')
- .at(wrapper.vm.routes.findIndex((route) => route.path === '/admin'))
+ .at(wrapper.vm.routes.findIndex(route => route.path === '/admin'))
expect(adminLink.exists()).toBe(true)
})
diff --git a/webapp/components/CommentCard/CommentCard.spec.js b/webapp/components/CommentCard/CommentCard.spec.js
index 0ebcb2649..b18ab67c0 100644
--- a/webapp/components/CommentCard/CommentCard.spec.js
+++ b/webapp/components/CommentCard/CommentCard.spec.js
@@ -29,8 +29,8 @@ describe('CommentCard.vue', () => {
locale: () => 'en',
},
$filters: {
- truncate: (a) => a,
- removeHtml: (a) => a,
+ truncate: a => a,
+ removeHtml: a => a,
},
$route: { hash: '' },
$scrollTo: jest.fn(),
diff --git a/webapp/components/CommentForm/CommentForm.spec.js b/webapp/components/CommentForm/CommentForm.spec.js
index 996e6ecfc..b940c561d 100644
--- a/webapp/components/CommentForm/CommentForm.spec.js
+++ b/webapp/components/CommentForm/CommentForm.spec.js
@@ -25,7 +25,7 @@ describe('CommentForm.vue', () => {
success: jest.fn(),
},
$filters: {
- removeHtml: (a) => a,
+ removeHtml: a => a,
},
}
})
diff --git a/webapp/components/CommentForm/CommentForm.vue b/webapp/components/CommentForm/CommentForm.vue
index 4bdb95f90..55f675656 100644
--- a/webapp/components/CommentForm/CommentForm.vue
+++ b/webapp/components/CommentForm/CommentForm.vue
@@ -104,7 +104,7 @@ export default {
this.disabled = true
this.$apollo
.mutate(mutateParams)
- .then((res) => {
+ .then(res => {
this.loading = false
if (!this.update) {
const {
@@ -125,7 +125,7 @@ export default {
this.closeEditWindow()
}
})
- .catch((err) => {
+ .catch(err => {
this.$toast.error(err.message)
})
},
diff --git a/webapp/components/CommentList/CommentList.spec.js b/webapp/components/CommentList/CommentList.spec.js
index 66c16263c..a3d7ca7b2 100644
--- a/webapp/components/CommentList/CommentList.spec.js
+++ b/webapp/components/CommentList/CommentList.spec.js
@@ -6,7 +6,7 @@ import Vue from 'vue'
const localVue = global.localVue
-localVue.filter('truncate', (string) => string)
+localVue.filter('truncate', string => string)
localVue.directive('scrollTo', jest.fn())
config.stubs['v-popover'] = ''
@@ -42,8 +42,8 @@ describe('CommentList.vue', () => {
mocks = {
$t: jest.fn(),
$filters: {
- truncate: (a) => a,
- removeHtml: (a) => a,
+ truncate: a => a,
+ removeHtml: a => a,
},
$scrollTo: jest.fn(),
$route: { hash: '' },
diff --git a/webapp/components/CommentList/CommentList.story.js b/webapp/components/CommentList/CommentList.story.js
index 3ef474c80..1f96b1ad0 100644
--- a/webapp/components/CommentList/CommentList.story.js
+++ b/webapp/components/CommentList/CommentList.story.js
@@ -6,7 +6,7 @@ import faker from 'faker'
helpers.init()
-const commentMock = (fields) => {
+const commentMock = fields => {
return {
id: faker.random.uuid(),
title: faker.lorem.sentence(),
diff --git a/webapp/components/CommentList/CommentList.vue b/webapp/components/CommentList/CommentList.vue
index 377380325..1cff75138 100644
--- a/webapp/components/CommentList/CommentList.vue
+++ b/webapp/components/CommentList/CommentList.vue
@@ -48,7 +48,7 @@ export default {
return anchor === '#comments'
},
updateCommentList(updatedComment) {
- this.postComments = this.postComments.map((comment) => {
+ this.postComments = this.postComments.map(comment => {
return comment.id === updatedComment.id ? updatedComment : comment
})
},
diff --git a/webapp/components/ContentMenu/ContentMenu.spec.js b/webapp/components/ContentMenu/ContentMenu.spec.js
index b49a1158a..bbb0c0941 100644
--- a/webapp/components/ContentMenu/ContentMenu.spec.js
+++ b/webapp/components/ContentMenu/ContentMenu.spec.js
@@ -17,7 +17,7 @@ let getters, mutations, mocks, menuToggle, openModalSpy
describe('ContentMenu.vue', () => {
beforeEach(() => {
mocks = {
- $t: jest.fn((str) => str),
+ $t: jest.fn(str => str),
$i18n: {
locale: () => 'en',
},
@@ -68,7 +68,7 @@ describe('ContentMenu.vue', () => {
expect(
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'post.menu.edit')
+ .filter(item => item.text() === 'post.menu.edit')
.at(0)
.find('span.ds-menu-item-link')
.attributes('to'),
@@ -78,7 +78,7 @@ describe('ContentMenu.vue', () => {
it('can delete the contribution', () => {
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'post.menu.delete')
+ .filter(item => item.text() === 'post.menu.delete')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('confirm', 'delete')
@@ -98,7 +98,7 @@ describe('ContentMenu.vue', () => {
})
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'post.menu.pin')
+ .filter(item => item.text() === 'post.menu.pin')
.at(0)
.trigger('click')
expect(wrapper.emitted('pinPost')).toEqual([
@@ -122,7 +122,7 @@ describe('ContentMenu.vue', () => {
})
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'post.menu.unpin')
+ .filter(item => item.text() === 'post.menu.unpin')
.at(0)
.trigger('click')
expect(wrapper.emitted('unpinPost')).toEqual([
@@ -151,7 +151,7 @@ describe('ContentMenu.vue', () => {
it('edit the comment', () => {
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'comment.menu.edit')
+ .filter(item => item.text() === 'comment.menu.edit')
.at(0)
.trigger('click')
expect(wrapper.emitted('editComment')).toBeTruthy()
@@ -159,7 +159,7 @@ describe('ContentMenu.vue', () => {
it('delete the comment', () => {
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'comment.menu.delete')
+ .filter(item => item.text() === 'comment.menu.delete')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('confirm', 'delete')
@@ -180,7 +180,7 @@ describe('ContentMenu.vue', () => {
openModalSpy = jest.spyOn(wrapper.vm, 'openModal')
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'report.contribution.title')
+ .filter(item => item.text() === 'report.contribution.title')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('report')
@@ -197,7 +197,7 @@ describe('ContentMenu.vue', () => {
openModalSpy = jest.spyOn(wrapper.vm, 'openModal')
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'report.comment.title')
+ .filter(item => item.text() === 'report.comment.title')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('report')
@@ -214,7 +214,7 @@ describe('ContentMenu.vue', () => {
openModalSpy = jest.spyOn(wrapper.vm, 'openModal')
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'report.user.title')
+ .filter(item => item.text() === 'report.user.title')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('report')
@@ -231,7 +231,7 @@ describe('ContentMenu.vue', () => {
openModalSpy = jest.spyOn(wrapper.vm, 'openModal')
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'report.organization.title')
+ .filter(item => item.text() === 'report.organization.title')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('report')
@@ -253,7 +253,7 @@ describe('ContentMenu.vue', () => {
openModalSpy = jest.spyOn(wrapper.vm, 'openModal')
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'disable.contribution.title')
+ .filter(item => item.text() === 'disable.contribution.title')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('disable')
@@ -271,7 +271,7 @@ describe('ContentMenu.vue', () => {
openModalSpy = jest.spyOn(wrapper.vm, 'openModal')
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'disable.comment.title')
+ .filter(item => item.text() === 'disable.comment.title')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('disable')
@@ -289,7 +289,7 @@ describe('ContentMenu.vue', () => {
openModalSpy = jest.spyOn(wrapper.vm, 'openModal')
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'disable.user.title')
+ .filter(item => item.text() === 'disable.user.title')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('disable')
@@ -307,7 +307,7 @@ describe('ContentMenu.vue', () => {
openModalSpy = jest.spyOn(wrapper.vm, 'openModal')
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'disable.organization.title')
+ .filter(item => item.text() === 'disable.organization.title')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('disable')
@@ -325,7 +325,7 @@ describe('ContentMenu.vue', () => {
openModalSpy = jest.spyOn(wrapper.vm, 'openModal')
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'release.contribution.title')
+ .filter(item => item.text() === 'release.contribution.title')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('release')
@@ -343,7 +343,7 @@ describe('ContentMenu.vue', () => {
openModalSpy = jest.spyOn(wrapper.vm, 'openModal')
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'release.comment.title')
+ .filter(item => item.text() === 'release.comment.title')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('release')
@@ -361,7 +361,7 @@ describe('ContentMenu.vue', () => {
openModalSpy = jest.spyOn(wrapper.vm, 'openModal')
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'release.user.title')
+ .filter(item => item.text() === 'release.user.title')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('release')
@@ -379,7 +379,7 @@ describe('ContentMenu.vue', () => {
openModalSpy = jest.spyOn(wrapper.vm, 'openModal')
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'release.organization.title')
+ .filter(item => item.text() === 'release.organization.title')
.at(0)
.trigger('click')
expect(openModalSpy).toHaveBeenCalledWith('release')
@@ -400,7 +400,7 @@ describe('ContentMenu.vue', () => {
expect(
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'settings.name')
+ .filter(item => item.text() === 'settings.name')
.at(0)
.find('span.ds-menu-item-link')
.attributes('to'),
@@ -418,7 +418,7 @@ describe('ContentMenu.vue', () => {
})
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'settings.muted-users.mute')
+ .filter(item => item.text() === 'settings.muted-users.mute')
.at(0)
.trigger('click')
expect(wrapper.emitted('mute')).toEqual([
@@ -442,7 +442,7 @@ describe('ContentMenu.vue', () => {
})
wrapper
.findAll('.ds-menu-item')
- .filter((item) => item.text() === 'settings.muted-users.unmute')
+ .filter(item => item.text() === 'settings.muted-users.unmute')
.at(0)
.trigger('click')
expect(wrapper.emitted('unmute')).toEqual([
diff --git a/webapp/components/ContentMenu/ContentMenu.vue b/webapp/components/ContentMenu/ContentMenu.vue
index ef2df822b..ba9c37c34 100644
--- a/webapp/components/ContentMenu/ContentMenu.vue
+++ b/webapp/components/ContentMenu/ContentMenu.vue
@@ -46,7 +46,7 @@ export default {
resourceType: {
type: String,
required: true,
- validator: (value) => {
+ validator: value => {
return value.match(/(contribution|comment|organization|user)/)
},
},
diff --git a/webapp/components/ContributionForm/ContributionForm.spec.js b/webapp/components/ContributionForm/ContributionForm.spec.js
index be2228845..585980cc2 100644
--- a/webapp/components/ContributionForm/ContributionForm.spec.js
+++ b/webapp/components/ContributionForm/ContributionForm.spec.js
@@ -140,9 +140,7 @@ describe('ContributionForm.vue', () => {
postTitleInput = wrapper.find('.ds-input')
postTitleInput.setValue(postTitle)
await wrapper.vm.updateEditorContent(postContent)
- englishLanguage = wrapper
- .findAll('li')
- .filter((language) => language.text() === 'English')
+ englishLanguage = wrapper.findAll('li').filter(language => language.text() === 'English')
englishLanguage.trigger('click')
dataPrivacyButton = await wrapper
.find(CategoriesSelect)
@@ -208,9 +206,7 @@ describe('ContributionForm.vue', () => {
postTitleInput.setValue(postTitle)
await wrapper.vm.updateEditorContent(postContent)
wrapper.find(CategoriesSelect).setData({ categories })
- englishLanguage = wrapper
- .findAll('li')
- .filter((language) => language.text() === 'English')
+ englishLanguage = wrapper.findAll('li').filter(language => language.text() === 'English')
englishLanguage.trigger('click')
await Vue.nextTick()
dataPrivacyButton = await wrapper
@@ -227,9 +223,7 @@ describe('ContributionForm.vue', () => {
it('supports changing the language', async () => {
expectedParams.variables.language = 'de'
- deutschLanguage = wrapper
- .findAll('li')
- .filter((language) => language.text() === 'Deutsch')
+ deutschLanguage = wrapper.findAll('li').filter(language => language.text() === 'Deutsch')
deutschLanguage.trigger('click')
wrapper.find('form').trigger('submit')
expect(mocks.$apollo.mutate).toHaveBeenCalledWith(expect.objectContaining(expectedParams))
@@ -243,7 +237,7 @@ describe('ContributionForm.vue', () => {
}
const spy = jest
.spyOn(FileReader.prototype, 'readAsDataURL')
- .mockImplementation(function () {
+ .mockImplementation(function() {
this.onload({ target: { result: 'someUrlToImage' } })
})
wrapper.find(ImageUploader).vm.$emit('addHeroImage', imageUpload)
@@ -294,9 +288,7 @@ describe('ContributionForm.vue', () => {
await wrapper.vm.updateEditorContent(postContent)
categoryIds = ['cat12']
wrapper.find(CategoriesSelect).setData({ categories })
- englishLanguage = wrapper
- .findAll('li')
- .filter((language) => language.text() === 'English')
+ englishLanguage = wrapper.findAll('li').filter(language => language.text() === 'English')
englishLanguage.trigger('click')
await Vue.nextTick()
dataPrivacyButton = await wrapper
diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue
index 20c9c2388..2afee0763 100644
--- a/webapp/components/ContributionForm/ContributionForm.vue
+++ b/webapp/components/ContributionForm/ContributionForm.vue
@@ -108,7 +108,7 @@ export default {
data() {
const { title, content, image, language, categories } = this.contribution
- const languageOptions = orderBy(locales, 'name').map((locale) => {
+ const languageOptions = orderBy(locales, 'name').map(locale => {
return { label: locale.name, value: locale.code }
})
const { sensitive: imageBlurred = false, aspectRatio: imageAspectRatio = null } = image || {}
@@ -120,8 +120,8 @@ export default {
image: image || null,
imageAspectRatio,
imageBlurred,
- language: languageOptions.find((option) => option.value === language) || null,
- categoryIds: categories ? categories.map((category) => category.id) : [],
+ language: languageOptions.find(option => option.value === language) || null,
+ categoryIds: categories ? categories.map(category => category.id) : [],
},
formSchema: {
title: { required: true, min: 3, max: 100 },
@@ -190,7 +190,7 @@ export default {
params: { id: result.id, slug: result.slug },
})
})
- .catch((err) => {
+ .catch(err => {
this.$toast.error(err.message)
this.loading = false
})
diff --git a/webapp/components/DeleteData/DeleteData.vue b/webapp/components/DeleteData/DeleteData.vue
index 714e4c410..1157fc922 100644
--- a/webapp/components/DeleteData/DeleteData.vue
+++ b/webapp/components/DeleteData/DeleteData.vue
@@ -90,7 +90,7 @@ export default {
this.logout()
this.$router.history.push('/')
})
- .catch((error) => {
+ .catch(error => {
this.$toast.error(error.message)
})
},
diff --git a/webapp/components/DonationInfo/DonationInfo.spec.js b/webapp/components/DonationInfo/DonationInfo.spec.js
index 12f6c7652..157801dcf 100644
--- a/webapp/components/DonationInfo/DonationInfo.spec.js
+++ b/webapp/components/DonationInfo/DonationInfo.spec.js
@@ -12,7 +12,7 @@ describe('DonationInfo.vue', () => {
beforeEach(() => {
mocks = {
- $t: jest.fn((string) => string),
+ $t: jest.fn(string => string),
$i18n: {
locale: () => 'de',
},
@@ -22,11 +22,19 @@ describe('DonationInfo.vue', () => {
const Wrapper = () => mount(DonationInfo, { mocks, localVue })
it('includes a link to the Human Connection donations website', () => {
- expect(Wrapper().find('a').attributes('href')).toBe('https://human-connection.org/spenden/')
+ expect(
+ Wrapper()
+ .find('a')
+ .attributes('href'),
+ ).toBe('https://human-connection.org/spenden/')
})
it('displays a call to action button', () => {
- expect(Wrapper().find('.base-button').text()).toBe('donations.donate-now')
+ expect(
+ Wrapper()
+ .find('.base-button')
+ .text(),
+ ).toBe('donations.donate-now')
})
it.skip('creates a title from the current month and a translation string', () => {
diff --git a/webapp/components/Dropdown.vue b/webapp/components/Dropdown.vue
index 6a5d07083..be1157961 100644
--- a/webapp/components/Dropdown.vue
+++ b/webapp/components/Dropdown.vue
@@ -48,9 +48,8 @@ export default {
if (isOpen) {
this.$nextTick(() => {
setTimeout(() => {
- const paddingRightStyle = `${
- window.innerWidth - document.documentElement.clientWidth
- }px`
+ const paddingRightStyle = `${window.innerWidth -
+ document.documentElement.clientWidth}px`
const navigationElement = document.querySelector('.main-navigation')
document.body.style.paddingRight = paddingRightStyle
document.body.classList.add('dropdown-open')
diff --git a/webapp/components/DropdownFilter/DropdownFilter.spec.js b/webapp/components/DropdownFilter/DropdownFilter.spec.js
index b7c2be1d7..8fb1b408f 100644
--- a/webapp/components/DropdownFilter/DropdownFilter.spec.js
+++ b/webapp/components/DropdownFilter/DropdownFilter.spec.js
@@ -10,7 +10,7 @@ describe('DropdownFilter.vue', () => {
beforeEach(() => {
propsData = {}
mocks = {
- $t: jest.fn((a) => a),
+ $t: jest.fn(a => a),
}
})
@@ -43,7 +43,7 @@ describe('DropdownFilter.vue', () => {
wrapper.find('.dropdown-filter').trigger('click')
allLink = wrapper
.findAll('.dropdown-menu-item')
- .at(propsData.filterOptions.findIndex((option) => option.label === 'All'))
+ .at(propsData.filterOptions.findIndex(option => option.label === 'All'))
})
it('displays a link for All', () => {
@@ -53,21 +53,21 @@ describe('DropdownFilter.vue', () => {
it('displays a link for Read', () => {
const readLink = wrapper
.findAll('.dropdown-menu-item')
- .at(propsData.filterOptions.findIndex((option) => option.label === 'Read'))
+ .at(propsData.filterOptions.findIndex(option => option.label === 'Read'))
expect(readLink.text()).toEqual('Read')
})
it('displays a link for Unread', () => {
const unreadLink = wrapper
.findAll('.dropdown-menu-item')
- .at(propsData.filterOptions.findIndex((option) => option.label === 'Unread'))
+ .at(propsData.filterOptions.findIndex(option => option.label === 'Unread'))
expect(unreadLink.text()).toEqual('Unread')
})
it('clicking on menu item emits filter', () => {
allLink.trigger('click')
expect(wrapper.emitted().filter[0]).toEqual(
- propsData.filterOptions.filter((option) => option.label === 'All'),
+ propsData.filterOptions.filter(option => option.label === 'All'),
)
})
})
diff --git a/webapp/components/Editor/Editor.story.js b/webapp/components/Editor/Editor.story.js
index 0db445eb1..381c2e7ea 100644
--- a/webapp/components/Editor/Editor.story.js
+++ b/webapp/components/Editor/Editor.story.js
@@ -35,7 +35,7 @@ const users = [
storiesOf('Editor', module)
.addDecorator(withA11y)
- .addDecorator((storyFn) => {
+ .addDecorator(storyFn => {
const ctx = storyFn()
return {
components: { ctx },
diff --git a/webapp/components/Editor/Editor.vue b/webapp/components/Editor/Editor.vue
index f0e9c7909..44ed0d15e 100644
--- a/webapp/components/Editor/Editor.vue
+++ b/webapp/components/Editor/Editor.vue
@@ -80,7 +80,7 @@ export default {
items: () => {
return this.users
},
- onEnter: (props) => this.openSuggestionList(props, MENTION),
+ onEnter: props => this.openSuggestionList(props, MENTION),
onChange: this.updateSuggestionList,
onExit: this.closeSuggestionList,
onKeyDown: this.navigateSuggestionList,
@@ -95,7 +95,7 @@ export default {
items: () => {
return this.hashtags
},
- onEnter: (props) => this.openSuggestionList(props, HASHTAG),
+ onEnter: props => this.openSuggestionList(props, HASHTAG),
onChange: this.updateSuggestionList,
onExit: this.closeSuggestionList,
onKeyDown: this.navigateSuggestionList,
@@ -109,7 +109,7 @@ export default {
watch: {
placeholder: {
immediate: true,
- handler: function (val) {
+ handler: function(val) {
if (!val || !this.editor) {
return
}
@@ -129,7 +129,7 @@ export default {
new EventHandler(),
new History(),
],
- onUpdate: (e) => {
+ onUpdate: e => {
clearTimeout(throttleInputEvent)
throttleInputEvent = setTimeout(() => this.onUpdate(e), 300)
},
@@ -197,7 +197,7 @@ export default {
return items.slice(0, 15)
}
- const filteredList = items.filter((item) => {
+ const filteredList = items.filter(item => {
const itemString = item.slug || item.id
return itemString.toLowerCase().includes(query.toLowerCase())
})
diff --git a/webapp/components/Editor/MenuBar.vue b/webapp/components/Editor/MenuBar.vue
index 3756e1ae2..d1e084f2d 100644
--- a/webapp/components/Editor/MenuBar.vue
+++ b/webapp/components/Editor/MenuBar.vue
@@ -14,7 +14,7 @@
diff --git a/webapp/components/Editor/SuggestionList.vue b/webapp/components/Editor/SuggestionList.vue
index 54b7c7316..5e9c146a0 100644
--- a/webapp/components/Editor/SuggestionList.vue
+++ b/webapp/components/Editor/SuggestionList.vue
@@ -11,7 +11,7 @@
{{ $t('editor.hashtag.addLetter') }}
-
+
{{ $t('editor.hashtag.addHashtag') }}
#{{ query | truncate(50) }}
diff --git a/webapp/components/Editor/commands/pasteRule.js b/webapp/components/Editor/commands/pasteRule.js
index c84093d5e..7d48e7457 100644
--- a/webapp/components/Editor/commands/pasteRule.js
+++ b/webapp/components/Editor/commands/pasteRule.js
@@ -1,11 +1,11 @@
import { Plugin } from 'prosemirror-state'
import { Slice, Fragment } from 'prosemirror-model'
-export default function (regexp, type, getAttrs) {
- const handler = (fragment) => {
+export default function(regexp, type, getAttrs) {
+ const handler = fragment => {
const nodes = []
- fragment.forEach((child) => {
+ fragment.forEach(child => {
if (child.isText) {
const { text } = child
let pos = 0
@@ -43,7 +43,7 @@ export default function (regexp, type, getAttrs) {
return new Plugin({
props: {
- transformPasted: (slice) => new Slice(handler(slice.content), slice.openStart, slice.openEnd),
+ transformPasted: slice => new Slice(handler(slice.content), slice.openStart, slice.openEnd),
},
})
}
diff --git a/webapp/components/Editor/nodes/Embed.js b/webapp/components/Editor/nodes/Embed.js
index 0cbc4d7ad..e84b717e2 100644
--- a/webapp/components/Editor/nodes/Embed.js
+++ b/webapp/components/Editor/nodes/Embed.js
@@ -26,7 +26,7 @@ export default class Embed extends Node {
// source: https://stackoverflow.com/a/3809435
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/g,
type,
- (url) => ({ dataEmbedUrl: url }),
+ url => ({ dataEmbedUrl: url }),
),
]
}
@@ -43,12 +43,12 @@ export default class Embed extends Node {
parseDOM: [
{
tag: 'a[href].embed',
- getAttrs: (dom) => ({
+ getAttrs: dom => ({
dataEmbedUrl: dom.getAttribute('href'),
}),
},
],
- toDOM: (node) => [
+ toDOM: node => [
'a',
{
href: node.attrs.dataEmbedUrl,
diff --git a/webapp/components/Editor/nodes/Hashtag.js b/webapp/components/Editor/nodes/Hashtag.js
index 4e773dff7..0a06946aa 100644
--- a/webapp/components/Editor/nodes/Hashtag.js
+++ b/webapp/components/Editor/nodes/Hashtag.js
@@ -20,7 +20,7 @@ export default class Hashtag extends TipTapMention {
get schema() {
return {
...super.schema,
- toDOM: (node) => {
+ toDOM: node => {
// use a dummy domain because URL cannot handle relative urls
const url = new URL('/', 'https://human-connection.org')
url.searchParams.append('hashtag', node.attrs.id)
@@ -39,7 +39,7 @@ export default class Hashtag extends TipTapMention {
parseDOM: [
{
tag: 'a[data-hashtag-id]',
- getAttrs: (dom) => {
+ getAttrs: dom => {
const id = dom.getAttribute('data-hashtag-id')
const label = dom.innerText.split(this.options.matcher.char).join('')
return { id, label }
diff --git a/webapp/components/Editor/nodes/LegacyEmbed.js b/webapp/components/Editor/nodes/LegacyEmbed.js
index 9c583cf54..0d7a82a18 100644
--- a/webapp/components/Editor/nodes/LegacyEmbed.js
+++ b/webapp/components/Editor/nodes/LegacyEmbed.js
@@ -26,7 +26,7 @@ export default class Embed extends Node {
// source: https://stackoverflow.com/a/3809435
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/g,
type,
- (url) => ({ dataEmbedUrl: url }),
+ url => ({ dataEmbedUrl: url }),
),
]
}
@@ -43,12 +43,12 @@ export default class Embed extends Node {
parseDOM: [
{
tag: 'a[href].embed',
- getAttrs: (dom) => ({
+ getAttrs: dom => ({
dataEmbedUrl: dom.getAttribute('href'),
}),
},
],
- toDOM: (node) => [
+ toDOM: node => [
'a',
{
href: node.attrs.dataEmbedUrl,
diff --git a/webapp/components/Editor/nodes/Link.js b/webapp/components/Editor/nodes/Link.js
index 3850a063b..4856566d6 100644
--- a/webapp/components/Editor/nodes/Link.js
+++ b/webapp/components/Editor/nodes/Link.js
@@ -17,12 +17,12 @@ export default class Link extends TipTapLink {
{
// if this is an embed link or a hashtag, ignore
tag: 'a[href]:not(.embed):not([data-hashtag-id])',
- getAttrs: (dom) => ({
+ getAttrs: dom => ({
href: dom.getAttribute('href'),
}),
},
],
- toDOM: (node) => [
+ toDOM: node => [
'a',
{
...node.attrs,
diff --git a/webapp/components/Editor/nodes/Mention.js b/webapp/components/Editor/nodes/Mention.js
index dad983ed6..5b5d2a767 100644
--- a/webapp/components/Editor/nodes/Mention.js
+++ b/webapp/components/Editor/nodes/Mention.js
@@ -8,7 +8,7 @@ export default class Mention extends TipTapMention {
get schema() {
return {
...super.schema,
- toDOM: (node) => {
+ toDOM: node => {
return [
'a',
{
diff --git a/webapp/components/Embed/EmbedComponent.spec.js b/webapp/components/Embed/EmbedComponent.spec.js
index fd7452c01..157b4f9c6 100644
--- a/webapp/components/Embed/EmbedComponent.spec.js
+++ b/webapp/components/Embed/EmbedComponent.spec.js
@@ -17,7 +17,7 @@ describe('EmbedComponent.vue', () => {
beforeEach(() => {
mocks = {
- $t: (a) => a,
+ $t: a => a,
$apollo: {
mutate: jest
.fn()
diff --git a/webapp/components/Emotions/Emotions.vue b/webapp/components/Emotions/Emotions.vue
index e75c8848d..e4475c46b 100644
--- a/webapp/components/Emotions/Emotions.vue
+++ b/webapp/components/Emotions/Emotions.vue
@@ -37,7 +37,7 @@ export default {
}),
},
created() {
- Object.keys(this.PostsEmotionsCountByEmotion).map((emotion) => {
+ Object.keys(this.PostsEmotionsCountByEmotion).map(emotion => {
this.emotionsCount(emotion)
})
},
diff --git a/webapp/components/Empty/Empty.vue b/webapp/components/Empty/Empty.vue
index 5e797a0eb..a271b0ab9 100644
--- a/webapp/components/Empty/Empty.vue
+++ b/webapp/components/Empty/Empty.vue
@@ -27,7 +27,7 @@ export default {
icon: {
type: String,
default: 'alert',
- validator: (value) => {
+ validator: value => {
return value.match(/(messages|events|alert|tasks|docs|file)/)
},
},
diff --git a/webapp/components/ImageUploader/ImageUploader.spec.js b/webapp/components/ImageUploader/ImageUploader.spec.js
index ed3ecb1f9..e2e9f8d05 100644
--- a/webapp/components/ImageUploader/ImageUploader.spec.js
+++ b/webapp/components/ImageUploader/ImageUploader.spec.js
@@ -12,7 +12,7 @@ describe('ImageUploader.vue', () => {
$toast: {
error: jest.fn(),
},
- $t: jest.fn((string) => string),
+ $t: jest.fn(string => string),
}
})
describe('mount', () => {
diff --git a/webapp/components/ImageUploader/ImageUploader.vue b/webapp/components/ImageUploader/ImageUploader.vue
index b3ea5aa49..36f9b8485 100644
--- a/webapp/components/ImageUploader/ImageUploader.vue
+++ b/webapp/components/ImageUploader/ImageUploader.vue
@@ -93,7 +93,7 @@ export default {
if (this.file.type === 'image/jpeg') {
const canvas = this.cropper.getCroppedCanvas()
- canvas.toBlob((blob) => {
+ canvas.toBlob(blob => {
const imageAspectRatio = canvas.width / canvas.height
const croppedImageFile = new File([blob], this.file.name, { type: this.file.type })
onCropComplete(imageAspectRatio, croppedImageFile)
diff --git a/webapp/components/LocaleSwitch/LocaleSwitch.spec.js b/webapp/components/LocaleSwitch/LocaleSwitch.spec.js
index 800309bfc..812ff9253 100644
--- a/webapp/components/LocaleSwitch/LocaleSwitch.spec.js
+++ b/webapp/components/LocaleSwitch/LocaleSwitch.spec.js
@@ -14,12 +14,12 @@ describe('LocaleSwitch.vue', () => {
mocks = {
$i18n: {
locale: () => 'en',
- set: jest.fn((locale) => locale),
+ set: jest.fn(locale => locale),
},
$t: jest.fn(),
$toast: {
- success: jest.fn((a) => a),
- error: jest.fn((a) => a),
+ success: jest.fn(a => a),
+ error: jest.fn(a => a),
},
setPlaceholderText: jest.fn(),
$apollo: {
diff --git a/webapp/components/LocaleSwitch/LocaleSwitch.vue b/webapp/components/LocaleSwitch/LocaleSwitch.vue
index 47e53028b..fc87b7aa5 100644
--- a/webapp/components/LocaleSwitch/LocaleSwitch.vue
+++ b/webapp/components/LocaleSwitch/LocaleSwitch.vue
@@ -52,7 +52,7 @@ export default {
return find(this.locales, { code: this.$i18n.locale() })
},
routes() {
- const routes = this.locales.map((locale) => {
+ const routes = this.locales.map(locale => {
return {
name: locale.name,
path: locale.code,
diff --git a/webapp/components/MasonryGrid/MasonryGridItem.vue b/webapp/components/MasonryGrid/MasonryGridItem.vue
index fe4edba6e..663060f87 100644
--- a/webapp/components/MasonryGrid/MasonryGridItem.vue
+++ b/webapp/components/MasonryGrid/MasonryGridItem.vue
@@ -8,7 +8,7 @@
const landscapeRatio = 1.3
const squareRatio = 1
const portraitRatio = 0.7
-const getRowSpan = (aspectRatio) => {
+const getRowSpan = aspectRatio => {
if (aspectRatio >= landscapeRatio) return 13
else if (aspectRatio >= squareRatio) return 15
else if (aspectRatio >= portraitRatio) return 18
diff --git a/webapp/components/Modal.spec.js b/webapp/components/Modal.spec.js
index 3ebff8771..c309d5684 100644
--- a/webapp/components/Modal.spec.js
+++ b/webapp/components/Modal.spec.js
@@ -15,7 +15,7 @@ describe('Modal.vue', () => {
let state
let mocks
- const createWrapper = (mountMethod) => {
+ const createWrapper = mountMethod => {
return () => {
store = new Vuex.Store({
state,
@@ -38,7 +38,7 @@ describe('Modal.vue', () => {
beforeEach(() => {
mocks = {
$filters: {
- truncate: (a) => a,
+ truncate: a => a,
},
$toast: {
success: () => {},
diff --git a/webapp/components/Modal/ConfirmModal.spec.js b/webapp/components/Modal/ConfirmModal.spec.js
index 6d7d0ccf6..a1fc998ef 100644
--- a/webapp/components/Modal/ConfirmModal.spec.js
+++ b/webapp/components/Modal/ConfirmModal.spec.js
@@ -26,7 +26,7 @@ describe('ConfirmModal.vue', () => {
mocks = {
$t: jest.fn(),
$filters: {
- truncate: (a) => a,
+ truncate: a => a,
},
}
})
diff --git a/webapp/components/Modal/DisableModal.spec.js b/webapp/components/Modal/DisableModal.spec.js
index ed306a6cc..a1bc2046e 100644
--- a/webapp/components/Modal/DisableModal.spec.js
+++ b/webapp/components/Modal/DisableModal.spec.js
@@ -16,7 +16,7 @@ describe('DisableModal.vue', () => {
}
mocks = {
$filters: {
- truncate: (a) => a,
+ truncate: a => a,
},
$toast: {
success: jest.fn(),
@@ -24,9 +24,12 @@ describe('DisableModal.vue', () => {
},
$t: jest.fn(),
$apollo: {
- mutate: jest.fn().mockResolvedValueOnce().mockRejectedValue({
- message: 'Not Authorised!',
- }),
+ mutate: jest
+ .fn()
+ .mockResolvedValueOnce()
+ .mockRejectedValue({
+ message: 'Not Authorised!',
+ }),
},
location: {
reload: jest.fn(),
diff --git a/webapp/components/Modal/ReportModal.spec.js b/webapp/components/Modal/ReportModal.spec.js
index 999adacb4..de95cce99 100644
--- a/webapp/components/Modal/ReportModal.spec.js
+++ b/webapp/components/Modal/ReportModal.spec.js
@@ -17,9 +17,9 @@ describe('ReportModal.vue', () => {
id: 'c43',
}
mocks = {
- $t: jest.fn((a) => a),
+ $t: jest.fn(a => a),
$filters: {
- truncate: (a) => a,
+ truncate: a => a,
},
$toast: {
success: () => {},
diff --git a/webapp/components/Modal/ReportModal.vue b/webapp/components/Modal/ReportModal.vue
index e5cccf2fc..f6aca5f86 100644
--- a/webapp/components/Modal/ReportModal.vue
+++ b/webapp/components/Modal/ReportModal.vue
@@ -77,7 +77,7 @@ export default {
}
},
created() {
- this.form.reasonCategoryOptions = valuesReasonCategoryOptions.map((reasonCategory) => {
+ this.form.reasonCategoryOptions = valuesReasonCategoryOptions.map(reasonCategory => {
return {
label: this.$t('report.reason.category.options.' + reasonCategory),
value: reasonCategory,
@@ -134,7 +134,7 @@ export default {
}, 1500)
this.loading = false
})
- .catch((err) => {
+ .catch(err => {
this.$emit('close')
this.success = false
switch (err.message) {
diff --git a/webapp/components/Notification/Notification.spec.js b/webapp/components/Notification/Notification.spec.js
index 879bbfb7d..537babfae 100644
--- a/webapp/components/Notification/Notification.spec.js
+++ b/webapp/components/Notification/Notification.spec.js
@@ -16,7 +16,7 @@ describe('Notification', () => {
beforeEach(() => {
propsData = {}
mocks = {
- $t: (key) => key,
+ $t: key => key,
}
stubs = {
NuxtLink: RouterLinkStub,
diff --git a/webapp/components/NotificationList/NotificationList.spec.js b/webapp/components/NotificationList/NotificationList.spec.js
index ce20a2765..075891f14 100644
--- a/webapp/components/NotificationList/NotificationList.spec.js
+++ b/webapp/components/NotificationList/NotificationList.spec.js
@@ -7,7 +7,7 @@ import { notifications } from '~/components/utils/Notifications'
const localVue = global.localVue
-localVue.filter('truncate', (string) => string)
+localVue.filter('truncate', string => string)
config.stubs['client-only'] = ''
config.stubs['v-popover'] = ''
diff --git a/webapp/components/NotificationMenu/NotificationMenu.spec.js b/webapp/components/NotificationMenu/NotificationMenu.spec.js
index 3986471fd..a44d7a94d 100644
--- a/webapp/components/NotificationMenu/NotificationMenu.spec.js
+++ b/webapp/components/NotificationMenu/NotificationMenu.spec.js
@@ -3,7 +3,7 @@ import NotificationMenu from './NotificationMenu'
const localVue = global.localVue
-localVue.filter('truncate', (string) => string)
+localVue.filter('truncate', string => string)
config.stubs.dropdown = ''
diff --git a/webapp/components/NotificationMenu/NotificationMenu.vue b/webapp/components/NotificationMenu/NotificationMenu.vue
index ec991f0ef..072d9888c 100644
--- a/webapp/components/NotificationMenu/NotificationMenu.vue
+++ b/webapp/components/NotificationMenu/NotificationMenu.vue
@@ -98,7 +98,7 @@ export default {
notifications: unionBy(
[newNotification],
previousResult.notifications,
- (notification) => notification.id,
+ notification => notification.id,
).sort((a, b) => new Date(b.updatedAt) - new Date(a.updatedAt)),
}
},
diff --git a/webapp/components/NotificationsTable/NotificationsTable.spec.js b/webapp/components/NotificationsTable/NotificationsTable.spec.js
index b502b5982..ef4e19b01 100644
--- a/webapp/components/NotificationsTable/NotificationsTable.spec.js
+++ b/webapp/components/NotificationsTable/NotificationsTable.spec.js
@@ -6,7 +6,7 @@ import NotificationsTable from './NotificationsTable'
import { notifications } from '~/components/utils/Notifications'
const localVue = global.localVue
-localVue.filter('truncate', (string) => string)
+localVue.filter('truncate', string => string)
config.stubs['client-only'] = ''
@@ -17,7 +17,7 @@ describe('NotificationsTable.vue', () => {
beforeEach(() => {
mocks = {
- $t: jest.fn((string) => string),
+ $t: jest.fn(string => string),
}
stubs = {
NuxtLink: RouterLinkStub,
@@ -96,7 +96,7 @@ describe('NotificationsTable.vue', () => {
it('renders the reason for the notification', () => {
const dsTexts = firstRowNotification.findAll('.ds-text')
const reason = dsTexts.filter(
- (element) => element.text() === 'notifications.reason.mentioned_in_post',
+ element => element.text() === 'notifications.reason.mentioned_in_post',
)
expect(reason.exists()).toBe(true)
})
@@ -109,7 +109,7 @@ describe('NotificationsTable.vue', () => {
it("renders the Post's content", () => {
const boldTags = firstRowNotification.findAll('b')
const content = boldTags.filter(
- (element) => element.text() === postNotification.from.contentExcerpt,
+ element => element.text() === postNotification.from.contentExcerpt,
)
expect(content.exists()).toBe(true)
})
@@ -129,7 +129,7 @@ describe('NotificationsTable.vue', () => {
it('renders the reason for the notification', () => {
const dsTexts = secondRowNotification.findAll('.ds-text')
const reason = dsTexts.filter(
- (element) => element.text() === 'notifications.reason.mentioned_in_comment',
+ element => element.text() === 'notifications.reason.mentioned_in_comment',
)
expect(reason.exists()).toBe(true)
})
@@ -142,7 +142,7 @@ describe('NotificationsTable.vue', () => {
it("renders the Post's content", () => {
const boldTags = secondRowNotification.findAll('b')
const content = boldTags.filter(
- (element) => element.text() === commentNotification.from.contentExcerpt,
+ element => element.text() === commentNotification.from.contentExcerpt,
)
expect(content.exists()).toBe(true)
})
diff --git a/webapp/components/Password/Change.spec.js b/webapp/components/Password/Change.spec.js
index 8416a0fce..6010f5d8c 100644
--- a/webapp/components/Password/Change.spec.js
+++ b/webapp/components/Password/Change.spec.js
@@ -90,7 +90,7 @@ describe('ChangePassword.vue', () => {
})
describe('submit form', () => {
- beforeEach(async (done) => {
+ beforeEach(async done => {
await wrapper.find('form').trigger('submit')
done()
})
diff --git a/webapp/components/PasswordReset/Request.spec.js b/webapp/components/PasswordReset/Request.spec.js
index 83459814e..df55cff18 100644
--- a/webapp/components/PasswordReset/Request.spec.js
+++ b/webapp/components/PasswordReset/Request.spec.js
@@ -16,7 +16,7 @@ describe('Request', () => {
success: jest.fn(),
error: jest.fn(),
},
- $t: jest.fn((t) => t),
+ $t: jest.fn(t => t),
$apollo: {
loading: false,
mutate: jest.fn().mockResolvedValue({ data: { reqestPasswordReset: true } }),
diff --git a/webapp/components/ProgressBar/ProgressBar.spec.js b/webapp/components/ProgressBar/ProgressBar.spec.js
index e6617fc43..6fb6f1666 100644
--- a/webapp/components/ProgressBar/ProgressBar.spec.js
+++ b/webapp/components/ProgressBar/ProgressBar.spec.js
@@ -15,11 +15,19 @@ describe('ProgessBar.vue', () => {
describe('given only goal and progress', () => {
it('renders no title', () => {
- expect(Wrapper().find('.progress-bar__title').exists()).toBe(false)
+ expect(
+ Wrapper()
+ .find('.progress-bar__title')
+ .exists(),
+ ).toBe(false)
})
it('renders no label', () => {
- expect(Wrapper().find('.progress-bar__label').exists()).toBe(false)
+ expect(
+ Wrapper()
+ .find('.progress-bar__label')
+ .exists(),
+ ).toBe(false)
})
it('calculates the progress bar width as a percentage of the goal', () => {
@@ -33,7 +41,11 @@ describe('ProgessBar.vue', () => {
})
it('renders the title', () => {
- expect(Wrapper().find('.progress-bar__title').text()).toBe('This is progress')
+ expect(
+ Wrapper()
+ .find('.progress-bar__title')
+ .text(),
+ ).toBe('This is progress')
})
})
@@ -43,7 +55,11 @@ describe('ProgessBar.vue', () => {
})
it('renders the label', () => {
- expect(Wrapper().find('.progress-bar__label').text()).toBe('Going well')
+ expect(
+ Wrapper()
+ .find('.progress-bar__label')
+ .text(),
+ ).toBe('Going well')
})
})
})
diff --git a/webapp/components/Registration/CreateUserAccount.vue b/webapp/components/Registration/CreateUserAccount.vue
index 4603145c0..50967d240 100644
--- a/webapp/components/Registration/CreateUserAccount.vue
+++ b/webapp/components/Registration/CreateUserAccount.vue
@@ -110,11 +110,11 @@
:loading="$apollo.loading"
:disabled="
errors ||
- !termsAndConditionsConfirmed ||
- !dataPrivacy ||
- !minimumAge ||
- !noCommercial ||
- !noPolitical
+ !termsAndConditionsConfirmed ||
+ !dataPrivacy ||
+ !minimumAge ||
+ !noCommercial ||
+ !noPolitical
"
>
{{ $t('actions.save') }}
diff --git a/webapp/components/ReleaseModal/ReleaseModal.spec.js b/webapp/components/ReleaseModal/ReleaseModal.spec.js
index d1dafa5c9..80e07ccce 100644
--- a/webapp/components/ReleaseModal/ReleaseModal.spec.js
+++ b/webapp/components/ReleaseModal/ReleaseModal.spec.js
@@ -17,7 +17,7 @@ describe('ReleaseModal.vue', () => {
}
mocks = {
$filters: {
- truncate: (a) => a,
+ truncate: a => a,
},
$toast: {
success: jest.fn(),
@@ -25,7 +25,10 @@ describe('ReleaseModal.vue', () => {
},
$t: jest.fn(),
$apollo: {
- mutate: jest.fn().mockResolvedValueOnce().mockRejectedValue({ message: 'Not Authorised!' }),
+ mutate: jest
+ .fn()
+ .mockResolvedValueOnce()
+ .mockRejectedValue({ message: 'Not Authorised!' }),
},
location: {
reload: jest.fn(),
diff --git a/webapp/components/ShoutButton.vue b/webapp/components/ShoutButton.vue
index 8974010c3..dba25dfa5 100644
--- a/webapp/components/ShoutButton.vue
+++ b/webapp/components/ShoutButton.vue
@@ -36,7 +36,7 @@ export default {
watch: {
isShouted: {
immediate: true,
- handler: function (shouted) {
+ handler: function(shouted) {
this.shouted = shouted
},
},
@@ -66,7 +66,7 @@ export default {
id: this.postId,
},
})
- .then((res) => {
+ .then(res => {
if (res && res.data) {
this.$emit('update', shout)
}
diff --git a/webapp/components/Upload/index.vue b/webapp/components/Upload/index.vue
index f2ef4e712..bb37df105 100644
--- a/webapp/components/Upload/index.vue
+++ b/webapp/components/Upload/index.vue
@@ -50,7 +50,7 @@ export default {
watch: {
error() {
const that = this
- setTimeout(function () {
+ setTimeout(function() {
that.error = false
}, 2000)
},
@@ -79,7 +79,7 @@ export default {
.then(() => {
this.$toast.success(this.$t('user.avatar.submitted'))
})
- .catch((error) => this.$toast.error(error.message))
+ .catch(error => this.$toast.error(error.message))
},
verror(file, message) {
if (file.status === 'error') {
diff --git a/webapp/components/UserTeaser/UserTeaser.spec.js b/webapp/components/UserTeaser/UserTeaser.spec.js
index 354308109..cc39e65e5 100644
--- a/webapp/components/UserTeaser/UserTeaser.spec.js
+++ b/webapp/components/UserTeaser/UserTeaser.spec.js
@@ -3,7 +3,7 @@ import UserTeaser from './UserTeaser.vue'
import Vuex from 'vuex'
const localVue = global.localVue
-const filter = jest.fn((str) => str)
+const filter = jest.fn(str => str)
localVue.filter('truncate', filter)
diff --git a/webapp/components/_new/generic/BaseButton/BaseButton.vue b/webapp/components/_new/generic/BaseButton/BaseButton.vue
index d87598d76..5997ea8f1 100644
--- a/webapp/components/_new/generic/BaseButton/BaseButton.vue
+++ b/webapp/components/_new/generic/BaseButton/BaseButton.vue
@@ -3,7 +3,7 @@
:class="buttonClass"
:disabled="loading"
:type="type"
- @click.capture="(event) => $emit('click', event)"
+ @click.capture="event => $emit('click', event)"
>
diff --git a/webapp/components/_new/generic/UserAvatar/UserAvatar.vue b/webapp/components/_new/generic/UserAvatar/UserAvatar.vue
index 7dc63f52f..578bfb7a6 100644
--- a/webapp/components/_new/generic/UserAvatar/UserAvatar.vue
+++ b/webapp/components/_new/generic/UserAvatar/UserAvatar.vue
@@ -18,7 +18,7 @@ export default {
size: {
type: String,
required: false,
- validator: (value) => {
+ validator: value => {
return value.match(/(small|large)/)
},
},
@@ -34,7 +34,11 @@ export default {
userInitials() {
if (this.isAnonymous) return ''
- return this.user.name.match(/\b\w/g).join('').substring(0, 3).toUpperCase()
+ return this.user.name
+ .match(/\b\w/g)
+ .join('')
+ .substring(0, 3)
+ .toUpperCase()
},
},
}
diff --git a/webapp/components/features/FiledReportsTable/FiledReportsTable.spec.js b/webapp/components/features/FiledReportsTable/FiledReportsTable.spec.js
index 4931ea6c6..93f48ff9e 100644
--- a/webapp/components/features/FiledReportsTable/FiledReportsTable.spec.js
+++ b/webapp/components/features/FiledReportsTable/FiledReportsTable.spec.js
@@ -5,7 +5,7 @@ import { reports } from '~/components/features/ReportList/ReportList.story.js'
const localVue = global.localVue
-localVue.filter('truncate', (string) => string)
+localVue.filter('truncate', string => string)
config.stubs['client-only'] = ''
@@ -14,7 +14,7 @@ describe('FiledReportsTable.vue', () => {
beforeEach(() => {
mocks = {
- $t: jest.fn((string) => string),
+ $t: jest.fn(string => string),
}
stubs = {
NuxtLink: RouterLinkStub,
@@ -47,7 +47,7 @@ describe('FiledReportsTable.vue', () => {
describe('given reports', () => {
beforeEach(() => {
- filed = reports.map((report) => report.filed)
+ filed = reports.map(report => report.filed)
propsData.filed = filed[0]
wrapper = Wrapper()
})
@@ -74,7 +74,7 @@ describe('FiledReportsTable.vue', () => {
it('renders the category text', () => {
const columns = wrapper.findAll('.ds-table-col')
const reasonCategory = columns.filter(
- (category) =>
+ category =>
category.text() === 'report.reason.category.options.pornographic_content_links',
)
expect(reasonCategory.exists()).toBe(true)
@@ -83,7 +83,7 @@ describe('FiledReportsTable.vue', () => {
it("renders the Post's content", () => {
const columns = wrapper.findAll('.ds-table-col')
const reasonDescription = columns.filter(
- (column) => column.text() === 'This comment is porno!!!',
+ column => column.text() === 'This comment is porno!!!',
)
expect(reasonDescription.exists()).toBe(true)
})
diff --git a/webapp/components/features/ReportList/ReportList.spec.js b/webapp/components/features/ReportList/ReportList.spec.js
index d4dbc7132..cfd83b4a6 100644
--- a/webapp/components/features/ReportList/ReportList.spec.js
+++ b/webapp/components/features/ReportList/ReportList.spec.js
@@ -25,7 +25,7 @@ describe('ReportList', () => {
},
$t: jest.fn(),
$toast: {
- error: jest.fn((message) => message),
+ error: jest.fn(message => message),
},
}
mutations = {
diff --git a/webapp/components/features/ReportList/ReportList.story.js b/webapp/components/features/ReportList/ReportList.story.js
index 1572fb203..44b06d8fb 100644
--- a/webapp/components/features/ReportList/ReportList.story.js
+++ b/webapp/components/features/ReportList/ReportList.story.js
@@ -158,9 +158,9 @@ export const reports = [
],
},
]
-const unreviewedReports = reports.filter((report) => !report.reviewed)
-const reviewedReports = reports.filter((report) => report.reviewed)
-const closedReports = reports.filter((report) => report.closed)
+const unreviewedReports = reports.filter(report => !report.reviewed)
+const reviewedReports = reports.filter(report => report.reviewed)
+const closedReports = reports.filter(report => report.closed)
const filterOptions = [
{ label: 'All', value: reports },
{ label: 'Unreviewed', value: unreviewedReports },
diff --git a/webapp/components/features/ReportList/ReportList.vue b/webapp/components/features/ReportList/ReportList.vue
index 0bc752865..a6b1d9f5b 100644
--- a/webapp/components/features/ReportList/ReportList.vue
+++ b/webapp/components/features/ReportList/ReportList.vue
@@ -63,7 +63,7 @@ export default {
]
},
modalData() {
- return function (report) {
+ return function(report) {
const identStart =
'moderation.reports.decideModal.' +
report.resource.__typename +
@@ -131,7 +131,7 @@ export default {
this.$toast.success(this.$t('moderation.reports.DecisionSuccess'))
this.$apollo.queries.reportsList.refetch()
})
- .catch((error) => this.$toast.error(error.message))
+ .catch(error => this.$toast.error(error.message))
},
openModal(report) {
this.commitModalData(this.modalData(report))
diff --git a/webapp/components/features/ReportRow/ReportRow.spec.js b/webapp/components/features/ReportRow/ReportRow.spec.js
index b541a40d9..68e0144bd 100644
--- a/webapp/components/features/ReportRow/ReportRow.spec.js
+++ b/webapp/components/features/ReportRow/ReportRow.spec.js
@@ -14,7 +14,7 @@ describe('ReportRow', () => {
beforeEach(() => {
propsData = {}
mocks = {
- $t: jest.fn((string) => string),
+ $t: jest.fn(string => string),
}
stubs = {
NuxtLink: RouterLinkStub,
@@ -62,7 +62,7 @@ describe('ReportRow', () => {
it('renders a decided text', () => {
const decidedTitle = wrapper
.findAll('.title')
- .filter((title) => title.text() === 'moderation.reports.decided')
+ .filter(title => title.text() === 'moderation.reports.decided')
expect(decidedTitle.exists()).toBe(true)
})
})
@@ -85,7 +85,12 @@ describe('ReportRow', () => {
wrapper = Wrapper()
})
it('renders the disabled icon', () => {
- expect(wrapper.find('.status-line').find(BaseIcon).props().name).toEqual('eye-slash')
+ expect(
+ wrapper
+ .find('.status-line')
+ .find(BaseIcon)
+ .props().name,
+ ).toEqual('eye-slash')
})
it('renders its current status', () => {
@@ -99,7 +104,12 @@ describe('ReportRow', () => {
wrapper = Wrapper()
})
it('renders the enabled icon', () => {
- expect(wrapper.find('.status-line').find(BaseIcon).props().name).toEqual('eye')
+ expect(
+ wrapper
+ .find('.status-line')
+ .find(BaseIcon)
+ .props().name,
+ ).toEqual('eye')
})
it('renders its current status', () => {
diff --git a/webapp/components/features/ReportsTable/ReportsTable.spec.js b/webapp/components/features/ReportsTable/ReportsTable.spec.js
index a9baeea4f..222ade83c 100644
--- a/webapp/components/features/ReportsTable/ReportsTable.spec.js
+++ b/webapp/components/features/ReportsTable/ReportsTable.spec.js
@@ -14,7 +14,7 @@ describe('ReportsTable', () => {
beforeEach(() => {
propsData = {}
mocks = {
- $t: jest.fn((string) => string),
+ $t: jest.fn(string => string),
}
getters = {
'auth/user': () => {
diff --git a/webapp/components/features/SearchField/SearchField.spec.js b/webapp/components/features/SearchField/SearchField.spec.js
index 140b55caa..05daf7a9c 100644
--- a/webapp/components/features/SearchField/SearchField.spec.js
+++ b/webapp/components/features/SearchField/SearchField.spec.js
@@ -16,7 +16,7 @@ describe('SearchField.vue', () => {
$apollo: {
query: jest.fn(),
},
- $t: jest.fn((string) => string),
+ $t: jest.fn(string => string),
}
getters = { 'auth/isModerator': () => false }
wrapper = Wrapper()
diff --git a/webapp/components/generic/SearchHeading/SearchHeading.spec.js b/webapp/components/generic/SearchHeading/SearchHeading.spec.js
index 7552b609b..2ddd3e9ba 100644
--- a/webapp/components/generic/SearchHeading/SearchHeading.spec.js
+++ b/webapp/components/generic/SearchHeading/SearchHeading.spec.js
@@ -7,7 +7,7 @@ describe('SearchHeading.vue', () => {
let mocks, wrapper, propsData
beforeEach(() => {
mocks = {
- $t: jest.fn((string) => string),
+ $t: jest.fn(string => string),
}
propsData = {
resourceType: 'Post',
diff --git a/webapp/components/generic/SearchPost/SearchPost.spec.js b/webapp/components/generic/SearchPost/SearchPost.spec.js
index 713171078..39cf5dcc0 100644
--- a/webapp/components/generic/SearchPost/SearchPost.spec.js
+++ b/webapp/components/generic/SearchPost/SearchPost.spec.js
@@ -2,13 +2,13 @@ import { shallowMount } from '@vue/test-utils'
import SearchPost from './SearchPost.vue'
const localVue = global.localVue
-localVue.filter('dateTime', (d) => d)
+localVue.filter('dateTime', d => d)
describe('SearchPost.vue', () => {
let mocks, wrapper, propsData
beforeEach(() => {
mocks = {
- $t: jest.fn((string) => string),
+ $t: jest.fn(string => string),
}
propsData = {
option: {
@@ -38,7 +38,7 @@ describe('SearchPost.vue', () => {
wrapper
.find('.search-post-meta')
.findAll('span')
- .filter((item) => item.text() === '3')
+ .filter(item => item.text() === '3')
.exists(),
).toBe(true)
})
@@ -48,7 +48,7 @@ describe('SearchPost.vue', () => {
wrapper
.find('.search-post-meta')
.findAll('span')
- .filter((item) => item.text() === '6')
+ .filter(item => item.text() === '6')
.exists(),
).toBe(true)
})
diff --git a/webapp/components/generic/SearchableInput/SearchableInput.spec.js b/webapp/components/generic/SearchableInput/SearchableInput.spec.js
index 59315808e..4a095304b 100644
--- a/webapp/components/generic/SearchableInput/SearchableInput.spec.js
+++ b/webapp/components/generic/SearchableInput/SearchableInput.spec.js
@@ -19,7 +19,7 @@ describe('SearchableInput.vue', () => {
$router: {
push: jest.fn(),
},
- $t: jest.fn((string) => string),
+ $t: jest.fn(string => string),
}
getters = { 'auth/isModerator': () => false }
wrapper = Wrapper()
@@ -98,7 +98,7 @@ describe('SearchableInput.vue', () => {
select.element.value = 'Bob'
select.trigger('input')
const users = wrapper.findAll('.slug')
- const bob = users.filter((item) => item.text().match(/@bob-der-baumeister/))
+ const bob = users.filter(item => item.text().match(/@bob-der-baumeister/))
bob.trigger('click')
await Vue.nextTick()
expect(mocks.$router.push).toHaveBeenCalledWith({
@@ -111,7 +111,7 @@ describe('SearchableInput.vue', () => {
select.element.value = 'Hash'
select.trigger('input')
const tags = wrapper.findAll('.hc-hashtag')
- const tag = tags.filter((item) => item.text().match(/#Hashtag/))
+ const tag = tags.filter(item => item.text().match(/#Hashtag/))
tag.trigger('click')
await Vue.nextTick()
expect(mocks.$router.push).toHaveBeenCalledWith('?hashtag=Hashtag')
diff --git a/webapp/components/generic/SearchableInput/SearchableInput.vue b/webapp/components/generic/SearchableInput/SearchableInput.vue
index 7092b8a77..b0050b429 100644
--- a/webapp/components/generic/SearchableInput/SearchableInput.vue
+++ b/webapp/components/generic/SearchableInput/SearchableInput.vue
@@ -9,7 +9,7 @@
:icon-right="null"
:options="options"
:loading="loading"
- :filter="(item) => item"
+ :filter="item => item"
:no-options-available="emptyText"
:auto-reset-search="!searchValue"
:placeholder="$t('search.placeholder')"
@@ -88,8 +88,8 @@ export default {
methods: {
isFirstOfType(option) {
return (
- this.options.findIndex((o) => o === option) ===
- this.options.findIndex((o) => o.__typename === option.__typename)
+ this.options.findIndex(o => o === option) ===
+ this.options.findIndex(o => o.__typename === option.__typename)
)
},
onFocus(event) {
diff --git a/webapp/components/utils/NormalizeEmail.js b/webapp/components/utils/NormalizeEmail.js
index 45f8126e3..f79c5118b 100644
--- a/webapp/components/utils/NormalizeEmail.js
+++ b/webapp/components/utils/NormalizeEmail.js
@@ -1,6 +1,6 @@
import { normalizeEmail } from 'validator'
-export default (email) =>
+export default email =>
normalizeEmail(email, {
// gmail_remove_dots: false, default
gmail_remove_subaddress: false,
diff --git a/webapp/components/utils/ReportModal.spec.js b/webapp/components/utils/ReportModal.spec.js
index 2ce61e65e..babfaa5cc 100644
--- a/webapp/components/utils/ReportModal.spec.js
+++ b/webapp/components/utils/ReportModal.spec.js
@@ -8,7 +8,7 @@ beforeEach(() => {
})
describe('validReport', () => {
- const validate = (object) => {
+ const validate = object => {
const { formSchema } = validReport({ translate })
const validator = new Schema(formSchema)
return validator.validate(object, { suppressWarning: true }).catch(({ errors }) => {
diff --git a/webapp/components/utils/UniqueSlugForm.js b/webapp/components/utils/UniqueSlugForm.js
index f8fa07af6..c363fa608 100644
--- a/webapp/components/utils/UniqueSlugForm.js
+++ b/webapp/components/utils/UniqueSlugForm.js
@@ -15,7 +15,7 @@ export default function UniqueSlugForm({ translate, apollo, currentUser }) {
asyncValidator(rule, value, callback) {
debounce(() => {
const variables = { slug: value }
- apollo.query({ query: checkSlugAvailableQuery, variables }).then((response) => {
+ apollo.query({ query: checkSlugAvailableQuery, variables }).then(response => {
const {
data: { User },
} = response
diff --git a/webapp/components/utils/UniqueSlugForm.spec.js b/webapp/components/utils/UniqueSlugForm.spec.js
index 6e0d359e9..da65104fc 100644
--- a/webapp/components/utils/UniqueSlugForm.spec.js
+++ b/webapp/components/utils/UniqueSlugForm.spec.js
@@ -14,7 +14,7 @@ beforeEach(() => {
})
describe('UniqueSlugForm', () => {
- const validate = (object) => {
+ const validate = object => {
const { formSchema } = UniqueSlugForm({ translate, apollo, currentUser })
const validator = new Schema(formSchema)
return validator.validate(object, { suppressWarning: true }).catch(({ errors }) => {
diff --git a/webapp/components/utils/UpdateQuery.js b/webapp/components/utils/UpdateQuery.js
index a1b07a7c1..d601d0ac3 100644
--- a/webapp/components/utils/UpdateQuery.js
+++ b/webapp/components/utils/UpdateQuery.js
@@ -10,7 +10,7 @@ export default function UpdateQuery(component, { $state, pageKey }) {
$state.complete()
}
const result = {}
- result[pageKey] = unionBy(oldData, newData, (item) => item.id)
+ result[pageKey] = unionBy(oldData, newData, item => item.id)
$state.loaded()
return result
}
diff --git a/webapp/graphql/CommentMutations.js b/webapp/graphql/CommentMutations.js
index a73ebb00c..5c9e1bc72 100644
--- a/webapp/graphql/CommentMutations.js
+++ b/webapp/graphql/CommentMutations.js
@@ -1,6 +1,6 @@
import gql from 'graphql-tag'
-export default (i18n) => {
+export default i18n => {
const lang = i18n.locale().toUpperCase()
return {
CreateComment: gql`
diff --git a/webapp/graphql/CommentQuery.js b/webapp/graphql/CommentQuery.js
index 74da415e6..8765dd141 100644
--- a/webapp/graphql/CommentQuery.js
+++ b/webapp/graphql/CommentQuery.js
@@ -1,6 +1,6 @@
import gql from 'graphql-tag'
-export default (app) => {
+export default app => {
const lang = app.$i18n.locale().toUpperCase()
return gql`
query Comment($postId: ID) {
diff --git a/webapp/graphql/EmbedQuery.js b/webapp/graphql/EmbedQuery.js
index 685095d34..cc1475c06 100644
--- a/webapp/graphql/EmbedQuery.js
+++ b/webapp/graphql/EmbedQuery.js
@@ -1,6 +1,6 @@
import gql from 'graphql-tag'
-export default function () {
+export default function() {
return gql`
query($url: String!) {
embed(url: $url) {
diff --git a/webapp/graphql/Fragments.js b/webapp/graphql/Fragments.js
index 2626581e1..67dca4228 100644
--- a/webapp/graphql/Fragments.js
+++ b/webapp/graphql/Fragments.js
@@ -12,7 +12,7 @@ export const userFragment = gql`
deleted
}
`
-export const locationAndBadgesFragment = (lang) => gql`
+export const locationAndBadgesFragment = lang => gql`
fragment locationAndBadges on User {
location {
name: name${lang}
diff --git a/webapp/graphql/PostQuery.js b/webapp/graphql/PostQuery.js
index 38c90e438..5ddac9c1f 100644
--- a/webapp/graphql/PostQuery.js
+++ b/webapp/graphql/PostQuery.js
@@ -9,7 +9,7 @@ import {
tagsCategoriesAndPinnedFragment,
} from './Fragments'
-export default (i18n) => {
+export default i18n => {
const lang = i18n.locale().toUpperCase()
return gql`
${userFragment}
@@ -44,7 +44,7 @@ export default (i18n) => {
`
}
-export const filterPosts = (i18n) => {
+export const filterPosts = i18n => {
const lang = i18n.locale().toUpperCase()
return gql`
${userFragment}
@@ -69,7 +69,7 @@ export const filterPosts = (i18n) => {
`
}
-export const profilePagePosts = (i18n) => {
+export const profilePagePosts = i18n => {
const lang = i18n.locale().toUpperCase()
return gql`
${userFragment}
@@ -107,7 +107,7 @@ export const PostsEmotionsByCurrentUser = () => {
`
}
-export const relatedContributions = (i18n) => {
+export const relatedContributions = i18n => {
const lang = i18n.locale().toUpperCase()
return gql`
${userFragment}
diff --git a/webapp/graphql/User.js b/webapp/graphql/User.js
index aeb6ae729..70590813f 100644
--- a/webapp/graphql/User.js
+++ b/webapp/graphql/User.js
@@ -7,7 +7,7 @@ import {
commentFragment,
} from './Fragments'
-export default (i18n) => {
+export default i18n => {
const lang = i18n.locale().toUpperCase()
return gql`
${userFragment}
@@ -61,7 +61,7 @@ export const minimisedUserQuery = () => {
`
}
-export const notificationQuery = (i18n) => {
+export const notificationQuery = i18n => {
return gql`
${userFragment}
${commentFragment}
@@ -100,7 +100,7 @@ export const notificationQuery = (i18n) => {
`
}
-export const markAsReadMutation = (i18n) => {
+export const markAsReadMutation = i18n => {
return gql`
${userFragment}
${commentFragment}
@@ -174,7 +174,7 @@ export const notificationAdded = () => {
}
`
}
-export const followUserMutation = (i18n) => {
+export const followUserMutation = i18n => {
return gql`
${userFragment}
${userCountsFragment}
@@ -194,7 +194,7 @@ export const followUserMutation = (i18n) => {
`
}
-export const unfollowUserMutation = (i18n) => {
+export const unfollowUserMutation = i18n => {
return gql`
${userFragment}
${userCountsFragment}
diff --git a/webapp/layouts/error.spec.js b/webapp/layouts/error.spec.js
index dccb5eb49..95234ec5f 100644
--- a/webapp/layouts/error.spec.js
+++ b/webapp/layouts/error.spec.js
@@ -10,7 +10,7 @@ describe('error.vue', () => {
beforeEach(() => {
mocks = {
- $t: jest.fn((key) => key),
+ $t: jest.fn(key => key),
}
})
diff --git a/webapp/mixins/persistentLinks.js b/webapp/mixins/persistentLinks.js
index 0abe37c03..ce41251f7 100644
--- a/webapp/mixins/persistentLinks.js
+++ b/webapp/mixins/persistentLinks.js
@@ -1,7 +1,7 @@
-export default function (options = {}) {
+export default function(options = {}) {
const { queryId, querySlug, path, message = 'Page not found.' } = options
return {
- asyncData: async (context) => {
+ asyncData: async context => {
const {
params: { id, slug },
redirect,
diff --git a/webapp/nuxt.config.js b/webapp/nuxt.config.js
index 960785c0a..2ef42f139 100644
--- a/webapp/nuxt.config.js
+++ b/webapp/nuxt.config.js
@@ -261,7 +261,7 @@ export default {
})
}
- const svgRule = config.module.rules.find((rule) => rule.test.test('.svg'))
+ const svgRule = config.module.rules.find(rule => rule.test.test('.svg'))
svgRule.test = /\.(png|jpe?g|gif|webp)$/
config.module.rules.push({
test: /\.svg$/,
@@ -291,10 +291,10 @@ export default {
preTransformNode(abstractSyntaxTreeElement) {
if (!ctx.isDev) {
const { attrsMap, attrsList } = abstractSyntaxTreeElement
- tagAttributesForTesting.forEach((attribute) => {
+ tagAttributesForTesting.forEach(attribute => {
if (attrsMap[attribute]) {
delete attrsMap[attribute]
- const index = attrsList.findIndex((attr) => attr.name === attribute)
+ const index = attrsList.findIndex(attr => attr.name === attribute)
attrsList.splice(index, 1)
}
})
diff --git a/webapp/pages/admin/donations.vue b/webapp/pages/admin/donations.vue
index f99a26c0c..e628a1119 100644
--- a/webapp/pages/admin/donations.vue
+++ b/webapp/pages/admin/donations.vue
@@ -42,7 +42,7 @@ export default {
.then(() => {
this.$toast.success(this.$t('admin.donations.successfulUpdate'))
})
- .catch((error) => this.$toast.error(error.message))
+ .catch(error => this.$toast.error(error.message))
},
},
apollo: {
diff --git a/webapp/pages/index.spec.js b/webapp/pages/index.spec.js
index eb65e485c..f05143a3b 100644
--- a/webapp/pages/index.spec.js
+++ b/webapp/pages/index.spec.js
@@ -48,9 +48,9 @@ describe('PostIndex', () => {
mutations,
})
mocks = {
- $t: (key) => key,
+ $t: key => key,
$filters: {
- truncate: (a) => a,
+ truncate: a => a,
removeLinks: jest.fn(),
},
$i18n: {
@@ -120,7 +120,10 @@ describe('PostIndex', () => {
})
it('calls store when using order by menu', () => {
- wrapper.findAll('li').at(0).trigger('click')
+ wrapper
+ .findAll('li')
+ .at(0)
+ .trigger('click')
expect(mutations['posts/SELECT_ORDER']).toHaveBeenCalledWith({}, 'createdAt_asc')
})
})
diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue
index e6504cc7a..b35193fcb 100644
--- a/webapp/pages/index.vue
+++ b/webapp/pages/index.vue
@@ -161,7 +161,7 @@ export default {
})
},
deletePost(deletedPost) {
- this.posts = this.posts.filter((post) => {
+ this.posts = this.posts.filter(post => {
return post.id !== deletedPost.id
})
},
@@ -181,7 +181,7 @@ export default {
this.resetPostList()
this.$apollo.queries.Post.refetch()
})
- .catch((error) => this.$toast.error(error.message))
+ .catch(error => this.$toast.error(error.message))
},
unpinPost(post) {
this.$apollo
@@ -194,7 +194,7 @@ export default {
this.resetPostList()
this.$apollo.queries.Post.refetch()
})
- .catch((error) => this.$toast.error(error.message))
+ .catch(error => this.$toast.error(error.message))
},
},
apollo: {
diff --git a/webapp/pages/notifications/index.spec.js b/webapp/pages/notifications/index.spec.js
index 14bcf790b..70592b467 100644
--- a/webapp/pages/notifications/index.spec.js
+++ b/webapp/pages/notifications/index.spec.js
@@ -15,9 +15,9 @@ describe('PostIndex', () => {
beforeEach(() => {
propsData = {}
mocks = {
- $t: (string) => string,
+ $t: string => string,
$toast: {
- error: jest.fn((string) => string),
+ error: jest.fn(string => string),
},
$i18n: {
locale: () => 'en',
diff --git a/webapp/pages/post/_id/_slug/index.spec.js b/webapp/pages/post/_id/_slug/index.spec.js
index 12a84d4a6..a516334ad 100644
--- a/webapp/pages/post/_id/_slug/index.spec.js
+++ b/webapp/pages/post/_id/_slug/index.spec.js
@@ -48,8 +48,8 @@ describe('PostSlug', () => {
mocks = {
$t: jest.fn(),
$filters: {
- truncate: (a) => a,
- removeHtml: (a) => a,
+ truncate: a => a,
+ removeHtml: a => a,
},
$route: {
hash: '',
diff --git a/webapp/pages/post/_id/_slug/index.vue b/webapp/pages/post/_id/_slug/index.vue
index 9a4a796e1..3bbc4d146 100644
--- a/webapp/pages/post/_id/_slug/index.vue
+++ b/webapp/pages/post/_id/_slug/index.vue
@@ -205,7 +205,7 @@ export default {
.then(() => {
this.$toast.success(this.$t('post.menu.pinnedSuccessfully'))
})
- .catch((error) => this.$toast.error(error.message))
+ .catch(error => this.$toast.error(error.message))
},
unpinPost(post) {
this.$apollo
@@ -216,7 +216,7 @@ export default {
.then(() => {
this.$toast.success(this.$t('post.menu.unpinnedSuccessfully'))
})
- .catch((error) => this.$toast.error(error.message))
+ .catch(error => this.$toast.error(error.message))
},
toggleNewCommentForm(showNewCommentForm) {
this.showNewCommentForm = showNewCommentForm
diff --git a/webapp/pages/post/_id/_slug/more-info.vue b/webapp/pages/post/_id/_slug/more-info.vue
index 702de29ed..e8a90b61d 100644
--- a/webapp/pages/post/_id/_slug/more-info.vue
+++ b/webapp/pages/post/_id/_slug/more-info.vue
@@ -65,7 +65,7 @@ export default {
},
methods: {
removePostFromList(deletedPost) {
- this.post.relatedContributions = this.post.relatedContributions.filter((contribution) => {
+ this.post.relatedContributions = this.post.relatedContributions.filter(contribution => {
return contribution.id !== deletedPost.id
})
},
diff --git a/webapp/pages/profile/_id/_slug.spec.js b/webapp/pages/profile/_id/_slug.spec.js
index 0dfc87b85..8d95834a8 100644
--- a/webapp/pages/profile/_id/_slug.spec.js
+++ b/webapp/pages/profile/_id/_slug.spec.js
@@ -3,7 +3,7 @@ import ProfileSlug from './_slug.vue'
const localVue = global.localVue
-localVue.filter('date', (d) => d)
+localVue.filter('date', d => d)
config.stubs['client-only'] = ''
config.stubs['v-popover'] = ''
@@ -56,8 +56,8 @@ describe('ProfileSlug', () => {
describe('given an authenticated user', () => {
beforeEach(() => {
mocks.$filters = {
- removeLinks: (c) => c,
- truncate: (a) => a,
+ removeLinks: c => c,
+ truncate: a => a,
}
mocks.$store = {
getters: {
diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue
index 2b3ccb888..1d7bddf02 100644
--- a/webapp/pages/profile/_id/_slug.vue
+++ b/webapp/pages/profile/_id/_slug.vue
@@ -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 4b0ef95d7..01e508ad9 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 9766ab81c..3eac46665 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 3e3f032f6..3e0ed5a4c 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 8ee9d8ee7..4faae6692 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 22654afd0..dd64c1733 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 2d2cc406f..ffb1a0cc5 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 66407ad1f..e9c2e5a34 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 5753fc405..d909f4008 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 04dd68a2e..0071857ec 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 90cb301bc..7f3f7d7b2 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 c355472eb..e3f0c5fd2 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 ad5e5b27c..91d7ed1f0 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 7f09b2fb0..f54c02167 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 e6fcaf1dc..66c4ca248 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(/(.+)<\/a>/gim, '$1')
@@ -81,7 +81,7 @@ export default ({ app = {} }) => {
return contentExcerpt
},
- proxyApiUrl: (input) => {
+ proxyApiUrl: input => {
const url = input && (input.url || input)
if (!url) return url
return url.startsWith('/') ? url.replace('/', '/api/') : url
@@ -89,7 +89,7 @@ export default ({ app = {} }) => {
})
// add all methods as filters on each vue component
- Object.keys(app.$filters).forEach((key) => {
+ Object.keys(app.$filters).forEach(key => {
Vue.filter(key, app.$filters[key])
})
diff --git a/webapp/store/posts.js b/webapp/store/posts.js
index 4d1e6e097..4259ec625 100644
--- a/webapp/store/posts.js
+++ b/webapp/store/posts.js
@@ -60,19 +60,19 @@ export const mutations = {
},
TOGGLE_CATEGORY(state, categoryId) {
const filter = clone(state.filter)
- update(filter, 'categories_some.id_in', (categoryIds) => xor(categoryIds, [categoryId]))
+ update(filter, 'categories_some.id_in', categoryIds => xor(categoryIds, [categoryId]))
if (isEmpty(get(filter, 'categories_some.id_in'))) delete filter.categories_some
state.filter = filter
},
TOGGLE_LANGUAGE(state, languageCode) {
const filter = clone(state.filter)
- update(filter, 'language_in', (languageCodes) => xor(languageCodes, [languageCode]))
+ update(filter, 'language_in', languageCodes => xor(languageCodes, [languageCode]))
if (isEmpty(get(filter, 'language_in'))) delete filter.language_in
state.filter = filter
},
TOGGLE_EMOTION(state, emotion) {
const filter = clone(state.filter)
- update(filter, 'emotions_some.emotion_in', (emotions) => xor(emotions, [emotion]))
+ update(filter, 'emotions_some.emotion_in', emotions => xor(emotions, [emotion]))
if (isEmpty(get(filter, 'emotions_some.emotion_in'))) delete filter.emotions_some
state.filter = filter
},
@@ -100,14 +100,14 @@ export const getters = {
filteredByEmotions(state) {
return get(state.filter, 'emotions_some.emotion_in') || []
},
- orderOptions: (state) => ({ $t }) =>
- Object.values(orderOptions).map((option) => {
+ orderOptions: state => ({ $t }) =>
+ Object.values(orderOptions).map(option => {
return {
...option,
label: $t(option.key),
}
}),
- selectedOrder: (state) => ({ $t }) => {
+ selectedOrder: state => ({ $t }) => {
return {
...state.order,
label: $t(state.order.key),
diff --git a/webapp/store/posts.spec.js b/webapp/store/posts.spec.js
index 9aed0a351..05cea7b13 100644
--- a/webapp/store/posts.spec.js
+++ b/webapp/store/posts.spec.js
@@ -82,7 +82,7 @@ describe('getters', () => {
describe('orderByOptions', () => {
it('returns all options regardless of current state', () => {
- const $t = jest.fn((t) => t)
+ const $t = jest.fn(t => t)
expect(getters.orderOptions()({ $t })).toEqual([
{
key: 'store.posts.orderBy.oldest.label',
@@ -131,7 +131,7 @@ describe('mutations', () => {
describe('RESET_CATEGORIES', () => {
beforeEach(() => {
- testMutation = (categoryId) => {
+ testMutation = categoryId => {
mutations.RESET_CATEGORIES(state, categoryId)
return getters.filter(state)
}
@@ -149,7 +149,7 @@ describe('mutations', () => {
describe('TOGGLE_LANGUAGE', () => {
beforeEach(() => {
- testMutation = (languageCode) => {
+ testMutation = languageCode => {
mutations.TOGGLE_LANGUAGE(state, languageCode)
return getters.filter(state)
}
@@ -188,7 +188,7 @@ describe('mutations', () => {
describe('TOGGLE_CATEGORY', () => {
beforeEach(() => {
- testMutation = (categoryId) => {
+ testMutation = categoryId => {
mutations.TOGGLE_CATEGORY(state, categoryId)
return getters.filter(state)
}
@@ -228,7 +228,7 @@ describe('mutations', () => {
describe('TOGGLE_FILTER_BY_FOLLOWED', () => {
beforeEach(() => {
- testMutation = (userId) => {
+ testMutation = userId => {
mutations.TOGGLE_FILTER_BY_FOLLOWED(state, userId)
return getters.filter(state)
}
@@ -257,7 +257,7 @@ describe('mutations', () => {
describe('SELECT_ORDER', () => {
beforeEach(() => {
- testMutation = (key) => {
+ testMutation = key => {
mutations.SELECT_ORDER(state, key)
return getters.orderBy(state)
}
diff --git a/webapp/storybook/config.js b/webapp/storybook/config.js
index 037c8fd1e..576136f92 100644
--- a/webapp/storybook/config.js
+++ b/webapp/storybook/config.js
@@ -27,7 +27,7 @@ Vue.component('v-popover', {
// Globally register base components
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', '')
@@ -39,7 +39,7 @@ componentFiles.keys().forEach((fileName) => {
const scssReq = require.context('!!raw-loader!~/assets/_new/styles', true, /.\.scss$/)
const scssTokenFiles = scssReq
.keys()
- .map((filename) => ({ filename, content: scssReq(filename).default }))
+ .map(filename => ({ filename, content: scssReq(filename).default }))
addParameters({
designToken: {
diff --git a/webapp/storybook/helpers.js b/webapp/storybook/helpers.js
index 677a2bf94..f6d81eefe 100644
--- a/webapp/storybook/helpers.js
+++ b/webapp/storybook/helpers.js
@@ -25,7 +25,7 @@ const helpers = {
Vue.i18n.fallback('en')
const { plugins = [] } = options
- plugins.forEach((plugin) => Vue.use(plugin))
+ plugins.forEach(plugin => Vue.use(plugin))
},
store: new Vuex.Store({
modules: {
diff --git a/webapp/storybook/webpack.config.js b/webapp/storybook/webpack.config.js
index 6e1f857b8..050d1e868 100644
--- a/webapp/storybook/webpack.config.js
+++ b/webapp/storybook/webpack.config.js
@@ -34,7 +34,7 @@ module.exports = async ({ config, mode }) => {
// load svgs with vue-svg-loader instead of file-loader
const rule = config.module.rules.find(
- (r) =>
+ r =>
r.test && r.test.toString().includes('svg') && r.loader && r.loader.includes('file-loader'),
)
rule.test = /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani)(\?.*)?$/