Skip to content

Commit 5adab26

Browse files
committed
Eslint fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent 71c97de commit 5adab26

115 files changed

Lines changed: 849 additions & 637 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,9 @@ module.exports = {
1616
// TODO: make sure we fix this as this is bad vue coding style.
1717
// Use proper sync modifier
1818
'vue/no-mutating-props': 'warn',
19+
'vue/custom-event-name-casing': ['error', 'kebab-case', {
20+
// allows custom xxxx:xxx events formats
21+
ignores: ['/^[a-z]+(?:-[a-z]+)*:[a-z]+(?:-[a-z]+)*$/u'],
22+
}],
1923
},
2024
}

apps/comments/src/components/Comment.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,17 @@ export default {
166166
167167
/**
168168
* Is the current user the author of this comment
169-
* @returns {boolean}
169+
*
170+
* @return {boolean}
170171
*/
171172
isOwnComment() {
172173
return getCurrentUser().uid === this.actorId
173174
},
174175
175176
/**
176177
* Rendered content as html string
177-
* @returns {string}
178+
*
179+
* @return {string}
178180
*/
179181
renderedContent() {
180182
if (this.isEmptyMessage) {
@@ -208,6 +210,7 @@ export default {
208210
methods: {
209211
/**
210212
* Update local Message on outer change
213+
*
211214
* @param {string} message the message to set
212215
*/
213216
updateLocalMessage(message) {

apps/comments/src/services/CommentsInstance.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class CommentInstance {
4949
* Initialize a new Comments instance for the desired type
5050
*
5151
* @param {string} commentsType the comments endpoint type
52-
* @param {Object} options the vue options (propsData, parent, el...)
52+
* @param {object} options the vue options (propsData, parent, el...)
5353
*/
5454
constructor(commentsType = 'files', options) {
5555
// Add comments type as a global mixin

apps/comments/src/services/GetComments.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ export const DEFAULT_LIMIT = 20
2828
/**
2929
* Retrieve the comments list
3030
*
31-
* @param {Object} data destructuring object
31+
* @param {object} data destructuring object
3232
* @param {string} data.commentsType the ressource type
3333
* @param {number} data.ressourceId the ressource ID
34-
* @param {Object} [options] optional options for axios
35-
* @returns {Object[]} the comments list
34+
* @param {object} [options] optional options for axios
35+
* @return {object[]} the comments list
3636
*/
3737
export default async function({ commentsType, ressourceId }, options = {}) {
3838
let response = null
@@ -64,6 +64,10 @@ export default async function({ commentsType, ressourceId }, options = {}) {
6464
}
6565

6666
// https://github.com/perry-mitchell/webdav-client/blob/9de2da4a2599e06bd86c2778145b7ade39fe0b3c/source/interface/directoryContents.js#L32
67+
/**
68+
* @param result
69+
* @param isDetailed
70+
*/
6771
function processMultistatus(result, isDetailed = false) {
6872
// Extract the response items (directory contents)
6973
const {
@@ -86,6 +90,10 @@ function processMultistatus(result, isDetailed = false) {
8690
})
8791
}
8892

93+
/**
94+
* @param value
95+
* @param passes
96+
*/
8997
function decodeHtmlEntities(value, passes = 1) {
9098
const parser = new DOMParser()
9199
let decoded = value

apps/comments/src/services/NewComment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import client from './DavClient'
3131
* @param {string} commentsType the ressource type
3232
* @param {number} ressourceId the ressource ID
3333
* @param {string} message the message
34-
* @returns {Object} the new comment
34+
* @return {object} the new comment
3535
*/
3636
export default async function(commentsType, ressourceId, message) {
3737
const ressourcePath = ['', commentsType, ressourceId].join('/')

apps/comments/src/utils/cancelableRequest.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ import axios from '@nextcloud/axios'
2424

2525
/**
2626
* Create a cancel token
27-
* @returns {CancelTokenSource}
27+
*
28+
* @return {CancelTokenSource}
2829
*/
2930
const createCancelToken = () => axios.CancelToken.source()
3031

3132
/**
3233
* Creates a cancelable axios 'request object'.
3334
*
34-
* @param {function} request the axios promise request
35-
* @returns {Object}
35+
* @param {Function} request the axios promise request
36+
* @return {object}
3637
*/
3738
const cancelableRequest = function(request) {
3839
/**
@@ -44,7 +45,7 @@ const cancelableRequest = function(request) {
4445
* Execute the request
4546
*
4647
* @param {string} url the url to send the request to
47-
* @param {Object} [options] optional config for the request
48+
* @param {object} [options] optional config for the request
4849
*/
4950
const fetch = async function(url, options) {
5051
return request(

apps/comments/src/views/Comments.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ export default {
126126
methods: {
127127
/**
128128
* Update current ressourceId and fetch new data
129-
* @param {Number} ressourceId the current ressourceId (fileId...)
129+
*
130+
* @param {number} ressourceId the current ressourceId (fileId...)
130131
*/
131132
async update(ressourceId) {
132133
this.ressourceId = ressourceId
@@ -152,8 +153,9 @@ export default {
152153
153154
/**
154155
* Make sure we have all mentions as Array of objects
156+
*
155157
* @param {Array} mentions the mentions list
156-
* @returns {Object[]}
158+
* @return {object[]}
157159
*/
158160
genMentionsData(mentions) {
159161
const list = Object.values(mentions).flat()
@@ -217,6 +219,7 @@ export default {
217219
218220
/**
219221
* Autocomplete @mentions
222+
*
220223
* @param {string} search the query
221224
* @param {Function} callback the callback to process the results with
222225
*/
@@ -235,14 +238,16 @@ export default {
235238
236239
/**
237240
* Add newly created comment to the list
238-
* @param {Object} comment the new comment
241+
*
242+
* @param {object} comment the new comment
239243
*/
240244
onNewComment(comment) {
241245
this.comments.unshift(comment)
242246
},
243247
244248
/**
245249
* Remove deleted comment from the list
250+
*
246251
* @param {number} id the deleted comment
247252
*/
248253
onDelete(id) {

apps/dashboard/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export default {
266266
* Method to register panels that will be called by the integrating apps
267267
*
268268
* @param {string} app The unique app id for the widget
269-
* @param {function} callback The callback function to register a panel which gets the DOM element passed as parameter
269+
* @param {Function} callback The callback function to register a panel which gets the DOM element passed as parameter
270270
*/
271271
register(app, callback) {
272272
Vue.set(this.callbacks, app, callback)

apps/dav/src/service/CalendarService.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ import { parseXML } from 'webdav/dist/node/tools/dav'
2525
import { getZoneString } from 'icalzone'
2626
import { v4 as uuidv4 } from 'uuid'
2727

28+
/**
29+
*
30+
*/
2831
export function getEmptySlots() {
2932
return {
3033
MO: [],
@@ -37,6 +40,9 @@ export function getEmptySlots() {
3740
}
3841
}
3942

43+
/**
44+
*
45+
*/
4046
export async function findScheduleInboxAvailability() {
4147
const client = getClient('calendars')
4248

@@ -101,6 +107,10 @@ export async function findScheduleInboxAvailability() {
101107
}
102108
}
103109

110+
/**
111+
* @param slots
112+
* @param timezoneId
113+
*/
104114
export async function saveScheduleInboxAvailability(slots, timezoneId) {
105115
const all = [...Object.keys(slots).flatMap(dayId => slots[dayId].map(slot => ({
106116
...slot,

apps/dav/src/views/CalDavSettings.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('CalDavSettings', () => {
3131
global.OCP = originalOCP
3232
})
3333

34-
test('interactions', async() => {
34+
test('interactions', async () => {
3535
const TLUtils = render(
3636
CalDavSettings,
3737
{

0 commit comments

Comments
 (0)