Enforce trailing commas

This commit is contained in:
Sytone 2021-06-02 11:40:31 -07:00
parent 5d36d9399d
commit c3c22bf202
31 changed files with 76 additions and 72 deletions

View File

@ -1,5 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
'@vue/app',
],
}

View File

@ -76,6 +76,10 @@
"quotes": [
"error",
"single"
],
"comma-dangle": [
"error",
"always-multiline"
]
},
"parserOptions": {

View File

@ -55,7 +55,7 @@ export default {
computed: {
showIconOnly() {
return this.icon !== '' && typeof this.$slots.default === 'undefined'
}
},
},
methods: {
click(e) {

View File

@ -145,16 +145,16 @@ export default {
},
props: {
value: {
validator: prop => prop instanceof Date || prop === null || typeof prop === 'string'
validator: prop => prop instanceof Date || prop === null || typeof prop === 'string',
},
chooseDateLabel: {
type: String,
default: 'Choose a date'
default: 'Choose a date',
},
disabled: {
type: Boolean,
default: false,
}
},
},
mounted() {
this.setDateValue(this.value)

View File

@ -108,21 +108,21 @@ export default {
type: Boolean,
default() {
return false
}
},
},
// The placeholder of the search input
placeholder: {
type: String,
default() {
return ''
}
},
},
// The search results where the @search listener needs to put the results into
searchResults: {
type: Array,
default() {
return []
}
},
},
// The name of the property of the searched object to show the user.
// If empty the component will show all raw data of an entry.
@ -130,13 +130,13 @@ export default {
type: String,
default() {
return ''
}
},
},
// The object with the value, updated every time an entry is selected.
value: {
default() {
return null
}
},
},
// If true, will provide an "add this as a new value" entry which fires an @create event when clicking on it.
creatable: {

View File

@ -22,7 +22,7 @@ export default {
type: String,
required: false,
default: '',
}
},
},
}
</script>

View File

@ -6,6 +6,6 @@
<script>
export default {
name: 'nothing'
name: 'nothing',
}
</script>

View File

@ -14,7 +14,7 @@ export default {
keys: {
type: Array,
required: true,
}
},
},
}
</script>

View File

@ -115,7 +115,7 @@ export default {
.catch(e => {
this.error(e, this)
})
}
},
},
}
</script>

View File

@ -382,7 +382,7 @@ export default {
reset() {
this.query = ''
this.selectedCmd = null
}
},
},
}
</script>

View File

