Skip to content
Merged
Prev Previous commit
Next Next commit
chore(eslint): apply @nextcloud/vue deprecated rules
- @nextcloud/vue/no-deprecated-exports
- @nextcloud/vue/no-deprecated-props

Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Jun 16, 2025
commit 2a8c79d953a8bcc2dbb412f6aad0e1e0f2721b3c
2 changes: 0 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export default [
// Disabled rules from recommendedVue2Javascript pack
{
rules: {
'@nextcloud/vue/no-deprecated-exports': 'off',
'@nextcloud/vue/no-deprecated-props': 'off',
'@stylistic/arrow-parens': 'off',
'antfu/top-level-function': 'off',
'jsdoc/tag-lines': 'off',
Expand Down
10 changes: 3 additions & 7 deletions src/Components/Action.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
-->
<template>
<NcButton v-if="isWebLink"
type="primary"
variant="primary"
class="action-button pull-right"
:href="link"
@click="onClickActionButtonWeb">
{{ label }}
</NcButton>
<NcButton v-else-if="!isWebLink"
:type="buttonType"
:variant="primary ? 'primary' : 'secondary'"
class="action-button pull-right"
@click="onClickActionButton">
{{ label }}
Expand All @@ -23,7 +23,7 @@ import axios from '@nextcloud/axios'
import { showError } from '@nextcloud/dialogs'
import { emit } from '@nextcloud/event-bus'
import { t } from '@nextcloud/l10n'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcButton from '@nextcloud/vue/components/NcButton'

export default {
name: 'Action',
Expand Down Expand Up @@ -77,10 +77,6 @@ export default {
typeWithDefault() {
return this.type || 'GET'
},

buttonType() {
return this.primary ? 'primary' : 'secondary'
},
},

methods: {
Expand Down
8 changes: 4 additions & 4 deletions src/Components/Notification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
:data-timestamp="timestamp">{{ relativeDate }}</span>
<NcButton v-if="timestamp"
class="notification-dismiss-button"
type="tertiary"
variant="tertiary"
:aria-label="t('notifications', 'Dismiss')"
@click="onDismissNotification">
<template #icon>
Expand Down Expand Up @@ -66,7 +66,7 @@
:notification-index="index" />
</div>
<div v-else-if="externalLink" class="notification-actions">
<NcButton type="primary"
<NcButton variant="primary"
href="https://nextcloud.com/fairusepolicy"
class="action-button pull-right"
target="_blank"
Expand All @@ -85,8 +85,8 @@ import axios from '@nextcloud/axios'
import { showError } from '@nextcloud/dialogs'
import { t } from '@nextcloud/l10n'
import { generateOcsUrl } from '@nextcloud/router'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcRichText from '@nextcloud/vue/dist/Components/NcRichText.js'
import NcButton from '@nextcloud/vue/components/NcButton'
import NcRichText from '@nextcloud/vue/components/NcRichText'
import Close from 'vue-material-design-icons/Close.vue'
import Message from 'vue-material-design-icons/Message.vue'
import Action from './Action.vue'
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Parameters/User.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<script>

import NcUserBubble from '@nextcloud/vue/dist/Components/NcUserBubble.js'
import NcUserBubble from '@nextcloud/vue/components/NcUserBubble'

export default {
name: 'User',
Expand Down
10 changes: 5 additions & 5 deletions src/NotificationsApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</template>

<template v-if="hasThrottledPushNotifications" #action>
<NcButton type="primary"
<NcButton variant="primary"
href="https://nextcloud.com/fairusepolicy"
target="_blank"
rel="noreferrer noopener">
Expand All @@ -65,7 +65,7 @@

<!-- Dismiss all -->
<div v-if="notifications.length > 0" class="dismiss-all">
<NcButton type="tertiary"
<NcButton variant="tertiary"
wide
@click="onDismissAll">
<template #icon>
Expand All @@ -87,9 +87,9 @@ import { loadState } from '@nextcloud/initial-state'
import { t } from '@nextcloud/l10n'
import { listen } from '@nextcloud/notify_push'
import { generateOcsUrl, imagePath } from '@nextcloud/router'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent.js'
import NcHeaderMenu from '@nextcloud/vue/dist/Components/NcHeaderMenu.js'
import NcButton from '@nextcloud/vue/components/NcButton'
import NcEmptyContent from '@nextcloud/vue/components/NcEmptyContent'
import NcHeaderMenu from '@nextcloud/vue/components/NcHeaderMenu'
import IconBell from 'vue-material-design-icons/Bell.vue'
import IconClose from 'vue-material-design-icons/Close.vue'
import IconMessage from 'vue-material-design-icons/Message.vue'
Expand Down
4 changes: 2 additions & 2 deletions src/views/AdminSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import { showError, showSuccess } from '@nextcloud/dialogs'
import { loadState } from '@nextcloud/initial-state'
import { t } from '@nextcloud/l10n'
import { generateOcsUrl } from '@nextcloud/router'
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
import NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwitch'
import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'

const EmailFrequency = {
EMAIL_SEND_OFF: 0,
Expand Down
6 changes: 3 additions & 3 deletions src/views/UserSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ import { showError, showSuccess } from '@nextcloud/dialogs'
import { loadState } from '@nextcloud/initial-state'
import { t } from '@nextcloud/l10n'
import { generateOcsUrl } from '@nextcloud/router'
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
import { UAParser } from 'ua-parser-js'
import { reactive, ref } from 'vue'
import NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwitch'
import NcSelect from '@nextcloud/vue/components/NcSelect'
import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'
import BrowserStorage from '../services/BrowserStorage.js'

const EmailFrequency = {
Expand Down