aboutsummaryrefslogtreecommitdiffstats
path: root/apps/comments
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-06-25 00:00:31 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-07-09 17:13:30 +0200
commit691f570237e26398aa22f40c0efca23141d5583e (patch)
tree4409270ac8ee482ad03f745f77003c726ffbf09f /apps/comments
parent3a97dbf248b3e581b5782a638743958eb6f2a640 (diff)
downloadnextcloud-server-691f570237e26398aa22f40c0efca23141d5583e.tar.gz
nextcloud-server-691f570237e26398aa22f40c0efca23141d5583e.zip
chore: Enable ESLint for apps and fix all errors
Nevertheless this causes a huge amount of new warnings. Previously the shell script for directories to lint was wrong it was generating all app names to lint, but was missing the `apps/` prefix. Causing only `core` to be linted. Co-authored-by: Grigorii K. Shartsev <me@shgk.me> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/comments')
-rw-r--r--apps/comments/src/services/DavClient.js12
-rw-r--r--apps/comments/src/services/GetComments.ts2
-rw-r--r--apps/comments/src/utils/cancelableRequest.js2
3 files changed, 8 insertions, 8 deletions
diff --git a/apps/comments/src/services/DavClient.js b/apps/comments/src/services/DavClient.js
index 6202294b52f..3e9a529283f 100644
--- a/apps/comments/src/services/DavClient.js
+++ b/apps/comments/src/services/DavClient.js
@@ -12,12 +12,12 @@ const client = createClient(getRootPath())
// set CSRF token header
const setHeaders = (token) => {
- client.setHeaders({
- // Add this so the server knows it is an request from the browser
- 'X-Requested-With': 'XMLHttpRequest',
- // Inject user auth
- requesttoken: token ?? '',
- })
+ client.setHeaders({
+ // Add this so the server knows it is an request from the browser
+ 'X-Requested-With': 'XMLHttpRequest',
+ // Inject user auth
+ requesttoken: token ?? '',
+ })
}
// refresh headers when request token changes
diff --git a/apps/comments/src/services/GetComments.ts b/apps/comments/src/services/GetComments.ts
index 1e24c8ede8e..c42aa21d6cb 100644
--- a/apps/comments/src/services/GetComments.ts
+++ b/apps/comments/src/services/GetComments.ts
@@ -60,7 +60,7 @@ const getDirectoryFiles = function(
// Map all items to a consistent output structure (results)
return responseItems.map(item => {
// Each item should contain a stat object
- const props = item.propstat!.prop!;
+ const props = item.propstat!.prop!
return prepareFileFromProps(props, props.id!.toString(), isDetailed)
})
diff --git a/apps/comments/src/utils/cancelableRequest.js b/apps/comments/src/utils/cancelableRequest.js
index 47baa505083..c2d380c80f9 100644
--- a/apps/comments/src/utils/cancelableRequest.js
+++ b/apps/comments/src/utils/cancelableRequest.js
@@ -22,7 +22,7 @@ const cancelableRequest = function(request) {
const fetch = async function(url, options) {
const response = await request(
url,
- Object.assign({ signal }, options)
+ Object.assign({ signal }, options),
)
return response
}