Apply standard formater and linter on js files

This commit is contained in:
2024-10-03 01:45:29 +02:00
parent e5aa7aa866
commit c57d2ece9c
19 changed files with 3980 additions and 829 deletions

View File

@ -1,7 +1,7 @@
import Alpine from "alpinejs";
import Alpine from 'alpinejs'
window.Alpine = Alpine;
window.Alpine = Alpine
addEventListener("DOMContentLoaded", (event) => {
Alpine.start();
});
window.addEventListener('DOMContentLoaded', (event) => {
Alpine.start()
})

View File

@ -1,6 +1,6 @@
import "codemirror/lib/codemirror.css";
import "easymde/src/css/easymde.css";
import EasyMDE from "easymde";
import 'codemirror/lib/codemirror.css'
import 'easymde/src/css/easymde.css'
import EasyMDE from 'easymde'
// This scripts dependens on Alpine but it should be loaded on every page

View File

@ -1 +1 @@
require("@fortawesome/fontawesome-free/css/all.css");
require('@fortawesome/fontawesome-free/css/all.css')

View File

@ -1,25 +1,25 @@
import $ from "jquery";
import "jquery.shorten/src/jquery.shorten.min.js";
import $ from 'jquery'
import 'jquery.shorten/src/jquery.shorten.min.js'
// We ship jquery-ui with jquery because when standalone with webpack
// JQuery is also included in the jquery-ui package. We do gain space by doing this
// We require jquery-ui components manually and not in a loop
// Otherwise it increases the output files by a x2 factor !
require("jquery-ui/ui/widgets/accordion.js");
require("jquery-ui/ui/widgets/autocomplete.js");
require("jquery-ui/ui/widgets/button.js");
require("jquery-ui/ui/widgets/dialog.js");
require("jquery-ui/ui/widgets/tabs.js");
require('jquery-ui/ui/widgets/accordion.js')
require('jquery-ui/ui/widgets/autocomplete.js')
require('jquery-ui/ui/widgets/button.js')
require('jquery-ui/ui/widgets/dialog.js')
require('jquery-ui/ui/widgets/tabs.js')
require("jquery-ui/themes/base/all.css");
require('jquery-ui/themes/base/all.css')
/**
* Simple wrapper to solve shorten not being able on legacy pages
* @param {string} selector to be passed to jQuery
* @param {Object} options object to pass to the shorten function
**/
export function shorten(selector, options) {
$(selector).shorten(options);
export function shorten (selector, options) {
$(selector).shorten(options)
}
window.shorten = shorten;
window.shorten = shorten