aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/src
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-06-25 00:00:31 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-07-09 17:13:30 +0200
commit691f570237e26398aa22f40c0efca23141d5583e (patch)
tree4409270ac8ee482ad03f745f77003c726ffbf09f /apps/dav/src
parent3a97dbf248b3e581b5782a638743958eb6f2a640 (diff)
downloadnextcloud-server-691f570237e26398aa22f40c0efca23141d5583e.tar.gz
nextcloud-server-691f570237e26398aa22f40c0efca23141d5583e.zip
chore: Enable ESLint for apps and fix all errors
Nevertheless this causes a huge amount of new warnings. Previously the shell script for directories to lint was wrong it was generating all app names to lint, but was missing the `apps/` prefix. Causing only `core` to be linted. Co-authored-by: Grigorii K. Shartsev <me@shgk.me> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/dav/src')
-rw-r--r--apps/dav/src/components/AbsenceForm.vue35
-rw-r--r--apps/dav/src/dav/client.js2
-rw-r--r--apps/dav/src/service/PreferenceService.js4
-rw-r--r--apps/dav/src/settings.js4
-rw-r--r--apps/dav/src/views/CalDavSettings.spec.js12
-rw-r--r--apps/dav/src/views/CalDavSettings.vue4
6 files changed, 30 insertions, 31 deletions
diff --git a/apps/dav/src/components/AbsenceForm.vue b/apps/dav/src/components/AbsenceForm.vue
index 33f1483a7fb..cb3fabe49df 100644
--- a/apps/dav/src/components/AbsenceForm.vue
+++ b/apps/dav/src/components/AbsenceForm.vue
@@ -26,8 +26,7 @@
:clear-search-on-blur="() => false"
:user-select="true"
:options="options"
- @search="asyncFind"
- >
+ @search="asyncFind">
<template #no-options="{ search }">
{{ search ?$t('dav', 'No results.') : $t('dav', 'Start typing.') }}
</template>
@@ -51,21 +50,21 @@
</template>
<script>
+import { getCurrentUser } from '@nextcloud/auth'
+import { showError, showSuccess } from '@nextcloud/dialogs'
+import { loadState } from '@nextcloud/initial-state'
+import { generateOcsUrl } from '@nextcloud/router'
+import { ShareType } from '@nextcloud/sharing'
+import { formatDateAsYMD } from '../utils/date.js'
+import axios from '@nextcloud/axios'
+import debounce from 'debounce'
+import logger from '../service/logger.js'
+
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'
import NcTextArea from '@nextcloud/vue/dist/Components/NcTextArea.js'
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
import NcDateTimePickerNative from '@nextcloud/vue/dist/Components/NcDateTimePickerNative.js'
-import { generateOcsUrl } from '@nextcloud/router'
-import { getCurrentUser } from '@nextcloud/auth'
-import debounce from 'debounce'
-import axios from '@nextcloud/axios'
-import { formatDateAsYMD } from '../utils/date.js'
-import { loadState } from '@nextcloud/initial-state'
-import { showError, showSuccess } from '@nextcloud/dialogs'
-import { Type as ShareTypes } from '@nextcloud/sharing'
-
-import logger from '../service/logger.js'
export default {
name: 'AbsenceForm',
@@ -74,17 +73,17 @@ export default {
NcTextField,
NcTextArea,
NcDateTimePickerNative,
- NcSelect
+ NcSelect,
},
data() {
- const { firstDay, lastDay, status, message ,replacementUserId ,replacementUserDisplayName } = loadState('dav', 'absence', {})
+ const { firstDay, lastDay, status, message, replacementUserId, replacementUserDisplayName } = loadState('dav', 'absence', {})
return {
loading: false,
status: status ?? '',
message: message ?? '',
firstDay: firstDay ? new Date(firstDay) : new Date(),
lastDay: lastDay ? new Date(lastDay) : null,
- replacementUserId: replacementUserId ,
+ replacementUserId,
replacementUser: replacementUserId ? { user: replacementUserId, displayName: replacementUserDisplayName } : null,
searchLoading: false,
options: [],
@@ -126,10 +125,10 @@ export default {
return {
user: result.uuid || result.value.shareWith,
displayName: result.name || result.label,
- subtitle: result.dsc | ''
+ subtitle: result.dsc | '',
}
},
-
+
async asyncFind(query) {
this.searchLoading = true
await this.debounceGetSuggestions(query.trim())
@@ -142,7 +141,7 @@ export default {
async getSuggestions(search) {
const shareType = [
- ShareTypes.SHARE_TYPE_USER,
+ ShareType.SHARE_TYPE_USER,
]
let request = null
diff --git a/apps/dav/src/dav/client.js b/apps/dav/src/dav/client.js
index a4e41114862..d286f6f48d6 100644
--- a/apps/dav/src/dav/client.js
+++ b/apps/dav/src/dav/client.js
@@ -27,5 +27,5 @@ export const getClient = memoize((service) => {
onRequestTokenUpdate(setHeaders)
setHeaders(getRequestToken())
- return client;
+ return client
})
diff --git a/apps/dav/src/service/PreferenceService.js b/apps/dav/src/service/PreferenceService.js
index f03d53a10cc..39b2c067c61 100644
--- a/apps/dav/src/service/PreferenceService.js
+++ b/apps/dav/src/service/PreferenceService.js
@@ -17,7 +17,7 @@ export async function enableUserStatusAutomation() {
}),
{
configValue: 'yes',
- }
+ },
)
}
@@ -29,6 +29,6 @@ export async function disableUserStatusAutomation() {
generateOcsUrl('/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}', {
appId: 'dav',
configKey: 'user_status_automation',
- })
+ }),
)
}
diff --git a/apps/dav/src/settings.js b/apps/dav/src/settings.js
index bb9b7107a25..c69a8b03614 100644
--- a/apps/dav/src/settings.js
+++ b/apps/dav/src/settings.js
@@ -17,12 +17,12 @@ const CalDavSettingsView = new View({
sendInvitations: loadState('dav', 'sendInvitations'),
generateBirthdayCalendar: loadState(
'dav',
- 'generateBirthdayCalendar'
+ 'generateBirthdayCalendar',
),
sendEventReminders: loadState('dav', 'sendEventReminders'),
sendEventRemindersToSharedUsers: loadState(
'dav',
- 'sendEventRemindersToSharedUsers'
+ 'sendEventRemindersToSharedUsers',
),
sendEventRemindersPush: loadState('dav', 'sendEventRemindersPush'),
}
diff --git a/apps/dav/src/views/CalDavSettings.spec.js b/apps/dav/src/views/CalDavSettings.spec.js
index e5f18999fe0..feaca3a735f 100644
--- a/apps/dav/src/views/CalDavSettings.spec.js
+++ b/apps/dav/src/views/CalDavSettings.spec.js
@@ -54,27 +54,27 @@ describe('CalDavSettings', () => {
},
Vue => {
Vue.prototype.$t = jest.fn((app, text) => text)
- }
+ },
)
expect(TLUtils.container).toMatchSnapshot()
const sendInvitations = TLUtils.getByLabelText(
- 'Send invitations to attendees'
+ 'Send invitations to attendees',
)
expect(sendInvitations).toBeChecked()
const generateBirthdayCalendar = TLUtils.getByLabelText(
- 'Automatically generate a birthday calendar'
+ 'Automatically generate a birthday calendar',
)
expect(generateBirthdayCalendar).toBeChecked()
const sendEventReminders = TLUtils.getByLabelText(
- 'Send notifications for events'
+ 'Send notifications for events',
)
expect(sendEventReminders).toBeChecked()
const sendEventRemindersToSharedUsers = TLUtils.getByLabelText(
- 'Send reminder notifications to calendar sharees as well'
+ 'Send reminder notifications to calendar sharees as well',
)
expect(sendEventRemindersToSharedUsers).toBeChecked()
const sendEventRemindersPush = TLUtils.getByLabelText(
- 'Enable notifications for events via push'
+ 'Enable notifications for events via push',
)
expect(sendEventRemindersPush).toBeChecked()
diff --git a/apps/dav/src/views/CalDavSettings.vue b/apps/dav/src/views/CalDavSettings.vue
index 162f85743a2..c55767dc6af 100644
--- a/apps/dav/src/views/CalDavSettings.vue
+++ b/apps/dav/src/views/CalDavSettings.vue
@@ -128,7 +128,7 @@ export default {
OCP.AppConfig.setValue(
'dav',
'sendInvitations',
- value ? 'yes' : 'no'
+ value ? 'yes' : 'no',
)
},
sendEventReminders(value) {
@@ -138,7 +138,7 @@ export default {
OCP.AppConfig.setValue(
'dav',
'sendEventRemindersToSharedUsers',
- value ? 'yes' : 'no'
+ value ? 'yes' : 'no',
)
},
sendEventRemindersPush(value) {