Skip to content

Commit

Permalink
style(eslint): Fix eslint warnings/errors
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Jun 28, 2023
1 parent 5ec665a commit 3641364
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 25 deletions.
1 change: 0 additions & 1 deletion cypress/e2e/share.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/**
* @copyright Copyright (c) 2020 Julius Härtl <jus@bitgrid.net>
*
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/chai.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default _chai => {
rect.top < height && rect.bottom > 0 && rect.right <= width && rect.left >= 0,
'expected #{this} to be in the viewport',
'expected #{this} to not be in the viewport',
this._obj
this._obj,
)
})
}
18 changes: 9 additions & 9 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ Cypress.Commands.add('uploadFile', (fileName, mimeType, target) => {
})
}).then(response => {
const fileId = Number(
response.headers['oc-fileid']?.split('oc')?.[0]
response.headers['oc-fileid']?.split('oc')?.[0],
)
cy.log(`Uploaded ${fileName}`,
response.status,
{ fileId }
{ fileId },
)
return cy.wrap(fileId)
})
Expand Down Expand Up @@ -194,7 +194,7 @@ Cypress.Commands.add('shareFile', (path, options = {}) => {
const request = await axios.post(
`${url}/ocs/v2.php/apps/files_sharing/api/v1/shares`,
{ path, shareType },
{ headers }
{ headers },
)
const token = request.data?.ocs?.data?.token
const id = request.data?.ocs?.data?.id
Expand All @@ -210,7 +210,7 @@ Cypress.Commands.add('shareFile', (path, options = {}) => {
await axios.put(
`${url}/ocs/v2.php/apps/files_sharing/api/v1/shares/${id}`,
{ permissions },
{ headers }
{ headers },
)
cy.log(`Made share ${token} editable.`)
}
Expand All @@ -237,15 +237,15 @@ Cypress.Commands.add('createFolder', (target) => {
})

Cypress.Commands.add('moveFile', (path, destinationPath) => cy.window()
.then(win => win.OC.Files.getClient().move(path, destinationPath))
.then(win => win.OC.Files.getClient().move(path, destinationPath)),
)

Cypress.Commands.add('removeFile', (path) => cy.window()
.then(win => win.OC.Files.getClient().remove(path))
.then(win => win.OC.Files.getClient().remove(path)),
)

Cypress.Commands.add('copyFile', (path, destinationPath) => cy.window()
.then(win => win.OC.Files.getClient().copy(path, destinationPath))
.then(win => win.OC.Files.getClient().copy(path, destinationPath)),
)

Cypress.Commands.add('getFileContent', (path) => {
Expand Down Expand Up @@ -285,7 +285,7 @@ Cypress.Commands.add('propfindFolder', (path, depth = 0) => {
})

Cypress.Commands.add('reloadFileList', () => cy.window()
.then(win => win.OCA?.Files?.App?.fileList?.reload())
.then(win => win.OCA?.Files?.App?.fileList?.reload()),
)

Cypress.Commands.add('openFolder', (name) => {
Expand Down Expand Up @@ -391,7 +391,7 @@ Cypress.Commands.add('configureText', (key, value) => {
return axios.post(
`${url}/index.php/apps/text/settings`,
{ key, value },
{ headers: { requesttoken: win.OC.requestToken } }
{ headers: { requesttoken: win.OC.requestToken } },
)
})
})
Expand Down
4 changes: 2 additions & 2 deletions src/components/Editor/MediaHandler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default {
.then((response) => {
this.insertAttachment(
response.data?.name, response.data?.id, file.type,
position, response.data?.dirname
position, response.data?.dirname,
)
})
.catch((error) => {
Expand Down Expand Up @@ -171,7 +171,7 @@ export default {
return this.$syncService.insertAttachmentFile(filePath).then((response) => {
this.insertAttachment(
response.data?.name, response.data?.id, response.data?.mimetype,
null, response.data?.dirname
null, response.data?.dirname,
)
}).catch((error) => {
logger.error('Failed to insert image path', { error })
Expand Down
2 changes: 1 addition & 1 deletion src/components/Editor/SessionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default {
participants() {
return Object.values(this.sessions).filter((session) =>
session.lastContact > Date.now() / 1000 - COLLABORATOR_DISCONNECT_TIME
&& (session.userId !== null || session.guestName !== null)
&& (session.userId !== null || session.guestName !== null),
).sort((a, b) => a.lastContact < b.lastContact)
},
currentSession() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Editor/Wrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default {
(enable) => {
// make outline state reactive through the provider
Object.assign(this.outline, { enable })
}
},
)
},
methods: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Menu/ActionInsertLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default {
true, // modal
FilePickerType.Choose, // type
true, // directories
this.startPath // path
this.startPath, // path
)
filePicker.pick().then((file) => {
Expand Down
4 changes: 2 additions & 2 deletions src/extensions/Markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const createMarkdownSerializer = ({ nodes, marks }) => {
return {
serializer: new MarkdownSerializer(
{ ...defaultNodes, ...extractToMarkdown(nodes) },
{ ...defaultMarks, ...extractToMarkdown(marks) }
{ ...defaultMarks, ...extractToMarkdown(marks) },
),
serialize(content, options) {
return this.serializer.serialize(content, { ...options, tightLists: true })
Expand All @@ -138,7 +138,7 @@ const convertNames = (object) => {
}
return Object.fromEntries(
Object.entries(object)
.map(([name, value]) => [convert(name), value])
.map(([name, value]) => [convert(name), value]),
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const registerFileActionFallback = () => {
vm.$mount(ViewerRoot)
})
},
t('text', 'Edit')
t('text', 'Edit'),
)

for (let i = 0; i < openMimetypes.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/markdownit/keepSyntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function keepSyntax(md) {
Object.assign({}, open),
Object.assign({}, token, { content: token.content.slice(index, contentNext) }),
Object.assign({}, close),
Object.assign({}, token, { content: token.content.slice(contentNext) })
Object.assign({}, token, { content: token.content.slice(contentNext) }),
)
j += 3
}
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/BulletList.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const BulletList = TiptapBulletList.extend({
return [
listInputRule(
/^\s*([-+*])\s([^\s[]+)$/,
this.type
this.type,
),
]
},
Expand Down
4 changes: 2 additions & 2 deletions src/nodes/Table/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default Table.extend({
tr.setNodeAttribute(
pos,
'textAlign',
lastRow.child(i).attrs.textAlign
lastRow.child(i).attrs.textAlign,
)
pos += newRow.child(i).nodeSize
}
Expand All @@ -122,7 +122,7 @@ export default Table.extend({
tr.setNodeAttribute(
pos,
'textAlign',
lastRow.child(i).attrs.textAlign
lastRow.child(i).attrs.textAlign,
)
pos += newRow.child(i).nodeSize
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/AttachmentResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default class AttachmentResolver {
#getImageAttachmentUrl(imageFileName, preferRawImage = false) {
if (!this.#session) {
return this.#davUrl(
`${this.#attachmentDirectory}/${imageFileName}`
`${this.#attachmentDirectory}/${imageFileName}`,
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/services/SyncServiceProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function createSyncServiceProvider({ ydoc, syncService, fileId, i
'ws://localhost:1234',
'file:' + fileId,
ydoc,
{ WebSocketPolyfill }
{ WebSocketPolyfill },
)
websocketProvider.on('status', event => logger.debug('status', event))
return websocketProvider
Expand Down

0 comments on commit 3641364

Please sign in to comment.