aboutsummaryrefslogtreecommitdiffstats
path: root/src/internal-server/app/Controllers
diff options
context:
space:
mode:
authorLibravatar MCMXC <16797721+mcmxcdev@users.noreply.github.com>2023-07-30 10:55:59 -0600
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2023-07-30 23:57:51 +0000
commit080d8b05297f3f5afcf33354a40a5201697b1df5 (patch)
tree35180bd3cb9fcd137feca3fe169032cbbb469463 /src/internal-server/app/Controllers
parentrefactor: various improvements (#1296) (diff)
downloadferdium-app-080d8b05297f3f5afcf33354a40a5201697b1df5.tar.gz
ferdium-app-080d8b05297f3f5afcf33354a40a5201697b1df5.tar.zst
ferdium-app-080d8b05297f3f5afcf33354a40a5201697b1df5.zip
refactor: more lint improvements
- set parserOptions.ecmaVersion to latest and env to es2024 in eslint config - install missing types libraries - install eslint-plugin-sonar - enable eslint-plugin-sonar recommended rules and declare jsx-runtime for react in eslint config - clean up disabled lint rules which don't inflict problems anymore - disable various lint issues and fix others
Diffstat (limited to 'src/internal-server/app/Controllers')
-rw-r--r--src/internal-server/app/Controllers/Http/ImageController.js2
-rw-r--r--src/internal-server/app/Controllers/Http/UserController.js8
-rw-r--r--src/internal-server/app/Controllers/Http/WorkspaceController.js7
3 files changed, 4 insertions, 13 deletions
diff --git a/src/internal-server/app/Controllers/Http/ImageController.js b/src/internal-server/app/Controllers/Http/ImageController.js
index 5b8337c49..3ce6fb22d 100644
--- a/src/internal-server/app/Controllers/Http/ImageController.js
+++ b/src/internal-server/app/Controllers/Http/ImageController.js
@@ -1,6 +1,6 @@
1const Env = use('Env'); 1const Env = use('Env');
2 2
3const path = require('path'); 3const path = require('node:path');
4const fs = require('fs-extra'); 4const fs = require('fs-extra');
5const sanitize = require('sanitize-filename'); 5const sanitize = require('sanitize-filename');
6 6
diff --git a/src/internal-server/app/Controllers/Http/UserController.js b/src/internal-server/app/Controllers/Http/UserController.js
index 43d925119..943d7705e 100644
--- a/src/internal-server/app/Controllers/Http/UserController.js
+++ b/src/internal-server/app/Controllers/Http/UserController.js
@@ -6,7 +6,7 @@ const { validateAll } = use('Validator');
6 6
7const fetch = require('node-fetch'); 7const fetch = require('node-fetch');
8const { v4: uuid } = require('uuid'); 8const { v4: uuid } = require('uuid');
9const crypto = require('crypto'); 9const crypto = require('node:crypto');
10const { DEFAULT_APP_SETTINGS } = require('../../../../config'); 10const { DEFAULT_APP_SETTINGS } = require('../../../../config');
11const { convertToJSON } = require('../../../../jsUtils'); 11const { convertToJSON } = require('../../../../jsUtils');
12const { API_VERSION } = require('../../../../environment-remote'); 12const { API_VERSION } = require('../../../../environment-remote');
@@ -224,11 +224,7 @@ class UserController {
224 } 224 }
225 225
226 // Account import/export 226 // Account import/export
227 async export({ 227 async export({ _auth, response }) {
228 // eslint-disable-next-line no-unused-vars
229 auth,
230 response,
231 }) {
232 const allServices = await Service.all(); 228 const allServices = await Service.all();
233 const services = allServices.toJSON(); 229 const services = allServices.toJSON();
234 const allWorkspaces = await Workspace.all(); 230 const allWorkspaces = await Workspace.all();
diff --git a/src/internal-server/app/Controllers/Http/WorkspaceController.js b/src/internal-server/app/Controllers/Http/WorkspaceController.js
index 352589567..d271dac12 100644
--- a/src/internal-server/app/Controllers/Http/WorkspaceController.js
+++ b/src/internal-server/app/Controllers/Http/WorkspaceController.js
@@ -92,12 +92,7 @@ class WorkspaceController {
92 }); 92 });
93 } 93 }
94 94
95 async delete({ 95 async delete({ response, params }) {
96 // eslint-disable-next-line no-unused-vars
97 request,
98 response,
99 params,
100 }) {
101 // Validate user input 96 // Validate user input
102 const validation = await validateAll(params, { 97 const validation = await validateAll(params, {
103 id: 'required', 98 id: 'required',