@ -250,7 +250,7 @@ export default {
this.showNewForm = false
this.success(
{message: 'The link share was successfully created'},
this
this,
)
this.load()
})
@ -268,7 +268,7 @@ export default {
.then(() => {
this.success(
{message: 'The link share was successfully deleted'},
this
this,
)
this.load()
})

View File

@ -245,7 +245,7 @@ export default {
.then((r) => {
this.$set(this, 'sharables', r)
r.forEach((s) =>
this.$set(this.selectedRight, s.id, s.right)
this.$set(this.selectedRight, s.id, s.right),
)
})
.catch((e) => {
@ -302,7 +302,7 @@ export default {
this.shareType +
' was successfully added.',
},
this
this,
)
this.load()
})
@ -347,7 +347,7 @@ export default {
this.shareType +
' right was successfully updated.',
},
this
this,
)
})
.catch((e) => {

View File

@ -51,15 +51,15 @@ export default {
listService: ListService,
taskService: TaskService,
labelService: LabelService,
labelTaskService: LabelTaskService
labelTaskService: LabelTaskService,
};
},
components: {},
props: {
listId: {
type: Number,
required: false
}
required: false,
},
},
created() {
this.listService = new ListService();
@ -75,9 +75,9 @@ export default {
}
this.showError = false;
let task = new TaskModel({
const task = new TaskModel({
title: this.newTaskText,
listId: this.listId
listId: this.listId,
});
if (this.listId === undefined) {
@ -107,7 +107,7 @@ export default {
labelAddsToWaitFor.push(
new Promise((resolve, reject) => {
labelAddings.push({ resolve: resolve, reject: reject });
})
}),
);
});
@ -133,7 +133,7 @@ export default {
if (res.length > 0 && res[0].title === labelTitle) {
const labelTask = new LabelTask({
taskId: task.id,
labelId: res[0].id
labelId: res[0].id,
});
this.labelTaskService
.create(labelTask)
@ -157,7 +157,7 @@ export default {
.then(res => {
const labelTask = new LabelTask({
taskId: task.id,
labelId: res.id
labelId: res.id,
});
this.labelTaskService
.create(labelTask)
@ -167,7 +167,7 @@ export default {
// Remove the label text from the task title
task.title = task.title.replace(
` ~${labelTitle}`,
''
'',
);
// Make the promise done (the one with the index 0 does not exist)
@ -209,7 +209,7 @@ export default {
.catch(e => {
this.error(e, this);
});
}
}
},
},
};
</script>

View File

@ -387,7 +387,7 @@ export default {
let startDate = new Date(this.startDate)
startDate.setDate(
startDate.getDate() + newRect.left / this.dayWidth
startDate.getDate() + newRect.left / this.dayWidth,
)
startDate.setUTCHours(0)
startDate.setUTCMinutes(0)
@ -396,7 +396,7 @@ export default {
this.taskDragged.startDate = startDate
let endDate = new Date(startDate)
endDate.setDate(
startDate.getDate() + newRect.width / this.dayWidth
startDate.getDate() + newRect.width / this.dayWidth,
)
this.taskDragged.startDate = startDate
this.taskDragged.endDate = endDate
@ -439,7 +439,7 @@ export default {
this.$set(
this.theTasks,
tt,
this.addGantAttributes(r)
this.addGantAttributes(r),
)
break
}

View File

@ -224,7 +224,7 @@ export default {
.then((r) => {
this.$store.commit(
'attachments/removeById',
this.attachmentToDelete.id
this.attachmentToDelete.id,
)
this.success(r, this)
})

View File

@ -260,7 +260,7 @@ export default {
this.newComment.comment = ''
this.success(
{message: 'The comment was added successfully.'},
this
this,
)
})
.catch((e) => {

View File

@ -91,7 +91,7 @@ export default {
.finally(() => {
this.saving = false
})
}
},
},
}
</script>

View File

@ -95,7 +95,7 @@ export default {
.finally(() => {
this.saving = false
})
}
},
},
}
</script>

View File

@ -135,7 +135,7 @@ export default {
showListColor: {
type: Boolean,
default: true,
}
},
},
watch: {
theTask(newVal) {
@ -183,7 +183,7 @@ export default {
callback: () => {
this.task.done = !this.task.done
this.markAsDone(!checked)
}
},
}],
)
})

View File

@ -170,7 +170,7 @@ export default new Router({
name: 'list.create',
components: {
popup: NewListComponent,
}
},
},
{
path: '/namespaces/:id/settings/edit',

View File

@ -69,6 +69,6 @@ export default {
ctx.commit('setList', list)
return Promise.reject(e)
})
}
},
},
}

View File

@ -44,7 +44,7 @@ export default {
name: 'Home',
components: {
ShowTasks,
AddTask
AddTask,
},
data() {
return {
@ -54,7 +54,7 @@ export default {
defaultList: ListModel,
updateWelcomeInterval: 1000,
welcomePrefix: 'Hi',
showTasksKey: 0
showTasksKey: 0,
};
},
created() {
@ -64,7 +64,7 @@ export default {
mounted() {
const timer = window.setTimeout(
this.updateWelcome,
this.updateWelcomeInterval
this.updateWelcomeInterval,
);
this.$on('hook:destroyed', () => window.clearTimeout(timer));
},
@ -88,7 +88,7 @@ export default {
}
return state.namespaces.namespaces[0].lists.length > 0;
}
},
}),
methods: {
updateTaskList() {
@ -105,9 +105,9 @@ export default {
}
this.$options.timer = window.setTimeout(
this.updateDateTime,
this.updateWelcomeInterval
this.updateWelcomeInterval,
);
}
}
},
},
};
</script>

