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 run: composer i
- name: Install dependencies - 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 - name: Run coding standards check
run: composer run psalm run: composer run psalm

View File

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

View File

@ -9,7 +9,7 @@
</template> </template>
<script> <script>
import { mutations } from './store/' import { mutations } from './store/index.js'
import { showError, showMessage } from '@nextcloud/dialogs' import { showError, showMessage } from '@nextcloud/dialogs'
import { generateFilePath } from '@nextcloud/router' import { generateFilePath } from '@nextcloud/router'
import { getRequestToken } from '@nextcloud/auth' 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. * This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
*/ */
import Vue from 'vue' import Vue from 'vue'
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' import { Tooltip } from '@nextcloud/vue'
import App from './components/ViewAdmin' import App from './components/ViewAdmin.vue'
import store from './store/' import store from './store/index.js'
import AppGlobal from './mixins/AppGlobal' import AppGlobal from './mixins/AppGlobal.js'
import { Store } from 'vuex' import { Store } from 'vuex'
Vue.mixin(AppGlobal) Vue.mixin(AppGlobal)

View File

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

View File

@ -5,11 +5,10 @@
--> -->
<template> <template>
<div <div :class="{
:class="{ bookmarkslist: true,
bookmarkslist: true, 'bookmarkslist--gridview': viewMode === 'grid'
'bookmarkslist--gridview': viewMode === 'grid' }">
}">
<div v-if="$route.name === routes.ARCHIVED && bookmarks.length" class="bookmarkslist__description"> <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.') 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 --> <!-- FOLDER VIEW WITH CUSTOM SORTING -->
<template v-if="sortOrder === 'index' && children.length"> <template v-if="sortOrder === 'index' && children.length">
<template v-for="item in children"> <template v-for="item in children">
<Folder <Folder v-if="item.type === 'folder' && getFolder(item.id)"
v-if="item.type === 'folder' && getFolder(item.id)"
:key="item.type + item.id" :key="item.type + item.id"
:folder="getFolder(item.id)" /> :folder="getFolder(item.id)" />
<Bookmark <Bookmark v-if="item.type === 'bookmark' && getBookmark(item.id)"
v-if="item.type === 'bookmark' && getBookmark(item.id)"
:key="item.type + item.id" :key="item.type + item.id"
:bookmark="getBookmark(item.id)" /> :bookmark="getBookmark(item.id)" />
</template> </template>
</template> </template>
<!-- FOLDER VIEW WITH NORMAL SORTING --> <!-- FOLDER VIEW WITH NORMAL SORTING -->
<template v-else-if="(subFolders.length || bookmarks.length) && !loading"> <template v-else-if="(subFolders.length || bookmarks.length) && !loading">
<Folder <Folder v-for="folder in subFolders"
v-for="folder in subFolders"
:key="'folder' + folder.id" :key="'folder' + folder.id"
:folder="folder" /> :folder="folder" />
<template v-if="bookmarks.length"> <template v-if="bookmarks.length">
<Bookmark <Bookmark v-for="bookmark in bookmarks"
v-for="bookmark in bookmarks"
:key="'bookmark' + bookmark.id" :key="'bookmark' + bookmark.id"
:bookmark="bookmark" /> :bookmark="bookmark" />
</template> </template>
@ -65,12 +60,10 @@
</template> </template>
<!-- NON-FOLDER VIEW --> <!-- NON-FOLDER VIEW -->
<template v-else-if="subFolders.length || bookmarks.length"> <template v-else-if="subFolders.length || bookmarks.length">
<Folder <Folder v-for="folder in subFolders"
v-for="folder in subFolders"
:key="'folder' + folder.id" :key="'folder' + folder.id"
:folder="folder" /> :folder="folder" />
<Bookmark <Bookmark v-for="bookmark in bookmarks"
v-for="bookmark in bookmarks"
:key="'bookmark' + bookmark.id" :key="'bookmark' + bookmark.id"
:bookmark="bookmark" /> :bookmark="bookmark" />
</template> </template>
@ -81,15 +74,15 @@
</template> </template>
<script> <script>
import Bookmark from './Bookmark' import Bookmark from './Bookmark.vue'
import Folder from './Folder' import Folder from './Folder.vue'
import CreateBookmark from './CreateBookmark' import CreateBookmark from './CreateBookmark.vue'
import CreateFolder from './CreateFolder' import CreateFolder from './CreateFolder.vue'
import { actions, mutations } from '../store' import { actions, mutations } from '../store/index.js'
import NoBookmarks from './NoBookmarks' import NoBookmarks from './NoBookmarks.vue'
import FirstRun from './FirstRun' import FirstRun from './FirstRun.vue'
import VirtualScroll from './VirtualScroll' import VirtualScroll from './VirtualScroll.vue'
import { privateRoutes } from '../router' import { privateRoutes } from '../router.js'
export default { export default {
name: 'BookmarksList', name: 'BookmarksList',

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -29,9 +29,9 @@
</template> </template>
<script> <script>
import FolderIcon from 'vue-material-design-icons/Folder' import FolderIcon from 'vue-material-design-icons/Folder.vue'
import FolderOpenIcon from 'vue-material-design-icons/FolderOpen' import FolderOpenIcon from 'vue-material-design-icons/FolderOpen.vue'
import { privateRoutes } from '../router' import { privateRoutes } from '../router.js'
export default { export default {
name: 'TreeFolder', name: 'TreeFolder',
components: { FolderIcon, FolderOpenIcon }, 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. - This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
--> -->
<script> <script>
import ItemSkeleton from './ItemSkeleton' import ItemSkeleton from './ItemSkeleton.vue'
const GRID_ITEM_HEIGHT = 200 + 10 const GRID_ITEM_HEIGHT = 200 + 10
const GRID_ITEM_WIDTH = 250 + 10 const GRID_ITEM_WIDTH = 250 + 10

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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