Skip to content

Commit

Permalink
Decrease linter errors, keep commented tests warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan committed Sep 2, 2022
1 parent 89f7eaf commit 13f55a8
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion packages/web-app-external/tests/unit/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('The app provider extension', () => {
it('should show a loading spinner while loading', async () => {
const makeRequest = jest.fn(
() =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
setTimeout(() => {
resolve({
ok: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ export default defineComponent({
const paramsToCreate = this.getParamsForLink(link)
if (this.isPasswordEnforcedFor(link)) {
showQuickLinkPasswordModal({ store: this.$store }, async (newPassword) => {
showQuickLinkPasswordModal({ store: this.$store }, (newPassword) => {
this.createLink({ params: { ...paramsToCreate, password: newPassword }, onError })
})
} else {
Expand All @@ -419,7 +419,7 @@ export default defineComponent({
const params = this.getParamsForLink(link)
if (!link.password && this.isPasswordEnforcedFor(link)) {
showQuickLinkPasswordModal({ store: this.$store }, async (newPassword) => {
showQuickLinkPasswordModal({ store: this.$store }, (newPassword) => {
this.updatePublicLink({ params: { ...params, password: newPassword }, onSuccess })
})
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export default {
)
}
},
async mounted() {
mounted() {
if (this.showSpaceMembers) {
this.loadSpaceMembersTask.perform()
}
Expand Down
6 changes: 3 additions & 3 deletions packages/web-app-files/src/helpers/resource/copyMove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export const resolveFileNameDuplicate = (name, extension, existingFiles, iterati
return resolveFileNameDuplicate(name, extension, existingFiles, iteration + 1)
}

const clientListFilesInFolder = async (
const clientListFilesInFolder = (
client: any,
webDavPath: string,
depth: number,
Expand All @@ -282,7 +282,7 @@ const clientListFilesInFolder = async (
return client.files.list(webDavPath, depth, DavProperties.Default)
}

const clientMoveFilesInFolder = async (
const clientMoveFilesInFolder = (
client: any,
webDavPathSource: string,
webDavPathTarget: string,
Expand All @@ -301,7 +301,7 @@ const clientMoveFilesInFolder = async (
return client.files.move(webDavPathSource, webDavPathTarget, overwrite)
}

const clientCopyFilesInFolder = async (
const clientCopyFilesInFolder = (
client: any,
webDavPathSource: string,
webDavPathTarget: string,
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/store/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {
{ root: true }
)
},
async clearClipboardFiles(context) {
clearClipboardFiles(context) {
context.commit('CLEAR_CLIPBOARD')
},
async pasteSelectedFiles(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ describe('copyMove', () => {
])('should copy and move files if no conflicts exist', async (dataSet) => {
const client = {
files: {
list: async () => {
list: () => {
return []
},
copy: jest.fn(),
move: jest.fn()
},
publicFiles: {
list: async () => {
list: () => {
return []
},
copy: jest.fn(),
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/tests/unit/views/FilesDrop.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ localVue.use(GetTextPlugin, {
localVue.prototype.$client.publicFiles = {
PUBLIC_LINK_SHARE_OWNER: 'admin',
// function is mocked because it should return a promise with a list of resources
list: async () => [
list: () => [
{
getProperty: jest.fn((val) => {
if (val === DavProperty.PublicLinkPermission) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class Provider extends EventBus implements SearchProvider {
}
}

public activate(term: string): void {
public activate(): void {
/* noop */
}

Expand Down
3 changes: 2 additions & 1 deletion packages/web-pkg/src/components/sidebar/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ export default defineComponent({
},
sidebarAccordionsWarningMessage: {
type: String,
required: false
required: false,
default: ''
},
isContentDisplayed: {
type: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ interface AppFileHandlingOptions {
publicLinkPassword: MaybeRef<string>
}

type QueryParameters = Record<string, string>
export interface AppFileHandlingResult {
getUrlForResource(r: Resource): Promise<string>
revokeUrl(url: string): void
Expand Down
4 changes: 2 additions & 2 deletions packages/web-runtime/src/container/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export const announceUppyService = ({ vue }: { vue: VueConstructor }): void => {
* @param store
* @param router
*/
export const announceAuthService = async ({
export const announceAuthService = ({
vue,
configurationManager,
store,
Expand All @@ -315,7 +315,7 @@ export const announceAuthService = async ({
configurationManager: ConfigurationManager
store: Store<any>
router: VueRouter
}): Promise<void> => {
}): void => {
authService.initialize(configurationManager, clientService, store, router)
set(vue, '$authService', authService)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/web-runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const renderSuccess = (): void => {
(state, getters) => {
return getters['runtime/auth/isUserContextReady']
},
async (newValue, oldValue) => {
() => {
// Load spaces to make them available across the application
if (store.getters.capabilities?.spaces?.enabled) {
const clientService = instance.$clientService
Expand Down
3 changes: 0 additions & 3 deletions packages/web-runtime/src/services/uppyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,13 @@ export class UppyService {
useTus({
tusMaxChunkSize,
tusHttpMethodOverride,
tusExtension,
onBeforeRequest
}: {
tusMaxChunkSize: number
tusHttpMethodOverride: boolean
tusExtension: string
onBeforeRequest: () => void
}) {
const chunkSize = tusMaxChunkSize || Infinity
const uploadDataDuringCreation = tusExtension.includes('creation-with-upload')

const tusPluginOptions = {
chunkSize: chunkSize,
Expand Down

0 comments on commit 13f55a8

Please sign in to comment.