View File

@ -79,7 +79,7 @@ export default {
})
this.success(
{ message: 'The label was successfully created.' },
this
this,
)
})
.catch((e) => {

View File

@ -71,7 +71,7 @@ export default {
.then((r) => {
this.success(
{ message: 'The list was successfully created.' },
this
this,
)
this.$router.push({
name: 'list.index',

View File

@ -194,7 +194,7 @@ export default {
labelTaskService: LabelTaskService,
labelService: LabelService,
ctaVisible: false
ctaVisible: false,
};
},
mixins: [taskList],
@ -203,7 +203,7 @@ export default {
FilterPopup,
SingleTaskInList,
EditTask,
AddTask
AddTask,
},
created() {
this.taskService = new TaskService();
@ -216,7 +216,7 @@ export default {
},
computed: mapState({
canWrite: state => state.currentList.maxRight > Rights.READ,
list: state => state.currentList
list: state => state.currentList,
}),
mounted() {
this.$nextTick(() => (this.ctaVisible = true));
@ -255,7 +255,7 @@ export default {
}
}
this.sortTasks();
}
}
},
},
};
</script>

View File

@ -82,7 +82,7 @@ export default {
this.$store.commit('namespaces/addNamespace', r)
this.success(
{ message: 'The namespace was successfully created.' },
this
this,
)
this.$router.back()
})

View File

@ -637,7 +637,7 @@ export default {
this.$refs[fieldName].$el.scrollIntoView({
behavior: 'smooth',
block: 'center',
inline: 'nearest'
inline: 'nearest',
})
}
})

View File

@ -265,7 +265,7 @@ export default {
this.team = response
this.success(
{message: 'The team was successfully updated.'},
this
this,
)
})
.catch((e) => {
@ -278,7 +278,7 @@ export default {
.then(() => {
this.success(
{message: 'The team was successfully deleted.'},
this
this,
)
router.push({name: 'teams.index'})
})
@ -295,7 +295,7 @@ export default {
message:
'The user was successfully deleted from the team.',
},
this
this,
)
this.loadTeam()
})
@ -317,7 +317,7 @@ export default {
this.loadTeam()
this.success(
{message: 'The team member was successfully added.'},
this
this,
)
})
.catch((e) => {
@ -343,7 +343,7 @@ export default {
(member.admin ? 'admin' : 'member') +
'.',
},
this
this,
)
})
.catch((e) => {

View File

@ -69,7 +69,7 @@ export default {
})
this.success(
{ message: 'The team was successfully created.' },
this
this,
)
})
.catch((e) => {

View File

@ -320,7 +320,7 @@ export default {
migratorsEnabled: state => state.config.availableMigrators !== null && state.config.availableMigrators.length > 0,
caldavEnabled: state => state.config.caldavEnabled,
userInfo: state => state.auth.info,
})
}),
},
methods: {
updatePassword() {

View File

@ -24,18 +24,18 @@ module.exports = {
{
'src': './images/icons/android-chrome-192x192.png',
'sizes': '192x192',
'type': 'image/png'
'type': 'image/png',
},
{
'src': './images/icons/android-chrome-512x512.png',
'sizes': '512x512',
'type': 'image/png'
'type': 'image/png',
},
{
'src': './images/icons/icon-maskable.png',
'sizes': '1024x1024',
'type': 'image/png',
'purpose': 'maskable'
'purpose': 'maskable',
},
],
shortcuts: [
@ -62,8 +62,8 @@ module.exports = {
name: 'Teams Overview',
short_name: 'Teams',
url: '/teams',
}
]
},
],
},
}
},
}