Fix new lint errors

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2022-12-12 20:29:03 +01:00
parent 0be966eaef
commit c9077738d8
24 changed files with 86 additions and 103 deletions

View File

@ -40,7 +40,7 @@ jobs:
run: composer i
- name: Install dependencies
run: composer require --dev christophwurst/nextcloud:${{ matrix.ocp-version }}
run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }}
- name: Run coding standards check
run: composer run psalm

View File

@ -19,7 +19,7 @@
"phpunit/phpunit": "^9.5.26",
"nextcloud/coding-standard": "^1.0.0",
"vimeo/psalm": "^4",
"christophwurst/nextcloud": "v24.0.0"
"nextcloud/ocp": "v25.0.0"
},
"config": {
"optimize-autoloader": true,

View File

@ -9,7 +9,7 @@
</template>
<script>
import { mutations } from './store/'
import { mutations } from './store/index.js'
import { showError, showMessage } from '@nextcloud/dialogs'
import { generateFilePath } from '@nextcloud/router'
import { getRequestToken } from '@nextcloud/auth'

View File

@ -4,10 +4,10 @@
* This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
*/
import Vue from 'vue'
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'
import App from './components/ViewAdmin'
import store from './store/'
import AppGlobal from './mixins/AppGlobal'
import { Tooltip } from '@nextcloud/vue'
import App from './components/ViewAdmin.vue'
import store from './store/index.js'
import AppGlobal from './mixins/AppGlobal.js'
import { Store } from 'vuex'
Vue.mixin(AppGlobal)

View File

@ -5,12 +5,12 @@
*/
import Vue from 'vue'
import FolderPickerDialog from './components/FolderPickerDialog'
import FolderPickerDialog from './components/FolderPickerDialog.vue'
import { Store } from 'vuex'
import deepClone from 'clone-deep'
import store, { actions } from './store'
import AppGlobal from './mixins/AppGlobal'
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'
import store, { actions } from './store/index.js'
import AppGlobal from './mixins/AppGlobal.js'
import { Tooltip } from '@nextcloud/vue'
// eslint-disable-next-line
__webpack_nonce__ = btoa(OC.requestToken)

View File

@ -5,11 +5,10 @@
-->
<template>
<div
:class="{
bookmarkslist: true,
'bookmarkslist--gridview': viewMode === 'grid'
}">
<div :class="{
bookmarkslist: true,
'bookmarkslist--gridview': viewMode === 'grid'
}">
<div v-if="$route.name === routes.ARCHIVED && bookmarks.length" class="bookmarkslist__description">
{{
t('bookmarks', 'Bookmarks to files on the web like photos or PDFs will automatically be saved to your Nextcloud files, so you can still find them even when the link goes offline.')
@ -37,25 +36,21 @@
<!-- FOLDER VIEW WITH CUSTOM SORTING -->
<template v-if="sortOrder === 'index' && children.length">
<template v-for="item in children">
<Folder
v-if="item.type === 'folder' && getFolder(item.id)"
<Folder v-if="item.type === 'folder' && getFolder(item.id)"
:key="item.type + item.id"
:folder="getFolder(item.id)" />
<Bookmark
v-if="item.type === 'bookmark' && getBookmark(item.id)"
<Bookmark v-if="item.type === 'bookmark' && getBookmark(item.id)"
:key="item.type + item.id"
:bookmark="getBookmark(item.id)" />
</template>
</template>
<!-- FOLDER VIEW WITH NORMAL SORTING -->
<template v-else-if="(subFolders.length || bookmarks.length) && !loading">
<Folder
v-for="folder in subFolders"
<Folder v-for="folder in subFolders"
:key="'folder' + folder.id"
:folder="folder" />
<template v-if="bookmarks.length">
<Bookmark
v-for="bookmark in bookmarks"
<Bookmark v-for="bookmark in bookmarks"
:key="'bookmark' + bookmark.id"
:bookmark="bookmark" />
</template>
@ -65,12 +60,10 @@
</template>
<!-- NON-FOLDER VIEW -->
<template v-else-if="subFolders.length || bookmarks.length">
<Folder
v-for="folder in subFolders"
<Folder v-for="folder in subFolders"
:key="'folder' + folder.id"
:folder="folder" />
<Bookmark
v-for="bookmark in bookmarks"
<Bookmark v-for="bookmark in bookmarks"
:key="'bookmark' + bookmark.id"
:bookmark="bookmark" />
</template>
@ -81,15 +74,15 @@
</template>
<script>
import Bookmark from './Bookmark'
import Folder from './Folder'
import CreateBookmark from './CreateBookmark'
import CreateFolder from './CreateFolder'
import { actions, mutations } from '../store'
import NoBookmarks from './NoBookmarks'
import FirstRun from './FirstRun'
import VirtualScroll from './VirtualScroll'
import { privateRoutes } from '../router'
import Bookmark from './Bookmark.vue'
import Folder from './Folder.vue'
import CreateBookmark from './CreateBookmark.vue'
import CreateFolder from './CreateFolder.vue'
import { actions, mutations } from '../store/index.js'
import NoBookmarks from './NoBookmarks.vue'
import FirstRun from './FirstRun.vue'
import VirtualScroll from './VirtualScroll.vue'
import { privateRoutes } from '../router.js'
export default {
name: 'BookmarksList',

View File

@ -19,9 +19,9 @@
</Item>
</template>
<script>
import EarthIcon from 'vue-material-design-icons/Earth'
import Item from './Item'
import { actions, mutations } from '../store/'
import EarthIcon from 'vue-material-design-icons/Earth.vue'
import Item from './Item.vue'
import { actions, mutations } from '../store/index.js'
export default {
name: 'CreateBookmark',

View File

@ -19,9 +19,9 @@
</Item>
</template>
<script>
import FolderIcon from 'vue-material-design-icons/Folder'
import Item from './Item'
import { actions, mutations } from '../store/'
import FolderIcon from 'vue-material-design-icons/Folder.vue'
import Item from './Item.vue'
import { actions, mutations } from '../store/index.js'
export default {
name: 'CreateFolder',

View File

@ -15,7 +15,7 @@
<script>
import { DashboardWidget } from '@nextcloud/vue-dashboard'
import { generateUrl } from '@nextcloud/router'
import { actions } from '../store'
import { actions } from '../store/index.js'
export default {
name: 'DashboardFrequent',
components: { DashboardWidget },

View File

@ -15,7 +15,7 @@
<script>
import { DashboardWidget } from '@nextcloud/vue-dashboard'
import { generateUrl } from '@nextcloud/router'
import { actions } from '../store'
import { actions } from '../store/index.js'
export default {
name: 'DashboardRecent',
components: { DashboardWidget },

View File

@ -12,8 +12,8 @@
</template>
<script>
import FolderIcon from 'vue-material-design-icons/Folder'
import EarthIcon from 'vue-material-design-icons/Earth'
import FolderIcon from 'vue-material-design-icons/Folder.vue'
import EarthIcon from 'vue-material-design-icons/Earth.vue'
export default {
name: 'DragImage',
components: { FolderIcon, EarthIcon },

View File

@ -15,8 +15,8 @@
<script>
import { NcAppContentList } from '@nextcloud/vue'
import TreeFolder from './TreeFolder'
import { privateRoutes } from '../router'
import TreeFolder from './TreeFolder.vue'
import { privateRoutes } from '../router.js'
export default {
name: 'FolderOverview',

View File

@ -5,15 +5,13 @@
-->
<template>
<div
:class="{
<div :class="{
item: true,
'item--gridview': viewMode === 'grid'
}"
:style="{ background: '#efefef', height: viewMode !== 'grid'? '45px' : '' }">
<div class="item__labels" />
<div
class="item__actions" />
<div class="item__actions" />
</div>
</template>
<script>

View File

@ -21,8 +21,7 @@
<p>{{ t('bookmarks',
'Enter the path of a folder in your Files where bookmarked files should be stored.'
) }}</p>
<input
:value="archivePath"
<input :value="archivePath"
:readonly="true"
@click="onChangeArchivePath">
</label>
@ -32,8 +31,7 @@
<p>{{ t('bookmarks',
'Enter the path of a folder in your Files where backups will be stored.'
) }}</p>
<input
:value="backupPath"
<input :value="backupPath"
:readonly="true"
@click="onChangeBackupPath">
</label>
@ -60,8 +58,7 @@
<p>{{ t('bookmarks',
'Drag this to your browser bookmarks and click it to quickly bookmark a webpage.'
) }}</p>
<a
class="button center"
<a class="button center"
:href="bookmarklet"
@click.prevent="void 0">{{
t('bookmarks', 'Add to {instanceName}', {
@ -73,7 +70,7 @@
</template>
<script>
import { generateUrl } from '@nextcloud/router'
import { actions } from '../store/'
import { actions } from '../store/index.js'
import { getRequestToken } from '@nextcloud/auth'
import { getFilePickerBuilder } from '@nextcloud/dialogs'

View File

@ -5,8 +5,7 @@
-->
<template>
<NcAppSidebar
v-if="isActive"
<NcAppSidebar v-if="isActive"
class="sidebar"
:title="folder.title"
:active.sync="activeTab"
@ -47,8 +46,7 @@
<div v-if="publicLink"
v-tooltip="t('bookmarks', 'Reading allowed')"
:aria-label="t('bookmarks', 'Reading allowed')">
<EyeIcon
:size="20"
<EyeIcon :size="20"
:fill-color="colorMainText" />
</div>
</div>
@ -80,21 +78,18 @@
<div v-if="share.canShare"
v-tooltip="t('bookmarks', 'Resharing allowed')"
:aria-label="t('bookmarks','Resharing allowed')">
<ShareAllIcon
:size="20"
<ShareAllIcon :size="20"
:fill-color="colorMainText" />
</div>
<div v-if="share.canWrite"
v-tooltip="t('bookmarks','Editing allowed')"
:aria-label="t('bookmarks','Editing allowed')">
<PencilIcon
:size="20"
<PencilIcon :size="20"
:fill-color="colorMainText" />
</div>
<div v-tooltip="t('bookmarks','Reading allowed')"
:aria-label="t('bookmarks', 'Reading allowed')">
<EyeIcon
:size="20"
<EyeIcon :size="20"
:fill-color="colorMainText" />
</div>
</div>
@ -130,10 +125,10 @@ import { getCurrentUser } from '@nextcloud/auth'
import { generateUrl, generateOcsUrl } from '@nextcloud/router'
import axios from '@nextcloud/axios'
import copy from 'copy-text-to-clipboard'
import { actions, mutations } from '../store/'
import EyeIcon from 'vue-material-design-icons/Eye'
import PencilIcon from 'vue-material-design-icons/Pencil'
import ShareAllIcon from 'vue-material-design-icons/ShareAll'
import { actions, mutations } from '../store/index.js'
import EyeIcon from 'vue-material-design-icons/Eye.vue'
import PencilIcon from 'vue-material-design-icons/Pencil.vue'
import ShareAllIcon from 'vue-material-design-icons/ShareAll.vue'
import { CollectionList } from 'nextcloud-vue-collections'
export default {

View File

@ -16,7 +16,7 @@
</div>
</template>
<script>
import { privateRoutes, publicRoutes } from '../router'
import { privateRoutes, publicRoutes } from '../router.js'
export default {
name: 'TagLine',

View File

@ -29,9 +29,9 @@
</template>
<script>
import FolderIcon from 'vue-material-design-icons/Folder'
import FolderOpenIcon from 'vue-material-design-icons/FolderOpen'
import { privateRoutes } from '../router'
import FolderIcon from 'vue-material-design-icons/Folder.vue'
import FolderOpenIcon from 'vue-material-design-icons/FolderOpen.vue'
import { privateRoutes } from '../router.js'
export default {
name: 'TreeFolder',
components: { FolderIcon, FolderOpenIcon },

View File

@ -4,7 +4,7 @@
- This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
-->
<script>
import ItemSkeleton from './ItemSkeleton'
import ItemSkeleton from './ItemSkeleton.vue'
const GRID_ITEM_HEIGHT = 200 + 10
const GRID_ITEM_WIDTH = 250 + 10

View File

@ -5,11 +5,11 @@
*/
import Vue from 'vue'
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'
import store from './store/'
import AppGlobal from './mixins/AppGlobal'
import { Tooltip } from '@nextcloud/vue'
import store from './store/index.js'
import AppGlobal from './mixins/AppGlobal.js'
import DashboardRecent from './components/DashboardRecent.vue'
import DashboardFrequent from './components/DashboardFrequent'
import DashboardFrequent from './components/DashboardFrequent.vue'
import { Store } from 'vuex'
import deepClone from 'clone-deep'

View File

@ -5,12 +5,12 @@
*/
import Vue from 'vue'
import { Store } from 'vuex'
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'
import App from './App'
import router from './router'
import store from './store/'
import AppGlobal from './mixins/AppGlobal'
import DropTarget from './directives/drop-target'
import { Tooltip } from '@nextcloud/vue'
import App from './App.vue'
import router from './router.js'
import store from './store/index.js'
import AppGlobal from './mixins/AppGlobal.js'
import DropTarget from './directives/drop-target.js'
import { subscribe } from '@nextcloud/event-bus'
import { generateUrl } from '@nextcloud/router'

View File

@ -8,9 +8,9 @@ import Vue from 'vue'
import Router from 'vue-router'
import { generateUrl } from '@nextcloud/router'
const ViewPrivate = () => import(/* webpackPreload: true */ './components/ViewPrivate')
const ViewPublic = () => import(/* webpackPreload: true */'./components/ViewPublic')
const ViewBookmarklet = () => import(/* webpackPreload: true */'./components/ViewBookmarklet')
const ViewPrivate = () => import(/* webpackPreload: true */ './components/ViewPrivate.vue')
const ViewPublic = () => import(/* webpackPreload: true */'./components/ViewPublic.vue')
const ViewBookmarklet = () => import(/* webpackPreload: true */'./components/ViewBookmarklet.vue')
Vue.use(Router)

View File

@ -7,11 +7,11 @@
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import { loadState } from '@nextcloud/initial-state'
import AppGlobal from '../mixins/AppGlobal'
import { mutations } from './mutations'
import AppGlobal from '../mixins/AppGlobal.js'
import { mutations } from './mutations.js'
import * as Parallel from 'async-parallel'
import uniq from 'lodash/uniq'
import difference from 'lodash/difference'
import uniq from 'lodash/uniq.js'
import difference from 'lodash/difference.js'
const BATCH_SIZE = 42

View File

@ -6,18 +6,18 @@
import Vue from 'vue'
import Vuex from 'vuex'
import Mutations from './mutations'
import Actions from './actions'
import { privateRoutes, publicRoutes } from '../router'
import Mutations from './mutations.js'
import Actions from './actions.js'
import { privateRoutes, publicRoutes } from '../router.js'
import { generateUrl } from '@nextcloud/router'
import { getCurrentUser } from '@nextcloud/auth'
import { findFolder } from './findFolder'
import { findFolder } from './findFolder.js'
Vue.use(Vuex)
export { mutations } from './mutations'
export { mutations } from './mutations.js'
export { actions } from './actions'
export { actions } from './actions.js'
export default {
mutations: Mutations,

View File

@ -6,7 +6,7 @@
import Vue from 'vue'
import axios from '@nextcloud/axios'
import { findFolder } from './findFolder'
import { findFolder } from './findFolder.js'
export const mutations = {
SET_AUTH_TOKEN: 'SET_AUTH_TOKEN',