Skip to content

Commit 6ee6ee5

Browse files
author
Jannik Stehle
committed
style: run linter
1 parent a88be7b commit 6ee6ee5

File tree

31 files changed

+33
-40
lines changed

31 files changed

+33
-40
lines changed

packages/design-system/src/components/OcApplicationIcon/OcApplicationIcon.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default defineComponent({
5858
return !!props.colorSecondary
5959
})
6060
const generatedHashedPrimaryColor = computed((): string => {
61-
let hashedColor = generateHashedColorForString(props.icon)
61+
const hashedColor = generateHashedColorForString(props.icon)
6262
return rgbToHex(setDesiredContrastRatio(hexToRgb(hashedColor), hexToRgb('#ffffff'), 4))
6363
})
6464
const iconStyle = computed(() => {

packages/design-system/src/components/OcCheckbox/OcCheckbox.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default defineComponent({
5050
*
5151
* Can be any type, but most common is boolean for singular checkbox use, or array when used in a group of checkboxes.
5252
**/
53-
// eslint-disable-next-line vue/require-prop-types
53+
5454
modelValue: {
5555
type: [Boolean, Array] as PropType<boolean | unknown[]>,
5656
required: false,

packages/design-system/src/components/OcGrid/OcGrid.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default defineComponent({
3535
},
3636
computed: {
3737
classes() {
38-
let c = []
38+
const c = []
3939
4040
c.push('oc-grid-' + this.gutter)
4141

packages/design-system/src/components/OcRadio/OcRadio.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default defineComponent({
5050
*
5151
* Can be any type.
5252
**/
53-
// eslint-disable-next-line vue/require-prop-types
53+
5454
modelValue: {
5555
type: [String, Number, Boolean, Object],
5656
required: false,

packages/design-system/src/components/OcTextInput/OcTextInput.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export default defineComponent({
288288
additionalAttrs['has-error'] = !!this.errorMessage
289289
}
290290
// Exclude listeners for events which are handled via methods in this component
291-
// eslint-disable-next-line no-unused-vars
291+
292292
const { change, input, focus, class: classes, ...attrs } = this.$attrs
293293
294294
return { ...attrs, ...additionalAttrs }

packages/design-system/src/index.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('Depending on what gets passed into the theming options', () => {
5050
)
5151
expect(document.documentElement.style.getPropertyValue('--oc-space-small')).toMatch('20px')
5252
})
53-
// eslint-disable-next-line
53+
5454
// it('Defaults to ODS colors where none are passed in theming options', () => {
5555
// expect(document.documentElement.style.getPropertyValue('--oc-color')).toMatch("green")
5656
// expect(document.documentElement.style.getPropertyValue('--oc-brand-primary-hover')).toMatch('#223959')

packages/design-system/src/utils/webFontLoader.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Web Font Loader takes care of ownCloud Design System’s font loading.
33
* For full documentation, see: https://github.com/typekit/webfontloader
44
*/
5-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
5+
66
// @ts-ignore
77
import WebFont from 'webfontloader'
88

packages/web-app-epub-reader/src/App.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ export default defineComponent({
140140
const localStorageData = useLocalStorage<{ fontSizePercentage?: number }>(`oc_epubReader`, {})
141141
const currentFontSizePercentage = ref(unref(localStorageData).fontSizePercentage || 100)
142142
const themeStore = useThemeStore()
143-
let book = ref<Book>()
144-
let rendition = ref<Rendition>()
143+
const book = ref<Book>()
144+
const rendition = ref<Rendition>()
145145
146146
const navigateLeft = () => {
147147
unref(rendition).prev()

packages/web-app-files/src/helpers/textUtils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function naturalSortCompare(a: string, b: string) {
3939
aNum = Number(aa[x])
4040
bNum = Number(bb[x])
4141
// note: == is correct here
42-
// eslint-disable-next-line eqeqeq
42+
4343
if (aNum == aa[x] && bNum == bb[x]) {
4444
return aNum - bNum
4545
} else {

packages/web-app-files/src/views/spaces/DriveResolver.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export default defineComponent({
155155
* find an easy way to do that.
156156
**/
157157
if (space.fileId === space.id) {
158-
let publicSpace = (await getSpaceResource()) as PublicSpaceResource
158+
const publicSpace = (await getSpaceResource()) as PublicSpaceResource
159159
160160
// FIXME: check for type once https://github.com/owncloud/ocis/issues/8740 is resolved
161161
if (publicSpace.publicLinkPermission === SharePermissionBit.Create) {

packages/web-app-importer/src/extensions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { UppyService } from '@ownclouders/web-pkg'
1313
import '@uppy/dashboard/dist/style.min.css'
1414
import { Extension } from '@ownclouders/web-pkg'
1515
import { ApplicationSetupOptions } from '@ownclouders/web-pkg'
16-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
16+
1717
// @ts-ignore
1818
import { WebdavPublicLink } from '@uppy/webdav'
1919

packages/web-app-ocm/src/views/App.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default defineComponent({
6565
}
6666
6767
const highlightNewConnections = async () => {
68-
let oldConnections = [...unref(connections)]
68+
const oldConnections = [...unref(connections)]
6969
await findAcceptedUsers()
7070
if (oldConnections.length < unref(connections).length) {
7171
highlightedConnections.value = unref(connections).filter(

packages/web-app-ocm/src/views/IncomingInvitations.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export default defineComponent({
167167
}
168168
const providerDomainQuery = to.query.providerDomain
169169
if (providerDomainQuery) {
170-
let matchedProvider = unref(providers)?.find(
170+
const matchedProvider = unref(providers)?.find(
171171
(p) => p.domain === queryItemAsString(providerDomainQuery)
172172
)
173173
if (matchedProvider) {

packages/web-app-preview/src/App.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export default defineComponent({
367367
},
368368
preloadImages() {
369369
const preloadFile = (preloadFileIndex: number) => {
370-
let cycleIndex =
370+
const cycleIndex =
371371
(((this.activeIndex + preloadFileIndex) % this.filteredFiles.length) +
372372
this.filteredFiles.length) %
373373
this.filteredFiles.length

packages/web-app-search/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import App from './App.vue'
22
import List from './views/List.vue'
3-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
3+
44
// @ts-ignore
55
import translations from '../l10n/translations.json'
66
import { ApplicationInformation, defineWebApplication } from '@ownclouders/web-pkg'

packages/web-client/src/ocs/capabilities.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { AxiosInstance } from 'axios'
22
import get from 'lodash-es/get'
33

4-
/* eslint-disable camelcase */
54
export interface AppProviderCapability {
65
apps_url?: string
76
enabled?: boolean
@@ -45,7 +44,7 @@ export interface ArchiverCapability {
4544
enabled?: boolean
4645
version?: string // version is just a major version, e.g. `v2`
4746
formats?: string[]
48-
// eslint-disable-next-line camelcase
47+
4948
archiver_url?: string
5049
max_num_files?: string
5150
max_size?: string
@@ -185,7 +184,6 @@ export interface Capabilities {
185184
string?: string
186185
}
187186
}
188-
/* eslint-enable camelcase */
189187

190188
export const GetCapabilitiesFactory = (baseURI: string, axios: AxiosInstance) => {
191189
const url = new URL(baseURI)

packages/web-pkg/src/components/CreateLinkModal.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ export default defineComponent({
246246
)
247247
}
248248
249-
let userFacingErrors: Error[] = []
249+
const userFacingErrors: Error[] = []
250250
const failed = result.filter(({ status }) => status === 'rejected')
251251
if (failed.length) {
252252
;(failed as PromiseRejectedResult[])

packages/web-pkg/src/components/CreateShortcutModal.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export default defineComponent({
179179
let markInstance: Mark = null
180180
181181
const getInputUrlWithProtocol = (input: string) => {
182-
let url = input.trim()
182+
const url = input.trim()
183183
if (isMaybeUrl(url)) {
184184
return url
185185
}

packages/web-pkg/src/composables/sort/useSort.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export enum SortDir {
1515
export interface SortField {
1616
name: string
1717
prop?: string
18-
// eslint-disable-next-line @typescript-eslint/ban-types
18+
// eslint-disable-next-line
1919
sortable?: MaybeRef<boolean | Function | string>
2020
sortDir?: MaybeRef<SortDir>
2121
label?: string

packages/web-pkg/src/helpers/resource/conflictHandling/conflictDialog.ts

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export interface FileConflict {
1212
}
1313

1414
export class ConflictDialog {
15-
/* eslint-disable no-useless-constructor */
1615
constructor(
1716
protected $gettext: Language['$gettext'],
1817
protected $ngettext: Language['$ngettext']

packages/web-pkg/src/services/archiver.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Workaround https://github.com/npm/node-semver/issues/381
2-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
2+
33
// @ts-ignore
44
import major from 'semver/functions/major'
5-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
5+
66
// @ts-ignore
77
import rcompare from 'semver/functions/rcompare'
88

packages/web-pkg/src/services/passwordPolicy/passwordPolicy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
import { PasswordPolicyCapability } from '@ownclouders/web-client/ocs'
1111
import { GeneratePassword } from 'js-generate-password'
1212
import { CapabilityStore } from '../../composables'
13-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
13+
1414
// @ts-ignore
1515
import { PasswordPolicy } from 'password-sheriff'
1616

packages/web-pkg/src/services/preview/previewService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { encodePath } from '../../utils'
55
import { isPublicSpaceResource } from '@ownclouders/web-client'
66
import { BuildQueryStringOptions, LoadPreviewOptions } from '.'
77
import { AuthStore, CapabilityStore, ConfigStore, UserStore } from '../../composables'
8-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
8+
99
// @ts-ignore
1010
import { stringify } from 'qs'
1111

packages/web-pkg/src/services/uppy/uppyService.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { eventBus } from '../eventBus'
77
import DropTarget from '@uppy/drop-target'
88
import { Resource, urlJoin } from '@ownclouders/web-client'
99
import { UppyResource } from './types'
10-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
10+
1111
// @ts-ignore
1212
import getFileType from '@uppy/utils/lib/getFileType'
13-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
13+
1414
// @ts-ignore
1515
import generateFileID from '@uppy/utils/lib/generateFileID'
1616

packages/web-pkg/tests/unit/utils/urlJoin.spec.ts

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ describe('proper-url-join', () => {
1515
[['//', '/fol//der//', '//file'], '/fol/der/file'],
1616
[['?&@'], '/?&@']
1717
])('joins %s as %s', (args: unknown, expected: string) => {
18-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1918
// @ts-ignore
2019
expect(urlJoin(...args)).toBe(expected)
2120
})

packages/web-runtime/src/components/Account/AccountTable.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default defineComponent({
2727
required: true
2828
},
2929
fields: {
30-
type: Array<String>,
30+
type: Array<string>,
3131
required: true
3232
}
3333
}

packages/web-runtime/src/components/UploadInfo.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ export default defineComponent({
669669
670670
//TODO: Remove extraction code as soon as https://github.com/tus/tus-js-client/issues/448 is solved
671671
const formatErrorMessageToObject = (errorMessage: string) => {
672-
let responseCode = errorMessage.match(/response code: (\d+)/)?.[1]
672+
const responseCode = errorMessage.match(/response code: (\d+)/)?.[1]
673673
const errorBody = JSON.parse(
674674
errorMessage.match(/response text: ([\s\S]+?), request id/)?.[1] || '{}'
675675
)

packages/web-runtime/src/container/application/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import { applicationStore } from '../store'
66
import { isObject } from 'lodash-es'
77

88
// import modules to provide them to applications
9-
import * as vue from 'vue' // eslint-disable-line
10-
import * as luxon from 'luxon' // eslint-disable-line
11-
import * as vueGettext from 'vue3-gettext' // eslint-disable-line
12-
import * as pinia from 'pinia' // eslint-disable-line
9+
import * as vue from 'vue'
10+
import * as luxon from 'luxon'
11+
import * as vueGettext from 'vue3-gettext'
12+
import * as pinia from 'pinia'
1313
import * as webPkg from '@ownclouders/web-pkg'
1414
import * as webClient from '@ownclouders/web-client'
1515
import * as webClientGraph from '@ownclouders/web-client/graph'

packages/web-runtime/src/router/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
RouteLocationNormalizedLoaded
1515
} from 'vue-router'
1616

17-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1817
// @ts-ignore
1918
import qs from 'qs'
2019

packages/web-runtime/src/services/clientRegistration.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ async function post(url: string, data: unknown) {
3232
export async function registerClient(openIdConfig: OpenIdConnectConfig) {
3333
const clientData = JSON.parse(sessionStorage.getItem('dynamicClientData'))
3434
if (clientData !== null) {
35-
// eslint-disable-next-line camelcase
3635
const client_secret_expires_at = clientData.client_secret_expires_at || 0
37-
// eslint-disable-next-line camelcase
36+
3837
if (client_secret_expires_at === 0 || Date.now() < client_secret_expires_at * 1000) {
3938
return JSON.parse(clientData)
4039
}

tests/e2e/support/objects/app-files/resource/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ export class Resource {
105105
await this.#page.goto(startUrl)
106106
}
107107

108-
// eslint-disable-next-line @typescript-eslint/no-empty-function
109108
async open(): Promise<void> {}
110109

111110
async restoreVersion(args: Omit<po.resourceVersionArgs, 'page'>): Promise<void> {

0 commit comments

Comments
 (0)