Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2021-12-02 20:32:57 +0300
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-01-08 12:14:05 +0300
commit74b980310852a0b406fa9d073870f92c409d5444 (patch)
tree055cbdf57886077bf3a6ea476813deedb54064e0 /apps/comments/src
parent85bc8513557f5ff37fc283d53893d4cb77ec7c3b (diff)
Eslint fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/comments/src')
-rw-r--r--apps/comments/src/components/Comment.vue7
-rw-r--r--apps/comments/src/services/CommentsInstance.js2
-rw-r--r--apps/comments/src/services/GetComments.js14
-rw-r--r--apps/comments/src/services/NewComment.js2
-rw-r--r--apps/comments/src/utils/cancelableRequest.js9
-rw-r--r--apps/comments/src/views/Comments.vue11
6 files changed, 31 insertions, 14 deletions
diff --git a/apps/comments/src/components/Comment.vue b/apps/comments/src/components/Comment.vue
index feeb32441cf..5bab02262aa 100644
--- a/apps/comments/src/components/Comment.vue
+++ b/apps/comments/src/components/Comment.vue
@@ -166,7 +166,8 @@ export default {
/**
* Is the current user the author of this comment
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
isOwnComment() {
return getCurrentUser().uid === this.actorId
@@ -174,7 +175,8 @@ export default {
/**
* Rendered content as html string
- * @returns {string}
+ *
+ * @return {string}
*/
renderedContent() {
if (this.isEmptyMessage) {
@@ -208,6 +210,7 @@ export default {
methods: {
/**
* Update local Message on outer change
+ *
* @param {string} message the message to set
*/
updateLocalMessage(message) {
diff --git a/apps/comments/src/services/CommentsInstance.js b/apps/comments/src/services/CommentsInstance.js
index bf0199fe753..9aac3e6c69e 100644
--- a/apps/comments/src/services/CommentsInstance.js
+++ b/apps/comments/src/services/CommentsInstance.js
@@ -49,7 +49,7 @@ export default class CommentInstance {
* Initialize a new Comments instance for the desired type
*
* @param {string} commentsType the comments endpoint type
- * @param {Object} options the vue options (propsData, parent, el...)
+ * @param {object} options the vue options (propsData, parent, el...)
*/
constructor(commentsType = 'files', options) {
// Add comments type as a global mixin
diff --git a/apps/comments/src/services/GetComments.js b/apps/comments/src/services/GetComments.js
index b6b2db57217..bfce1bf9f9b 100644
--- a/apps/comments/src/services/GetComments.js
+++ b/apps/comments/src/services/GetComments.js
@@ -28,11 +28,11 @@ export const DEFAULT_LIMIT = 20
/**
* Retrieve the comments list
*
- * @param {Object} data destructuring object
+ * @param {object} data destructuring object
* @param {string} data.commentsType the ressource type
* @param {number} data.ressourceId the ressource ID
- * @param {Object} [options] optional options for axios
- * @returns {Object[]} the comments list
+ * @param {object} [options] optional options for axios
+ * @return {object[]} the comments list
*/
export default async function({ commentsType, ressourceId }, options = {}) {
let response = null
@@ -64,6 +64,10 @@ export default async function({ commentsType, ressourceId }, options = {}) {
}
// https://github.com/perry-mitchell/webdav-client/blob/9de2da4a2599e06bd86c2778145b7ade39fe0b3c/source/interface/directoryContents.js#L32
+/**
+ * @param result
+ * @param isDetailed
+ */
function processMultistatus(result, isDetailed = false) {
// Extract the response items (directory contents)
const {
@@ -86,6 +90,10 @@ function processMultistatus(result, isDetailed = false) {
})
}
+/**
+ * @param value
+ * @param passes
+ */
function decodeHtmlEntities(value, passes = 1) {
const parser = new DOMParser()
let decoded = value
diff --git a/apps/comments/src/services/NewComment.js b/apps/comments/src/services/NewComment.js
index 8f54e18d26e..6a242713696 100644
--- a/apps/comments/src/services/NewComment.js
+++ b/apps/comments/src/services/NewComment.js
@@ -31,7 +31,7 @@ import client from './DavClient'
* @param {string} commentsType the ressource type
* @param {number} ressourceId the ressource ID
* @param {string} message the message
- * @returns {Object} the new comment
+ * @return {object} the new comment
*/
export default async function(commentsType, ressourceId, message) {
const ressourcePath = ['', commentsType, ressourceId].join('/')
diff --git a/apps/comments/src/utils/cancelableRequest.js b/apps/comments/src/utils/cancelableRequest.js
index c678e42dae3..1b9b33c37dc 100644
--- a/apps/comments/src/utils/cancelableRequest.js
+++ b/apps/comments/src/utils/cancelableRequest.js
@@ -24,15 +24,16 @@ import axios from '@nextcloud/axios'
/**
* Create a cancel token
- * @returns {CancelTokenSource}
+ *
+ * @return {CancelTokenSource}
*/
const createCancelToken = () => axios.CancelToken.source()
/**
* Creates a cancelable axios 'request object'.
*
- * @param {function} request the axios promise request
- * @returns {Object}
+ * @param {Function} request the axios promise request
+ * @return {object}
*/
const cancelableRequest = function(request) {
/**
@@ -44,7 +45,7 @@ const cancelableRequest = function(request) {
* Execute the request
*
* @param {string} url the url to send the request to
- * @param {Object} [options] optional config for the request
+ * @param {object} [options] optional config for the request
*/
const fetch = async function(url, options) {
return request(
diff --git a/apps/comments/src/views/Comments.vue b/apps/comments/src/views/Comments.vue
index 53693fa8919..c101c2c5c39 100644
--- a/apps/comments/src/views/Comments.vue
+++ b/apps/comments/src/views/Comments.vue
@@ -126,7 +126,8 @@ export default {
methods: {
/**
* Update current ressourceId and fetch new data
- * @param {Number} ressourceId the current ressourceId (fileId...)
+ *
+ * @param {number} ressourceId the current ressourceId (fileId...)
*/
async update(ressourceId) {
this.ressourceId = ressourceId
@@ -152,8 +153,9 @@ export default {
/**
* Make sure we have all mentions as Array of objects
+ *
* @param {Array} mentions the mentions list
- * @returns {Object[]}
+ * @return {object[]}
*/
genMentionsData(mentions) {
const list = Object.values(mentions).flat()
@@ -217,6 +219,7 @@ export default {
/**
* Autocomplete @mentions
+ *
* @param {string} search the query
* @param {Function} callback the callback to process the results with
*/
@@ -235,7 +238,8 @@ export default {
/**
* Add newly created comment to the list
- * @param {Object} comment the new comment
+ *
+ * @param {object} comment the new comment
*/
onNewComment(comment) {
this.comments.unshift(comment)
@@ -243,6 +247,7 @@ export default {
/**
* Remove deleted comment from the list
+ *
* @param {number} id the deleted comment
*/
onDelete(id) {