This commit is contained in:
roschaefer 2019-11-16 14:34:23 +01:00
parent d0e3d33848
commit 36062ffa8c
21 changed files with 26 additions and 25 deletions

View File

@ -69,7 +69,7 @@ export default {
if (!this.user.slug) {
return []
}
let routes = [
const routes = [
{
name: this.$t('profile.name'),
path: `/profile/${this.user.id}/${this.user.slug}`,

View File

@ -9,7 +9,7 @@ describe('Category', () => {
let icon
let name
let Wrapper = () => {
const Wrapper = () => {
return shallowMount(Category, {
localVue,
propsData: {

View File

@ -53,7 +53,7 @@ export default {
},
computed: {
routes() {
let routes = []
const routes = []
if (this.resourceType === 'contribution') {
if (this.isOwner) {

View File

@ -223,7 +223,7 @@ export default {
this.form.teaserImage = file
},
categoryIds(categories) {
let categoryIds = []
const categoryIds = []
categories.map(categoryId => {
categoryIds.push(categoryId.id)
})

View File

@ -101,7 +101,7 @@ export default {
}
},
handleSubmit() {
let resourceArgs = []
const resourceArgs = []
if (this.deleteContributions) {
resourceArgs.push('Post')
}

View File

@ -79,7 +79,7 @@ describe('Editor.vue', () => {
describe('limists suggestion list to 15 users', () => {
beforeEach(() => {
let manyUsersList = []
const manyUsersList = []
for (let i = 0; i < 25; i++) {
manyUsersList.push({ id: `user${i}` })
}
@ -120,7 +120,7 @@ describe('Editor.vue', () => {
describe('limists suggestion list to 15 hashtags', () => {
beforeEach(() => {
let manyHashtagsList = []
const manyHashtagsList = []
for (let i = 0; i < 25; i++) {
manyHashtagsList.push({ id: `hashtag${i}` })
}

View File

@ -5,6 +5,7 @@ export default class EventHandler extends Extension {
get name() {
return 'event_handler'
}
get plugins() {
return [
new Plugin({

View File

@ -10,7 +10,7 @@ config.stubs['nuxt-link'] = '<span><slot /></span>'
describe('Hashtag', () => {
let id
let Wrapper = () => {
const Wrapper = () => {
return shallowMount(Hashtag, {
localVue,
propsData: {

View File

@ -58,7 +58,7 @@ export default {
return find(this.locales, { code: this.$i18n.locale() })
},
routes() {
let routes = this.locales.map(locale => {
const routes = this.locales.map(locale => {
return {
name: locale.name,
path: locale.code,

View File

@ -10,7 +10,7 @@ localVue.use(Styleguide)
localVue.use(Filters)
localVue.filter('truncate', string => string)
config.stubs['dropdown'] = '<span class="dropdown"><slot /></span>'
config.stubs.dropdown = '<span class="dropdown"><slot /></span>'
describe('NotificationMenu.vue', () => {
let wrapper

View File

@ -7,13 +7,13 @@ const localVue = createLocalVue()
localVue.use(Styleguide)
describe('Paginate.vue', () => {
let propsData, wrapper, Wrapper, nextButton, backButton
let propsData, wrapper, nextButton, backButton
beforeEach(() => {
propsData = {}
})
Wrapper = () => {
const Wrapper = () => {
return mount(Paginate, { propsData, localVue })
}
describe('mount', () => {

View File

@ -16,7 +16,7 @@ describe('RelativeDateTime', () => {
}
})
let Wrapper = () => {
const Wrapper = () => {
return shallowMount(RelativeDateTime, {
mocks,
localVue,

View File

@ -6,7 +6,7 @@ const localVue = createLocalVue()
describe('Ribbon', () => {
let text
let Wrapper = () => {
const Wrapper = () => {
return shallowMount(Ribbon, {
localVue,
propsData: {

View File

@ -64,7 +64,7 @@ export default {
},
watch: {
error() {
let that = this
const that = this
setTimeout(function() {
that.error = false
}, 2000)

View File

@ -43,7 +43,7 @@ export default {
},
watch: {
error() {
let that = this
const that = this
setTimeout(function() {
that.error = false
}, 2000)

View File

@ -8,7 +8,7 @@ beforeEach(() => {
})
describe('validReport', () => {
let validate = object => {
const validate = object => {
const { formSchema } = validReport({ translate })
const validator = new Schema(formSchema)
return validator.validate(object, { suppressWarning: true }).catch(({ errors }) => {

View File

@ -14,7 +14,7 @@ beforeEach(() => {
})
describe('UniqueSlugForm', () => {
let validate = object => {
const validate = object => {
const { formSchema } = UniqueSlugForm({ translate, apollo, currentUser })
const validator = new Schema(formSchema)
return validator.validate(object, { suppressWarning: true }).catch(({ errors }) => {

View File

@ -1,7 +1,7 @@
import isEmpty from 'lodash/isEmpty'
export default async ({ store, env, route, redirect }) => {
let publicPages = env.publicPages
const publicPages = env.publicPages
// only affect non public pages
if (publicPages.indexOf(route.name) >= 0) {
return true
@ -17,7 +17,7 @@ export default async ({ store, env, route, redirect }) => {
// await store.dispatch('auth/logout', null, { root: true })
// set the redirect path for after the login
let params = {}
const params = {}
if (!isEmpty(route.path) && route.path !== '/') {
params.path = route.path
}

View File

@ -1,7 +1,7 @@
import isEmpty from 'lodash/isEmpty'
export default async ({ store, env, route, redirect }) => {
let publicPages = env.publicPages
const publicPages = env.publicPages
// only affect non public pages
if (publicPages.indexOf(route.name) >= 0) {
return true
@ -11,7 +11,7 @@ export default async ({ store, env, route, redirect }) => {
if (store.getters['auth/termsAndConditionsAgreed']) return true
let params = {}
const params = {}
if (!isEmpty(route.path) && route.path !== '/') {
params.path = route.path
}

View File

@ -117,7 +117,7 @@ export default {
this.loadingData = true
const { name, slug, about } = this.formData
let { locationName } = this.formData || this.currentUser
locationName = locationName && (locationName['label'] || locationName)
locationName = locationName && (locationName.label || locationName)
try {
await this.$apollo.mutate({
mutation,
@ -154,7 +154,7 @@ export default {
if (!res || !res.data || !res.data.features || !res.data.features.length) {
return []
}
let output = []
const output = []
res.data.features.forEach(item => {
output.push({
label: item.place_name,

View File

@ -25,7 +25,7 @@ export const state = () => {
filter: {
...defaultFilter,
},
order: orderOptions['createdAt_desc'],
order: orderOptions.createdAt_desc,
}
}