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 @@