Update eslint

This commit is contained in:
KernelDeimos 2024-05-28 18:50:00 -04:00
parent e050506a05
commit d047abf31c
3 changed files with 35 additions and 0 deletions

View File

@ -58,6 +58,10 @@ export default [
"html_encode": true,
"html_decode": true,
"isMobile": true,
// Class Registry
"logger": true,
"def": true,
"use": true,
// Libraries
"saveAs": true, // FileSaver
"iro": true, // iro.js color picker

View File

@ -1,3 +1,21 @@
/**
* @global
* @function logger
* @param {Array<any>} a - The arguments.
*/
/**
* @global
* @function use
* @param {string} arg - The string argument.
* @returns {any} The return value.
*/
/**
* @global
* @function def
* @param {any} arg - The argument.
* @returns {any} The return value.
*/
// An initial logger to log do before we get a more fancy logger
// (which we never really do yet, at the time of writing this);
// something like this was also done in backend and it proved useful.

View File

@ -0,0 +1,13 @@
import Spinner from "../UI/Components/Spinner";
import { Service } from "../definitions";
/**
* This class exists to keep exports to the service script API separate
* from the service where exports are registered. This will make it easier
* to change how it works in the future.
*/
export class ExportRegistrantService extends Service {
_init () {
console.log(Spinner); // import gets optimized out if we don't do this
}
}