From 1658349b3da2a9d9a49da07357b47ccb6d1af00f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 8 Jul 2023 13:09:35 +0000 Subject: [PATCH 1/6] Update dependency prettier to v3 --- war/package.json | 2 +- war/yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/war/package.json b/war/package.json index ade399e53bf7..81cd4472ad99 100644 --- a/war/package.json +++ b/war/package.json @@ -38,7 +38,7 @@ "postcss-loader": "7.3.3", "postcss-preset-env": "9.0.0", "postcss-scss": "4.0.6", - "prettier": "2.8.8", + "prettier": "3.0.0", "sass": "1.63.6", "sass-loader": "13.3.2", "style-loader": "3.3.3", diff --git a/war/yarn.lock b/war/yarn.lock index 015703c39d23..af9b1517b59e 100644 --- a/war/yarn.lock +++ b/war/yarn.lock @@ -4378,7 +4378,7 @@ __metadata: postcss-loader: 7.3.3 postcss-preset-env: 9.0.0 postcss-scss: 4.0.6 - prettier: 2.8.8 + prettier: 3.0.0 sass: 1.63.6 sass-loader: 13.3.2 sortablejs: 1.15.0 @@ -6066,12 +6066,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:2.8.8": - version: 2.8.8 - resolution: "prettier@npm:2.8.8" +"prettier@npm:3.0.0": + version: 3.0.0 + resolution: "prettier@npm:3.0.0" bin: - prettier: bin-prettier.js - checksum: b49e409431bf129dd89238d64299ba80717b57ff5a6d1c1a8b1a28b590d998a34e083fa13573bc732bb8d2305becb4c9a4407f8486c81fa7d55100eb08263cf8 + prettier: bin/prettier.cjs + checksum: 6a832876a1552dc58330d2467874e5a0b46b9ccbfc5d3531eb69d15684743e7f83dc9fbd202db6270446deba9c82b79d24383d09924c462b457136a759425e33 languageName: node linkType: hard From 640f34a0f6d2fffb5c165a090f91feb3dfbaed54 Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Sun, 9 Jul 2023 13:42:30 +0200 Subject: [PATCH 2/6] Address changes --- .prettierrc.json | 3 +- .../hudson/PluginManager/_installed.js | 2 +- .../resources/hudson/PluginManager/_table.js | 2 +- .../ReverseProxySetupMonitor/resources.js | 2 +- .../build-timeline-widget.js | 12 +-- .../model/UpdateCenter/update-center.js | 2 +- .../hudson/views/BuildButtonColumn/icon.js | 2 +- .../formelementpath/form-element-path.js | 2 +- .../resources.js | 16 ++-- .../security/ApiTokenProperty/resources.js | 4 +- .../resources.js | 2 +- .../seed/UserSeedProperty/resources.js | 2 +- .../main/resources/lib/form/apply/apply.js | 2 +- .../resources/lib/form/combobox/combobox.js | 2 +- .../filter-menu-button/filter-menu-button.js | 2 +- .../lib/form/hetero-list/hetero-list.js | 4 +- .../lib/form/radioBlock/radioBlock.js | 2 +- .../lib/form/repeatable/repeatable.js | 6 +- .../main/resources/lib/form/select/select.js | 6 +- .../resources/lib/form/textarea/textarea.js | 4 +- .../resources/lib/hudson/progressive-text.js | 4 +- war/.eslintrc.js | 10 +- war/.stylelintrc.js | 14 +-- war/postcss.config.js | 8 +- war/src/main/js/add-item.js | 2 +- war/src/main/js/api/pluginManager.js | 20 ++-- war/src/main/js/api/securityConfig.js | 8 +- .../main/js/components/dropdowns/jumplists.js | 8 +- .../main/js/components/dropdowns/templates.js | 6 +- war/src/main/js/components/dropdowns/utils.js | 6 +- war/src/main/js/components/modals/index.js | 2 +- .../main/js/components/notifications/index.js | 8 +- war/src/main/js/components/tooltips/index.js | 8 +- war/src/main/js/filter-build-history.js | 4 +- war/src/main/js/pages/dashboard/index.js | 2 +- war/src/main/js/pages/manage-jenkins/index.js | 2 +- war/src/main/js/pages/register/index.js | 2 +- war/src/main/js/plugin-manager-ui.js | 2 +- war/src/main/js/pluginSetupWizardGui.js | 40 ++++---- war/src/main/js/section-to-sidebar-items.js | 2 +- war/src/main/js/sortable-drag-drop.js | 2 +- war/src/main/js/util/jenkins.js | 14 +-- war/src/main/js/util/jenkinsLocalStorage.js | 2 +- war/src/main/js/util/localStorage.js | 4 +- war/src/main/js/util/page.js | 2 +- war/src/main/js/widgets/add/addform.scss | 35 +++++-- war/src/main/scss/abstracts/theme.scss | 4 +- war/src/main/scss/base/style.scss | 5 +- war/src/main/scss/form/checkbox.scss | 32 +++++-- war/src/main/scss/form/codemirror.scss | 4 +- war/src/main/scss/form/input.scss | 5 +- war/src/main/scss/form/radio.scss | 16 +++- war/src/main/scss/form/search-bar.scss | 7 +- war/src/main/scss/form/toggle-switch.scss | 7 +- .../main/scss/modules/buttons-deprecated.scss | 4 +- war/src/main/scss/modules/notifications.scss | 6 +- .../modules/row-selection-controller.scss | 26 ++++-- war/src/main/scss/modules/skip-link.scss | 11 ++- war/src/main/scss/pluginSetupWizard.scss | 18 ++-- war/src/main/webapp/scripts/behavior.js | 4 +- .../main/webapp/scripts/hudson-behavior.js | 44 ++++----- war/src/main/webapp/scripts/loading.js | 2 +- war/src/main/webapp/scripts/sortable.js | 22 ++--- war/webpack.config.js | 92 +++++++++---------- 64 files changed, 339 insertions(+), 266 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index 2695924e02c3..ae90e224ba95 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,4 +1,5 @@ { "endOfLine": "auto", - "htmlWhitespaceSensitivity": "ignore" + "htmlWhitespaceSensitivity": "ignore", + "trailingComma": "none" } diff --git a/core/src/main/resources/hudson/PluginManager/_installed.js b/core/src/main/resources/hudson/PluginManager/_installed.js index 8e1f9c656033..b1d60737df4b 100644 --- a/core/src/main/resources/hudson/PluginManager/_installed.js +++ b/core/src/main/resources/hudson/PluginManager/_installed.js @@ -21,7 +21,7 @@ (btn.checked ? "Enabled" : "Disabled"), { method: "post", - headers: crumb.wrap({}), + headers: crumb.wrap({}) } ).then((rsp) => { if (!rsp.ok) { diff --git a/core/src/main/resources/hudson/PluginManager/_table.js b/core/src/main/resources/hudson/PluginManager/_table.js index 6a001a489032..03bd447a22c6 100644 --- a/core/src/main/resources/hudson/PluginManager/_table.js +++ b/core/src/main/resources/hudson/PluginManager/_table.js @@ -371,7 +371,7 @@ Behaviour.specify("#filter-box", "_table", 0, function (e) { pluginTR.jenkinsPluginMetadata = { enableInput: enableInput, dependenciesDiv: dependenciesDiv, - dependentsDiv: dependentsDiv, + dependentsDiv: dependentsDiv }; if (dependenciesDiv) { diff --git a/core/src/main/resources/hudson/diagnosis/ReverseProxySetupMonitor/resources.js b/core/src/main/resources/hudson/diagnosis/ReverseProxySetupMonitor/resources.js index fa020b9eb6e6..7b1170460cc3 100644 --- a/core/src/main/resources/hudson/diagnosis/ReverseProxySetupMonitor/resources.js +++ b/core/src/main/resources/hudson/diagnosis/ReverseProxySetupMonitor/resources.js @@ -16,7 +16,7 @@ fetch(urlToTest, { cache: "no-cache", headers: crumb.wrap({}), - body, + body }) .then((rsp) => callback(rsp)) // normally you don't need a catch function with fetch because HTTP errors doesn't reject a promise, diff --git a/core/src/main/resources/hudson/model/BuildTimelineWidget/build-timeline-widget.js b/core/src/main/resources/hudson/model/BuildTimelineWidget/build-timeline-widget.js index 4437c99d13dc..0cb05360ce73 100644 --- a/core/src/main/resources/hudson/model/BuildTimelineWidget/build-timeline-widget.js +++ b/core/src/main/resources/hudson/model/BuildTimelineWidget/build-timeline-widget.js @@ -15,11 +15,11 @@ function getData(eventSource1, current, min, max) { "timeline/data/?" + new URLSearchParams({ min: current * interval, - max: (current + 1) * interval, + max: (current + 1) * interval }), { method: "POST", - headers: crumb.wrap({}), + headers: crumb.wrap({}) } ).then((t) => { if (t.ok) { @@ -62,7 +62,7 @@ function doLoad() { eventSource: eventSource1, timeZone: tz, theme: theme1, - layout: "overview", // original, overview, detailed + layout: "overview" // original, overview, detailed }), // the main area Timeline.createBandInfo({ @@ -71,8 +71,8 @@ function doLoad() { timeZone: tz, theme: theme1, intervalUnit: Timeline.DateTime.HOUR, - intervalPixels: 200, - }), + intervalPixels: 200 + }) ]; bandInfos[0].highlight = true; bandInfos[0].syncWith = 1; @@ -118,7 +118,7 @@ if (window.addEventListener) { (function () { var resize = new YAHOO.util.Resize("resizeContainer", { handles: "b", - minHeight: 300, // this should be the same as the height of the container div, + minHeight: 300 // this should be the same as the height of the container div, // to fix an issue when it's resized to be smaller than the original height }); diff --git a/core/src/main/resources/hudson/model/UpdateCenter/update-center.js b/core/src/main/resources/hudson/model/UpdateCenter/update-center.js index 379816a1d459..13005a65247f 100644 --- a/core/src/main/resources/hudson/model/UpdateCenter/update-center.js +++ b/core/src/main/resources/hudson/model/UpdateCenter/update-center.js @@ -16,7 +16,7 @@ function refresh() { window.setTimeout(function () { fetch("./body", { method: "post", - headers: crumb.wrap({}), + headers: crumb.wrap({}) }).then((rsp) => { if (rsp.ok) { rsp.text().then((responseText) => { diff --git a/core/src/main/resources/hudson/views/BuildButtonColumn/icon.js b/core/src/main/resources/hudson/views/BuildButtonColumn/icon.js index 472a894ce61e..a53833eda350 100644 --- a/core/src/main/resources/hudson/views/BuildButtonColumn/icon.js +++ b/core/src/main/resources/hudson/views/BuildButtonColumn/icon.js @@ -11,7 +11,7 @@ Behaviour.specify( icon.onclick = function () { fetch(url, { method: "post", - headers: crumb.wrap({}), + headers: crumb.wrap({}) }); hoverNotification(message, this, -100); return false; diff --git a/core/src/main/resources/jenkins/formelementpath/form-element-path.js b/core/src/main/resources/jenkins/formelementpath/form-element-path.js index bf8d7cab62d6..4b7cc9bb2dc4 100644 --- a/core/src/main/resources/jenkins/formelementpath/form-element-path.js +++ b/core/src/main/resources/jenkins/formelementpath/form-element-path.js @@ -83,7 +83,7 @@ document.addEventListener("DOMContentLoaded", function () { "hetero-list-add", "advanced-button", "apply-button", - "validate-button", + "validate-button" ].forEach(function (clazz) { if (element.classList.contains(clazz)) { name = clazz; diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js index 3167869377ca..c6307720e653 100644 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js +++ b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js @@ -70,7 +70,7 @@ return { close: close, - startListeners: startListeners, + startListeners: startListeners }; } @@ -86,20 +86,20 @@ var normalMonitors = initializeAmMonitor( document.getElementById("visible-am-container"), { - closeAll: closeAll, + closeAll: closeAll } ); var securityMonitors = initializeAmMonitor( document.getElementById("visible-sec-am-container"), { - closeAll: closeAll, + closeAll: closeAll + } + ); + monitorWidgets = [normalMonitors, securityMonitors].filter( + function (widget) { + return widget !== null; } ); - monitorWidgets = [normalMonitors, securityMonitors].filter(function ( - widget - ) { - return widget !== null; - }); monitorWidgets.forEach(function (widget) { widget.startListeners(); diff --git a/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js b/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js index 3ca3562e2969..72492c1f56b0 100644 --- a/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js +++ b/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js @@ -57,7 +57,7 @@ function revokeToken(anchorRevoke) { fetch(targetUrl, { body: new URLSearchParams({ tokenUuid: tokenUuid }), method: "post", - headers: crumb.wrap({}), + headers: crumb.wrap({}) }).then((rsp) => { if (rsp.ok) { if (repeatedChunk.querySelectorAll(".legacy-token").length > 0) { @@ -91,7 +91,7 @@ function saveApiToken(button) { fetch(targetUrl, { body: new URLSearchParams({ newTokenName: tokenName }), method: "post", - headers: crumb.wrap({}), + headers: crumb.wrap({}) }).then((rsp) => { if (rsp.ok) { rsp.json().then((json) => { diff --git a/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js b/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js index 0b62f186b465..adefbc710cee 100644 --- a/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js +++ b/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js @@ -111,7 +111,7 @@ function confirmAndRevokeAllSelected(button) { body: Object.toJSON ? Object.toJSON({ values: selectedValues }) : JSON.stringify({ values: selectedValues }), - headers: crumb.wrap({ "Content-Type": "application/json" }), + headers: crumb.wrap({ "Content-Type": "application/json" }) }).then(() => window.location.reload()); } } diff --git a/core/src/main/resources/jenkins/security/seed/UserSeedProperty/resources.js b/core/src/main/resources/jenkins/security/seed/UserSeedProperty/resources.js index fa0b80d60bde..48ac8cd0c823 100644 --- a/core/src/main/resources/jenkins/security/seed/UserSeedProperty/resources.js +++ b/core/src/main/resources/jenkins/security/seed/UserSeedProperty/resources.js @@ -35,7 +35,7 @@ function resetSeed(button) { if (confirm(confirmMessage)) { fetch(targetUrl, { method: "post", - headers: crumb.wrap({}), + headers: crumb.wrap({}) }).then((rsp) => { if (rsp.ok) { if (redirectAfterClick) { diff --git a/core/src/main/resources/lib/form/apply/apply.js b/core/src/main/resources/lib/form/apply/apply.js index acf3f868dd14..71c83dda3131 100644 --- a/core/src/main/resources/lib/form/apply/apply.js +++ b/core/src/main/resources/lib/form/apply/apply.js @@ -12,7 +12,7 @@ Behaviour.specify( draggable: true, zindex: 4, modal: true, - visible: false, + visible: false }); responseDialog.setHeader("Error"); diff --git a/core/src/main/resources/lib/form/combobox/combobox.js b/core/src/main/resources/lib/form/combobox/combobox.js index 67fde93abaa2..a1ad886784c8 100644 --- a/core/src/main/resources/lib/form/combobox/combobox.js +++ b/core/src/main/resources/lib/form/combobox/combobox.js @@ -22,7 +22,7 @@ Behaviour.specify("INPUT.combobox2", "combobox", 100, function (e) { var urlSearchParams = new URLSearchParams(params); fetch(e.getAttribute("fillUrl") + "?" + urlSearchParams, { headers: crumb.wrap({}), - method: "post", + method: "post" }).then((rsp) => { if (rsp.ok) { rsp.json().then((json) => { diff --git a/core/src/main/resources/lib/form/filter-menu-button/filter-menu-button.js b/core/src/main/resources/lib/form/filter-menu-button/filter-menu-button.js index d19e867ce218..2b9e5e9d54a7 100644 --- a/core/src/main/resources/lib/form/filter-menu-button/filter-menu-button.js +++ b/core/src/main/resources/lib/form/filter-menu-button/filter-menu-button.js @@ -9,7 +9,7 @@ window.createFilterMenuButton = function ( type: "menu", menu: menu, menualignment: menuAlignment, - menuminscrollheight: menuMinScrollHeight, + menuminscrollheight: menuMinScrollHeight }); var filter = _createFilterMenuButton(menuButton._menu); diff --git a/core/src/main/resources/lib/form/hetero-list/hetero-list.js b/core/src/main/resources/lib/form/hetero-list/hetero-list.js index 7f4df9bd1640..7b3a149b9f9d 100644 --- a/core/src/main/resources/lib/form/hetero-list/hetero-list.js +++ b/core/src/main/resources/lib/form/hetero-list/hetero-list.js @@ -44,7 +44,7 @@ Behaviour.specify( html: n.innerHTML, name: name, tooltip: tooltip, - descriptorId: descriptorId, + descriptorId: descriptorId }); } prototypes.remove(); @@ -148,7 +148,7 @@ Behaviour.specify( new YAHOO.util.Anim( nc, { - opacity: { to: 1 }, + opacity: { to: 1 } }, 0.2, YAHOO.util.Easing.easeIn diff --git a/core/src/main/resources/lib/form/radioBlock/radioBlock.js b/core/src/main/resources/lib/form/radioBlock/radioBlock.js index b6b021896ba1..629f97b750eb 100644 --- a/core/src/main/resources/lib/form/radioBlock/radioBlock.js +++ b/core/src/main/resources/lib/form/radioBlock/radioBlock.js @@ -28,7 +28,7 @@ var radioBlockSupport = { } } layoutUpdateCallback.call(); - }, + } }; // this needs to happen before TR.row-set-end rule kicks in. diff --git a/core/src/main/resources/lib/form/repeatable/repeatable.js b/core/src/main/resources/lib/form/repeatable/repeatable.js index 644c2d2d0dfe..32ce63625b76 100644 --- a/core/src/main/resources/lib/form/repeatable/repeatable.js +++ b/core/src/main/resources/lib/form/repeatable/repeatable.js @@ -63,7 +63,7 @@ var repeatableSupport = { new YAHOO.util.Anim( nc, { - opacity: { to: 1 }, + opacity: { to: 1 } }, 0.2, YAHOO.util.Easing.easeIn @@ -130,7 +130,7 @@ var repeatableSupport = { n, { opacity: { to: 0 }, - height: { to: 0 }, + height: { to: 0 } }, 0.2, YAHOO.util.Easing.easeIn @@ -165,7 +165,7 @@ var repeatableSupport = { } } layoutUpdateCallback.call(); - }, + } }; // do the ones that extract innerHTML so that they can get their original HTML before diff --git a/core/src/main/resources/lib/form/select/select.js b/core/src/main/resources/lib/form/select/select.js index 450b6ab67e39..d2eaf5d4a302 100644 --- a/core/src/main/resources/lib/form/select/select.js +++ b/core/src/main/resources/lib/form/select/select.js @@ -100,9 +100,9 @@ function updateListBox(listBox, url, config) { fetch(url, { method: "post", headers: crumb.wrap({ - "Content-Type": "application/x-www-form-urlencoded", + "Content-Type": "application/x-www-form-urlencoded" }), - body: objectToUrlFormEncoded(config.parameters), + body: objectToUrlFormEncoded(config.parameters) }).then((response) => { if (response.ok) { config.onSuccess(response); @@ -154,7 +154,7 @@ Behaviour.specify("SELECT.select", "select", 1000, function (e) { if (hasChanged(e, value)) { fireEvent(e, "change"); } - }, + } }); }); }); diff --git a/core/src/main/resources/lib/form/textarea/textarea.js b/core/src/main/resources/lib/form/textarea/textarea.js index 3d6c7cfa339e..b9f4994dc8da 100644 --- a/core/src/main/resources/lib/form/textarea/textarea.js +++ b/core/src/main/resources/lib/form/textarea/textarea.js @@ -69,8 +69,8 @@ Behaviour.specify( method: "post", headers: crumb.wrap({}), body: new URLSearchParams({ - text: text, - }), + text: text + }) }).then((rsp) => { rsp.text().then((responseText) => { if (rsp.ok) { diff --git a/core/src/main/resources/lib/hudson/progressive-text.js b/core/src/main/resources/lib/hudson/progressive-text.js index 6600604d7844..90a90339ad92 100644 --- a/core/src/main/resources/lib/hudson/progressive-text.js +++ b/core/src/main/resources/lib/hudson/progressive-text.js @@ -27,8 +27,8 @@ Behaviour.specify( method: "post", headers, body: new URLSearchParams({ - start: e.fetchedBytes, - }), + start: e.fetchedBytes + }) }).then((rsp) => { if (rsp.status >= 500 || rsp.status === 0) { setTimeout(function () { diff --git a/war/.eslintrc.js b/war/.eslintrc.js index 15da526346cb..a683c60a06f5 100644 --- a/war/.eslintrc.js +++ b/war/.eslintrc.js @@ -2,16 +2,16 @@ module.exports = { env: { browser: true, - es2022: true, + es2022: true }, // Uses eslint default ruleset extends: ["eslint:recommended", "prettier"], parserOptions: { sourceType: "module", - ecmaVersion: 2022, + ecmaVersion: 2022 }, rules: { - curly: "error", + curly: "error" }, globals: { $: "readonly", @@ -71,6 +71,6 @@ module.exports = { Utilities: "readonly", UTILITIES_VERSION: "writeable", YAHOO: "readonly", - YUI: "readonly", - }, + YUI: "readonly" + } }; diff --git a/war/.stylelintrc.js b/war/.stylelintrc.js index cfea225e3035..56bd7ef72c26 100644 --- a/war/.stylelintrc.js +++ b/war/.stylelintrc.js @@ -10,8 +10,8 @@ module.exports = { "value-keyword-case": [ "lower", { - camelCaseSvgKeywords: true, - }, + camelCaseSvgKeywords: true + } ], "property-no-vendor-prefix": null, "at-rule-no-unknown": [ @@ -24,15 +24,15 @@ module.exports = { "include", "mixin", "for", - "use", - ], - }, + "use" + ] + } ], "color-function-notation": "legacy", "alpha-value-notation": "number", "number-max-precision": 5, "function-no-unknown": null, "no-duplicate-selectors": null, - "hue-degree-notation": "number", - }, + "hue-degree-notation": "number" + } }; diff --git a/war/postcss.config.js b/war/postcss.config.js index 2886b7822f36..3e8dc44ceda3 100644 --- a/war/postcss.config.js +++ b/war/postcss.config.js @@ -5,9 +5,9 @@ module.exports = { "postcss-preset-env": { stage: false, features: { - "media-query-ranges": true, + "media-query-ranges": true }, - preserve: false, - }, - }, + preserve: false + } + } }; diff --git a/war/src/main/js/add-item.js b/war/src/main/js/add-item.js index 8bf835b8db48..063629c43dfa 100644 --- a/war/src/main/js/add-item.js +++ b/war/src/main/js/add-item.js @@ -252,7 +252,7 @@ $.when(getItems()).done(function (data) { "c-335061", "c-D33833", "c-6D6B6D", - "c-6699CC", + "c-6699CC" ]; var desc = elem.description || ""; var name = elem.displayName; diff --git a/war/src/main/js/api/pluginManager.js b/war/src/main/js/api/pluginManager.js index 0fdcbd82d54f..37336eec4e62 100644 --- a/war/src/main/js/api/pluginManager.js +++ b/war/src/main/js/api/pluginManager.js @@ -23,7 +23,7 @@ pluginManager.initialPluginList = function (handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); - }, + } } ); }; @@ -111,7 +111,7 @@ pluginManager.installPlugins = function (plugins, handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); - }, + } } ); }; @@ -140,7 +140,7 @@ pluginManager.installStatus = function (handler, correlationId) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); - }, + } } ); }; @@ -167,7 +167,7 @@ pluginManager.availablePlugins = function (handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); - }, + } } ); }; @@ -187,7 +187,7 @@ pluginManager.availablePluginsSearch = function (query, limit, handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); - }, + } } ); }; @@ -216,7 +216,7 @@ pluginManager.incompleteInstallStatus = function (handler, correlationId) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); - }, + } } ); }; @@ -235,7 +235,7 @@ pluginManager.completeInstall = function (handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, message: errorThrown }); - }, + } } ); }; @@ -253,7 +253,7 @@ pluginManager.getRestartStatus = function (handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, message: errorThrown }); - }, + } } ); }; @@ -272,7 +272,7 @@ pluginManager.installPluginsDone = function (handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, message: errorThrown }); - }, + } } ); }; @@ -291,7 +291,7 @@ pluginManager.restartJenkins = function (handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, message: errorThrown }); - }, + } } ); }; diff --git a/war/src/main/js/api/securityConfig.js b/war/src/main/js/api/securityConfig.js index 51633990b186..78612f7d7562 100644 --- a/war/src/main/js/api/securityConfig.js +++ b/war/src/main/js/api/securityConfig.js @@ -20,7 +20,7 @@ function saveFirstUser($form, success, error) { success(response); }, { - error: error, + error: error } ); } @@ -37,7 +37,7 @@ function saveConfigureInstance($form, success, error) { success(response); }, { - error: error, + error: error } ); } @@ -48,12 +48,12 @@ function saveConfigureInstance($form, success, error) { function saveProxy($form, success, error) { jenkins.staplerPost("/pluginManager/proxyConfigure", $form, success, { dataType: "html", - error: error, + error: error }); } export default { saveFirstUser: saveFirstUser, saveConfigureInstance: saveConfigureInstance, - saveProxy: saveProxy, + saveProxy: saveProxy }; diff --git a/war/src/main/js/components/dropdowns/jumplists.js b/war/src/main/js/components/dropdowns/jumplists.js index 9158be7c3d64..ed9ac8b48e7c 100644 --- a/war/src/main/js/components/dropdowns/jumplists.js +++ b/war/src/main/js/components/dropdowns/jumplists.js @@ -69,13 +69,13 @@ function mapChildrenItemsToDropdownItems(items) { if (item.type === "HEADER") { return { type: "HEADER", - label: item.displayName, + label: item.displayName }; } if (item.type === "SEPARATOR") { return { - type: "SEPARATOR", + type: "SEPARATOR" }; } @@ -103,7 +103,7 @@ function mapChildrenItemsToDropdownItems(items) { } else { fetch(item.url, { method: "post", - headers: crumb.wrap({}), + headers: crumb.wrap({}) }); if (event.length === 1 && event[0].target != null) { hoverNotification("Done.", event[0].target); @@ -115,7 +115,7 @@ function mapChildrenItemsToDropdownItems(items) { ? () => { return mapChildrenItemsToDropdownItems(item.subMenu.items); } - : null, + : null }; }); } diff --git a/war/src/main/js/components/dropdowns/templates.js b/war/src/main/js/components/dropdowns/templates.js index c952f75cb6de..390be0238c67 100644 --- a/war/src/main/js/components/dropdowns/templates.js +++ b/war/src/main/js/components/dropdowns/templates.js @@ -23,14 +23,14 @@ function dropdown() { onHide: (instance) => { const referenceParent = instance.reference.parentNode; referenceParent.classList.remove("model-link--open"); - }, + } }; } function menuItem(options) { const itemOptions = Object.assign( { - type: "link", + type: "link" }, options ); @@ -99,5 +99,5 @@ export default { menuItem, heading, separator, - placeholder, + placeholder }; diff --git a/war/src/main/js/components/dropdowns/utils.js b/war/src/main/js/components/dropdowns/utils.js index 3650d05cf0b3..5da8a1c2d3df 100644 --- a/war/src/main/js/components/dropdowns/utils.js +++ b/war/src/main/js/components/dropdowns/utils.js @@ -30,7 +30,7 @@ function generateDropdown(element, callback) { }, onShown(instance) { behaviorShim.applySubtree(instance.popper); - }, + } }) ); } @@ -61,7 +61,7 @@ function generateDropdownItems(items) { content: generateDropdownItems(item.subMenu()), trigger: "mouseenter", placement: "right-start", - offset: [-8, 0], + offset: [-8, 0] }) ); } @@ -134,5 +134,5 @@ function generateDropdownItems(items) { export default { generateDropdown, - generateDropdownItems, + generateDropdownItems }; diff --git a/war/src/main/js/components/modals/index.js b/war/src/main/js/components/modals/index.js index d2e516935ef8..04aca16ec628 100644 --- a/war/src/main/js/components/modals/index.js +++ b/war/src/main/js/components/modals/index.js @@ -3,7 +3,7 @@ import { CLOSE } from "@/util/symbols"; const defaults = { maxWidth: undefined, - hideCloseButton: false, + hideCloseButton: false }; export function showModal(contents, options = {}) { diff --git a/war/src/main/js/components/notifications/index.js b/war/src/main/js/components/notifications/index.js index 8c5f78400622..d8e3a69f0dfc 100644 --- a/war/src/main/js/components/notifications/index.js +++ b/war/src/main/js/components/notifications/index.js @@ -12,16 +12,16 @@ function init() { SUCCESS: { alertClass: "jenkins-notification jenkins-notification--success", - icon: Symbols.SUCCESS, + icon: Symbols.SUCCESS }, WARNING: { alertClass: "jenkins-notification jenkins-notification--warning", - icon: Symbols.WARNING, + icon: Symbols.WARNING }, ERROR: { alertClass: "jenkins-notification jenkins-notification--error", icon: Symbols.ERROR, - sticky: true, + sticky: true }, init: function () { @@ -71,7 +71,7 @@ function init() { self.hide(); }, this.DELAY); } - }, + } }; } diff --git a/war/src/main/js/components/tooltips/index.js b/war/src/main/js/components/tooltips/index.js index 9f6c0918872c..e5ff6ed57437 100644 --- a/war/src/main/js/components/tooltips/index.js +++ b/war/src/main/js/components/tooltips/index.js @@ -5,7 +5,7 @@ const TOOLTIP_BASE = { arrow: false, theme: "tooltip", animation: "tooltip", - appendTo: document.body, + appendTo: document.body }; /** @@ -37,7 +37,7 @@ function registerTooltip(element) { }, onHidden(instance) { instance.reference.setAttribute("title", instance.props.content); - }, + } }, TOOLTIP_BASE ) @@ -55,7 +55,7 @@ function registerTooltip(element) { instance.props.interactive = instance.reference.getAttribute("data-tooltip-interactive") === "true"; - }, + } }, TOOLTIP_BASE ) @@ -80,7 +80,7 @@ function hoverNotification(text, element) { setTimeout(() => { instance.hide(); }, 3000); - }, + } }, TOOLTIP_BASE ) diff --git a/war/src/main/js/filter-build-history.js b/war/src/main/js/filter-build-history.js index fcae2cf415ac..1552ddd7ef15 100644 --- a/war/src/main/js/filter-build-history.js +++ b/war/src/main/js/filter-build-history.js @@ -27,8 +27,8 @@ function updateBuilds(params) { if (isPageVisible()) { fetch(ajaxUrl + toQueryString(params), { headers: { - n: buildHistoryContainer.headers[1], - }, + n: buildHistoryContainer.headers[1] + } }).then((rsp) => { if (rsp.ok) { rsp.text().then((responseText) => { diff --git a/war/src/main/js/pages/dashboard/index.js b/war/src/main/js/pages/dashboard/index.js index 14bcc467d526..7b360e62d8c3 100644 --- a/war/src/main/js/pages/dashboard/index.js +++ b/war/src/main/js/pages/dashboard/index.js @@ -10,6 +10,6 @@ document.querySelector("#button-icon-legend").addEventListener("click", () => { showModal(content, { maxWidth: "550px", - title: title, + title: title }); }); diff --git a/war/src/main/js/pages/manage-jenkins/index.js b/war/src/main/js/pages/manage-jenkins/index.js index 55861e2d6358..4a44dcfae12d 100644 --- a/war/src/main/js/pages/manage-jenkins/index.js +++ b/war/src/main/js/pages/manage-jenkins/index.js @@ -7,7 +7,7 @@ searchBarInput.suggestions = function () { icon: item.querySelector( ".jenkins-section__item__icon svg, .jenkins-section__item__icon img" ).outerHTML, - label: item.querySelector("dt").textContent, + label: item.querySelector("dt").textContent })) .filter((item) => !item.url.endsWith("#")); }; diff --git a/war/src/main/js/pages/register/index.js b/war/src/main/js/pages/register/index.js index 9da544ba4a78..e166154d32de 100644 --- a/war/src/main/js/pages/register/index.js +++ b/war/src/main/js/pages/register/index.js @@ -54,7 +54,7 @@ function passwordScore(password) { digits: /\d/.test(password), lower: /[a-z]/.test(password), upper: /[A-Z]/.test(password), - nonWords: /\W/.test(password), + nonWords: /\W/.test(password) }; let variationCount = 0; diff --git a/war/src/main/js/plugin-manager-ui.js b/war/src/main/js/plugin-manager-ui.js index ebad9ffa221d..c1f7ac4168b3 100644 --- a/war/src/main/js/plugin-manager-ui.js +++ b/war/src/main/js/plugin-manager-ui.js @@ -42,7 +42,7 @@ function applyFilter(searchQuery) { plugins: plugins.filter( (plugin) => selectedPlugins.indexOf(plugin.name) === -1 ), - admin, + admin }); tbody.insertAdjacentHTML("beforeend", rows); diff --git a/war/src/main/js/pluginSetupWizardGui.js b/war/src/main/js/pluginSetupWizardGui.js index fefb6b811edd..a0ddadac6684 100644 --- a/war/src/main/js/pluginSetupWizardGui.js +++ b/war/src/main/js/pluginSetupWizardGui.js @@ -176,7 +176,7 @@ var createPluginSetupWizard = function (appendTarget) { $tip .tooltip({ html: true, - title: text, + title: text }) .tooltip("show"); }); @@ -200,7 +200,7 @@ var createPluginSetupWizard = function (appendTarget) { var decorations = [ function () { // any decorations after DOM replacement go here - }, + } ]; var getJenkinsVersionFull = function () { @@ -249,7 +249,7 @@ var createPluginSetupWizard = function (appendTarget) { { translations: translations, baseUrl: jenkins.baseUrl, - jenkinsVersion: getJenkinsVersion(), + jenkinsVersion: getJenkinsVersion() }, data ) @@ -400,7 +400,7 @@ var createPluginSetupWizard = function (appendTarget) { if (p) { var plug = $.extend( { - installStatus: "pending", + installStatus: "pending" }, p ); @@ -519,7 +519,7 @@ var createPluginSetupWizard = function (appendTarget) { }, INITIAL_PLUGINS_INSTALLING: function () { showInstallProgress(); - }, + } }; var showStatePanel = function (state) { if (!state) { @@ -543,7 +543,7 @@ var createPluginSetupWizard = function (appendTarget) { if (failedPluginNames.length > 0) { setPanel(pluginSuccessPanel, { installingPlugins: installingPlugins, - failedPlugins: true, + failedPlugins: true }); return; } @@ -731,7 +731,7 @@ var createPluginSetupWizard = function (appendTarget) { if (!plug) { plug = { name: plugInfo.name, - title: plugInfo.name, + title: plugInfo.name }; } plugs.push({ @@ -740,8 +740,8 @@ var createPluginSetupWizard = function (appendTarget) { usage: plugInfo.usage, title: plugInfo.title ? plugInfo.title : plug.title, excerpt: plugInfo.excerpt ? plugInfo.excerpt : plug.excerpt, - updated: new Date(plug.buildDate), - }), + updated: new Date(plug.buildDate) + }) }); } } @@ -754,7 +754,7 @@ var createPluginSetupWizard = function (appendTarget) { loadPluginCategories(function () { setPanel(pluginSelectionPanel, pluginSelectionPanelData(), function () { $bs(".plugin-selector .plugin-list").scrollspy({ - target: ".plugin-selector .categories", + target: ".plugin-selector .categories" }); }); }); @@ -765,7 +765,7 @@ var createPluginSetupWizard = function (appendTarget) { return { categories: categories, categorizedPlugins: categorizedPlugins, - selectedPlugins: selectedPluginNames, + selectedPlugins: selectedPluginNames }; }; @@ -857,7 +857,7 @@ var createPluginSetupWizard = function (appendTarget) { var pos = $pl.scrollTop() + $el.position().top; $pl.stop(true).animate( { - scrollTop: pos, + scrollTop: pos }, 100 ); @@ -866,7 +866,7 @@ var createPluginSetupWizard = function (appendTarget) { var pos = $pl.scrollTop() + $el.position().top; $pl.stop(true).animate( { - scrollTop: pos, + scrollTop: pos }, 50 ); @@ -983,7 +983,7 @@ var createPluginSetupWizard = function (appendTarget) { var top = $pl.scrollTop() + $el.position().top; $pl.stop(true).animate( { - scrollTop: top, + scrollTop: top }, 250, function () { @@ -1008,7 +1008,7 @@ var createPluginSetupWizard = function (appendTarget) { showStatePanel(); } else { setPanel(errorPanel, { - errorMessage: "Error trying to create first user: " + data.statusText, + errorMessage: "Error trying to create first user: " + data.statusText }); } }; @@ -1056,7 +1056,7 @@ var createPluginSetupWizard = function (appendTarget) { if (data.url) { // as in InstallState.ConfigureInstance.initializeState showSetupCompletePanel({ - message: translations.installWizard_firstUserSkippedMessage, + message: translations.installWizard_firstUserSkippedMessage }); } else { showConfigureInstance(); @@ -1066,7 +1066,7 @@ var createPluginSetupWizard = function (appendTarget) { error: function () { // give up showConfigureInstance(); - }, + } } ); }; @@ -1276,7 +1276,7 @@ var createPluginSetupWizard = function (appendTarget) { }, ".retry-failed-plugins": retryFailedPlugins, ".continue-with-failed-plugins": continueWithFailedPlugins, - ".start-over": startOver, + ".start-over": startOver }; // do this so the page isn't blank while doing connectivity checks and other downloads @@ -1307,7 +1307,7 @@ var createPluginSetupWizard = function (appendTarget) { showStatePanel: showStatePanel, installPlugins: installPlugins, pluginSelectionPanelData: pluginSelectionPanelData, - loadPluginCategories: loadPluginCategories, + loadPluginCategories: loadPluginCategories }); }); } @@ -1413,7 +1413,7 @@ var createPluginSetupWizard = function (appendTarget) { } } setPanel(incompleteInstallationPanel, { - installingPlugins: installingPlugins, + installingPlugins: installingPlugins }); }) ); diff --git a/war/src/main/js/section-to-sidebar-items.js b/war/src/main/js/section-to-sidebar-items.js index 906e7c27a822..1bc3a9106df9 100644 --- a/war/src/main/js/section-to-sidebar-items.js +++ b/war/src/main/js/section-to-sidebar-items.js @@ -42,7 +42,7 @@ window.addEventListener("load", function () { headerToScrollTo.getBoundingClientRect().top + window.scrollY - 70; window.scrollTo({ top: i === 0 ? 0 : sectionTopPosition, - behavior: "smooth", + behavior: "smooth" }); }); diff --git a/war/src/main/js/sortable-drag-drop.js b/war/src/main/js/sortable-drag-drop.js index 5689119af42c..3f75dffa0b52 100644 --- a/war/src/main/js/sortable-drag-drop.js +++ b/war/src/main/js/sortable-drag-drop.js @@ -32,7 +32,7 @@ function registerSortableDragDrop(e) { }, onUnchoose: function (event) { event.item.style.removeProperty("height"); - }, + } }); } diff --git a/war/src/main/js/util/jenkins.js b/war/src/main/js/util/jenkins.js index 1078467eb4b5..d8c44b9e005a 100644 --- a/war/src/main/js/util/jenkins.js +++ b/war/src/main/js/util/jenkins.js @@ -25,7 +25,7 @@ jenkins.stringify = function (o) { a: Array.prototype.toJSON, o: Object.prototype.toJSON, h: Hash.prototype.toJSON, - s: String.prototype.toJSON, + s: String.prototype.toJSON }; try { delete Array.prototype.toJSON; @@ -73,7 +73,7 @@ jenkins.get = function (url, success, options) { type: "GET", cache: false, dataType: "json", - success: success, + success: success }; if (options instanceof Object) { $.extend(args, options); @@ -121,7 +121,7 @@ jenkins.post = function (url, data, success, options) { data: formBody, contentType: "application/json", success: success, - headers: headers, + headers: headers }; if (options instanceof Object) { $.extend(args, options); @@ -161,7 +161,7 @@ jenkins.loadTranslations = function (bundleName, handler, onError) { console.log('"' + property + '" not found in translation bundle.'); } return property; - }, + } }); } @@ -213,7 +213,7 @@ jenkins.testConnectivity = function (siteId, handler) { } else { handler.call({ isError: true, errorMessage: errorThrown }); } - }, + } } ); }; @@ -254,7 +254,7 @@ jenkins.buildFormPost = function ($form) { $.param({ "core:apply": "", Submit: "Save", - json: $form.find("input[name=json]").val(), + json: $form.find("input[name=json]").val() }) ); } @@ -286,7 +286,7 @@ jenkins.staplerPost = function (url, $form, success, options) { { processData: false, contentType: "application/x-www-form-urlencoded", - crumb: crumb, + crumb: crumb }, options ) diff --git a/war/src/main/js/util/jenkinsLocalStorage.js b/war/src/main/js/util/jenkinsLocalStorage.js index 6f60ff7783ef..ee6541da34b8 100644 --- a/war/src/main/js/util/jenkinsLocalStorage.js +++ b/war/src/main/js/util/jenkinsLocalStorage.js @@ -35,5 +35,5 @@ export default { setGlobalItem, getGlobalItem, setPageItem, - getPageItem, + getPageItem }; diff --git a/war/src/main/js/util/localStorage.js b/war/src/main/js/util/localStorage.js index 70d4eb9b5d8f..7f2b5b079e14 100644 --- a/war/src/main/js/util/localStorage.js +++ b/war/src/main/js/util/localStorage.js @@ -13,7 +13,7 @@ function setMock() { }, removeItem: function (name) { delete this.storage[name]; - }, + } }; } @@ -43,5 +43,5 @@ export default { setMock, setItem, getItem, - removeItem, + removeItem }; diff --git a/war/src/main/js/util/page.js b/war/src/main/js/util/page.js index 33d10a4a7540..1a99cbf1dac2 100644 --- a/war/src/main/js/util/page.js +++ b/war/src/main/js/util/page.js @@ -64,5 +64,5 @@ export default { onWinScroll, pageHeaderHeight, breadcrumbBarHeight, - removeTextHighlighting, + removeTextHighlighting }; diff --git a/war/src/main/js/widgets/add/addform.scss b/war/src/main/js/widgets/add/addform.scss index aa60833e059e..27b47f9425f7 100644 --- a/war/src/main/js/widgets/add/addform.scss +++ b/war/src/main/js/widgets/add/addform.scss @@ -159,36 +159,51 @@ .c-D33833 { border: 1px solid #900; - box-shadow: inset #900 0 0 1px, inset #fff 0 0 0 1px, - 0 5px 3px -2px rgba(0, 0, 0, 0.25), inset -5px -5px 10px 2px #903, + box-shadow: + inset #900 0 0 1px, + inset #fff 0 0 0 1px, + 0 5px 3px -2px rgba(0, 0, 0, 0.25), + inset -5px -5px 10px 2px #903, inset -5px -10px 15px 14px #d33833; } .c-6D6B6D { border: 1px solid #000; - box-shadow: inset #333 0 0 1px, inset #fff 0 0 0 1px, - 0 5px 3px -2px rgba(0, 0, 0, 0.25), inset -5px -5px 10px 2px #222, + box-shadow: + inset #333 0 0 1px, + inset #fff 0 0 0 1px, + 0 5px 3px -2px rgba(0, 0, 0, 0.25), + inset -5px -5px 10px 2px #222, inset -5px -10px 15px 14px #555; } .c-335061 { border: 1px solid #356; - box-shadow: inset #024 0 0 1px, inset #fff 0 0 0 1px, - 0 5px 3px -2px rgba(0, 0, 0, 0.25), inset -5px -5px 10px 2px #012, + box-shadow: + inset #024 0 0 1px, + inset #fff 0 0 0 1px, + 0 5px 3px -2px rgba(0, 0, 0, 0.25), + inset -5px -5px 10px 2px #012, inset -5px -10px 15px 14px #335061; } .c-49728B { border: 1px solid #036; - box-shadow: inset #036 0 0 1px, inset #fff 0 0 0 1px, - 0 5px 3px -2px rgba(0, 0, 0, 0.25), inset -5px -5px 10px 2px #036, + box-shadow: + inset #036 0 0 1px, + inset #fff 0 0 0 1px, + 0 5px 3px -2px rgba(0, 0, 0, 0.25), + inset -5px -5px 10px 2px #036, inset -5px -10px 15px 14px #49728b; } .c-6699CC { border: 1px solid #6699cc; - box-shadow: inset #003399 0 0 1px, inset #ffffff 0 0 0 1px, - 0 5px 3px -2px rgba(0, 0, 0, 0.25), inset -5px -5px 10px 2px #336699, + box-shadow: + inset #003399 0 0 1px, + inset #ffffff 0 0 0 1px, + 0 5px 3px -2px rgba(0, 0, 0, 0.25), + inset -5px -5px 10px 2px #336699, inset -5px -10px 15px 14px #6699cc; } diff --git a/war/src/main/scss/abstracts/theme.scss b/war/src/main/scss/abstracts/theme.scss index 79ebb07112a5..96211eeadf64 100644 --- a/war/src/main/scss/abstracts/theme.scss +++ b/war/src/main/scss/abstracts/theme.scss @@ -11,7 +11,7 @@ $colors: ( "pink": #fb0f45, "purple": #af52de, "red": #e6001f, - "yellow": #ffb31a, + "yellow": #ffb31a ); $semantics: ( @@ -19,7 +19,7 @@ $semantics: ( "warning": var(--orange), "success": var(--green), "destructive": var(--red), - "build": var(--green), + "build": var(--green) ); :root, diff --git a/war/src/main/scss/base/style.scss b/war/src/main/scss/base/style.scss index aa8e3a5ade5b..7b7de108f97c 100644 --- a/war/src/main/scss/base/style.scss +++ b/war/src/main/scss/base/style.scss @@ -370,7 +370,10 @@ pre.console { padding: 4px 0; margin-left: 0; border-bottom: 1px solid #090; - font: bold 12px Helvetica, Arial, sans-serif; + font: + bold 12px Helvetica, + Arial, + sans-serif; } #foldertab li { diff --git a/war/src/main/scss/form/checkbox.scss b/war/src/main/scss/form/checkbox.scss index 4a456893f874..8d23d9e3977d 100644 --- a/war/src/main/scss/form/checkbox.scss +++ b/war/src/main/scss/form/checkbox.scss @@ -31,7 +31,8 @@ &:focus { & + label { &::before { - box-shadow: 0 0 0 5px var(--focus-input-glow), + box-shadow: + 0 0 0 5px var(--focus-input-glow), inset 0 0 0 5px var(--focus-input-border); } } @@ -42,7 +43,8 @@ &:focus { & + label { &::before { - box-shadow: 0 0 0 5px var(--focus-input-glow), + box-shadow: + 0 0 0 5px var(--focus-input-glow), inset 0 0 0 12px var(--focus-input-border); } } @@ -55,7 +57,8 @@ &:focus { & + label { &::before { - box-shadow: 0 0 0 5px var(--focus-input-glow), + box-shadow: + 0 0 0 5px var(--focus-input-glow), inset 0 0 0 12px var(--focus-input-border); } } @@ -67,7 +70,8 @@ &:active, &:focus { &::before { - box-shadow: 0 0 0 5px var(--focus-input-glow), + box-shadow: + 0 0 0 5px var(--focus-input-glow), inset 0 0 0 12px var(--focus-input-border); } } @@ -75,7 +79,8 @@ & + label { &::before { - box-shadow: 0 0 0 10px transparent, + box-shadow: + 0 0 0 10px transparent, inset 0 0 0 12px var(--focus-input-border); } @@ -91,14 +96,17 @@ &::before { opacity: 0.35 !important; - box-shadow: 0 0 0 10px transparent, inset 0 0 0 2px var(--input-border) !important; + box-shadow: + 0 0 0 10px transparent, + inset 0 0 0 2px var(--input-border) !important; } } &:checked { & + label { &::before { - box-shadow: 0 0 0 10px transparent, + box-shadow: + 0 0 0 10px transparent, inset 0 0 0 12px var(--focus-input-border) !important; } @@ -129,7 +137,9 @@ border-radius: 6px; transition: var(--standard-transition); margin-right: 11px; - box-shadow: 0 0 0 10px transparent, inset 0 0 0 2px var(--input-border); + box-shadow: + 0 0 0 10px transparent, + inset 0 0 0 2px var(--input-border); } &::after { @@ -159,7 +169,8 @@ &:hover { &::before { - box-shadow: 0 0 0 10px transparent, + box-shadow: + 0 0 0 10px transparent, inset 0 0 0 5px var(--input-border-hover); } } @@ -167,7 +178,8 @@ &:active, &:focus { &::before { - box-shadow: 0 0 0 5px var(--focus-input-glow), + box-shadow: + 0 0 0 5px var(--focus-input-glow), inset 0 0 0 5px var(--focus-input-border); } } diff --git a/war/src/main/scss/form/codemirror.scss b/war/src/main/scss/form/codemirror.scss index 70426bca5662..67520192c0e5 100644 --- a/war/src/main/scss/form/codemirror.scss +++ b/war/src/main/scss/form/codemirror.scss @@ -5,7 +5,9 @@ border-radius: var(--form-input-border-radius); width: 100%; box-shadow: var(--form-input-glow); - transition: var(--standard-transition), height 0s; + transition: + var(--standard-transition), + height 0s; cursor: text; margin-bottom: var(--section-padding); diff --git a/war/src/main/scss/form/input.scss b/war/src/main/scss/form/input.scss index fef7afde3ee0..1ad67af1c9e2 100644 --- a/war/src/main/scss/form/input.scss +++ b/war/src/main/scss/form/input.scss @@ -7,7 +7,10 @@ width: 100%; box-shadow: var(--form-input-glow); // Set height transition to 0s as vertical resizing has a delay/lag otherwise - transition: all var(--standard-transition), height 0s, padding 0s; + transition: + all var(--standard-transition), + height 0s, + padding 0s; &:hover { border-color: var(--input-border-hover); diff --git a/war/src/main/scss/form/radio.scss b/war/src/main/scss/form/radio.scss index 91ca1d0c684a..68f95df38f4b 100644 --- a/war/src/main/scss/form/radio.scss +++ b/war/src/main/scss/form/radio.scss @@ -19,7 +19,8 @@ &:hover { & + label { &::before { - box-shadow: 0 0 0 10px transparent, + box-shadow: + 0 0 0 10px transparent, inset 0 0 0 5px var(--input-border-hover); } } @@ -31,7 +32,8 @@ & + label { &::before { transition: box-shadow var(--elastic-transition); - box-shadow: 0 0 0 5px var(--focus-input-glow), + box-shadow: + 0 0 0 5px var(--focus-input-glow), inset 0 0 0 5px var(--focus-input-border); } } @@ -42,7 +44,8 @@ &:active { & + label { &::before { - box-shadow: 0 0 0 5px var(--focus-input-glow), + box-shadow: + 0 0 0 5px var(--focus-input-glow), inset 0 0 0 8px var(--focus-input-border); } } @@ -55,7 +58,8 @@ &:active, &:focus { &::before { - box-shadow: 0 0 0 5px var(--focus-input-glow), + box-shadow: + 0 0 0 5px var(--focus-input-glow), inset 0 0 0 12px var(--focus-input-border); } } @@ -101,7 +105,9 @@ height: 22px; border-radius: 50%; background: transparent; - box-shadow: 0 0 0 10px transparent, inset 0 0 0 2px var(--input-border); + box-shadow: + 0 0 0 10px transparent, + inset 0 0 0 2px var(--input-border); transition: box-shadow var(--standard-transition); } } diff --git a/war/src/main/scss/form/search-bar.scss b/war/src/main/scss/form/search-bar.scss index 83cfc37527e9..19b76ff6fed1 100644 --- a/war/src/main/scss/form/search-bar.scss +++ b/war/src/main/scss/form/search-bar.scss @@ -17,7 +17,9 @@ margin: 0; padding: 0 0.5rem 0 var(--search-bar-height); line-height: 1; - box-shadow: 0 0 0 2px transparent, 0 0 0 12px transparent; + box-shadow: + 0 0 0 2px transparent, + 0 0 0 12px transparent; transition: var(--standard-transition); font-weight: 500; height: var(--search-bar-height); @@ -64,7 +66,8 @@ &:focus { outline: none; background: var(--item-background--active); - box-shadow: 0 0 0 2px var(--focus-input-border), + box-shadow: + 0 0 0 2px var(--focus-input-border), 0 0 0 7px var(--focus-input-glow); &::-webkit-search-cancel-button { diff --git a/war/src/main/scss/form/toggle-switch.scss b/war/src/main/scss/form/toggle-switch.scss index fd10b1ef0655..451bceb71cfb 100644 --- a/war/src/main/scss/form/toggle-switch.scss +++ b/war/src/main/scss/form/toggle-switch.scss @@ -112,7 +112,9 @@ border-radius: 19px; transition: var(--standard-transition); margin-right: 1rem; - box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05), 0 0 0 10px transparent; + box-shadow: + inset 0 0 0 1px rgba(0, 0, 0, 0.05), + 0 0 0 10px transparent; } &::after { @@ -140,7 +142,8 @@ &:active, &:focus { &::before { - box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05), + box-shadow: + inset 0 0 0 1px rgba(0, 0, 0, 0.05), 0 0 0 5px var(--focus-input-glow); } diff --git a/war/src/main/scss/modules/buttons-deprecated.scss b/war/src/main/scss/modules/buttons-deprecated.scss index 49c64603d4fc..ca6c8fcba676 100644 --- a/war/src/main/scss/modules/buttons-deprecated.scss +++ b/war/src/main/scss/modules/buttons-deprecated.scss @@ -144,7 +144,9 @@ a.yui-button:visited { text-decoration: none; border: 2px solid; border-radius: 4px; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, + transition: + color 0.15s ease-in-out, + background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; @include button-secondary; diff --git a/war/src/main/scss/modules/notifications.scss b/war/src/main/scss/modules/notifications.scss index 02e7a8065f9e..b9fee05c423a 100644 --- a/war/src/main/scss/modules/notifications.scss +++ b/war/src/main/scss/modules/notifications.scss @@ -12,8 +12,10 @@ font-weight: 500; line-height: 1.66; color: var(--text-color); - box-shadow: 0 0 1px 1px rgba(darken(#024cb6, 50%), 0.075), - 0 10px 30px rgba(darken(#024cb6, 50%), 0.25), 0 0 30px 5px var(--background); + box-shadow: + 0 0 1px 1px rgba(darken(#024cb6, 50%), 0.075), + 0 10px 30px rgba(darken(#024cb6, 50%), 0.25), + 0 0 30px 5px var(--background); will-change: opacity, transform; z-index: 999; cursor: pointer; diff --git a/war/src/main/scss/modules/row-selection-controller.scss b/war/src/main/scss/modules/row-selection-controller.scss index 802ee2d9055a..f74dd37a0634 100644 --- a/war/src/main/scss/modules/row-selection-controller.scss +++ b/war/src/main/scss/modules/row-selection-controller.scss @@ -11,20 +11,24 @@ background: transparent; outline: none; border: none; - box-shadow: 0 0 0 10px transparent, inset 0 0 0 0.125rem var(--input-border); + box-shadow: + 0 0 0 10px transparent, + inset 0 0 0 0.125rem var(--input-border); border-radius: 6px; transition: var(--standard-transition); cursor: pointer; padding: 0; &:hover { - box-shadow: 0 0 0 10px transparent, + box-shadow: + 0 0 0 10px transparent, inset 0 0 0 0.3125rem var(--input-border-hover); } &:active, &:focus { - box-shadow: 0 0 0 5px var(--focus-input-glow), + box-shadow: + 0 0 0 5px var(--focus-input-glow), inset 0 0 0 0.3125rem var(--focus-input-border); } @@ -57,17 +61,20 @@ } &--all { - box-shadow: 0 0 0 10px transparent, + box-shadow: + 0 0 0 10px transparent, inset 0 0 0 0.6875rem var(--focus-input-border); &:hover { - box-shadow: 0 0 0 10px transparent, + box-shadow: + 0 0 0 10px transparent, inset 0 0 0 1.375rem var(--focus-input-border); } &:active, &:focus { - box-shadow: 0 0 0 5px var(--focus-input-glow), + box-shadow: + 0 0 0 5px var(--focus-input-glow), inset 0 0 0 1.375rem var(--focus-input-border); } @@ -139,8 +146,11 @@ border-radius: 0.8rem; z-index: 999; padding: 0.4rem; - box-shadow: inset 0 0 0 2px rgba(white, 0.05), 0 0 0 1px rgba(black, 0.05), - 0 5px 10px rgba(black, 0.1), 0 5px 20px rgba(black, 0.3); + box-shadow: + inset 0 0 0 2px rgba(white, 0.05), + 0 0 0 1px rgba(black, 0.05), + 0 5px 10px rgba(black, 0.1), + 0 5px 20px rgba(black, 0.3); min-width: 170px; opacity: 0; visibility: collapse; diff --git a/war/src/main/scss/modules/skip-link.scss b/war/src/main/scss/modules/skip-link.scss index 7df73fc3bf00..c8ed3238c690 100644 --- a/war/src/main/scss/modules/skip-link.scss +++ b/war/src/main/scss/modules/skip-link.scss @@ -8,13 +8,16 @@ $skip-link-box-shadow: 0 0 50px -15px var(--yellow); left: calc(var(--section-padding) - $skip-link-inline-padding); z-index: 2000; background: var(--background); - box-shadow: 0 0 0 1rem transparent, $skip-link-box-shadow; + box-shadow: + 0 0 0 1rem transparent, + $skip-link-box-shadow; color: var(--text-color) !important; padding: $skip-link-block-padding $skip-link-inline-padding; border-radius: 0.66rem; outline: none; text-decoration: none !important; - transition: var(--elastic-transition), + transition: + var(--elastic-transition), box-shadow var(--standard-transition) 0.1s; opacity: 0; scale: 80%; @@ -43,7 +46,9 @@ $skip-link-box-shadow: 0 0 50px -15px var(--yellow); } &:focus-visible { - box-shadow: 0 0 0 0.2rem var(--yellow), $skip-link-box-shadow; + box-shadow: + 0 0 0 0.2rem var(--yellow), + $skip-link-box-shadow; opacity: 1; scale: 100%; text-decoration: none !important; diff --git a/war/src/main/scss/pluginSetupWizard.scss b/war/src/main/scss/pluginSetupWizard.scss index 6bb5418da529..9b9f5b72ed8d 100644 --- a/war/src/main/scss/pluginSetupWizard.scss +++ b/war/src/main/scss/pluginSetupWizard.scss @@ -384,7 +384,8 @@ &:hover { background: rgba(100, 200, 255, 0.1); - box-shadow: inset 0 400px 400px -100px rgba(100, 200, 255, 0.33), + box-shadow: + inset 0 400px 400px -100px rgba(100, 200, 255, 0.33), inset 0 0 0 1px rgba(100, 200, 255, 0.33); } @@ -718,7 +719,8 @@ background: rgba(255, 255, 255, 0.75); &:nth-child(odd) { - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), + box-shadow: + 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 0 0 999px rgba(0, 0, 0, 0.05); } @@ -807,7 +809,8 @@ margin-right: 1.3%; margin-top: 1em; padding: 20px 25px; - box-shadow: inset 0 -200px 200px -100px rgba(0, 0, 0, 0.1), + box-shadow: + inset 0 -200px 200px -100px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2); border: 1px solid rgba(0, 60, 100, 0.5); text-shadow: #fff 0 1px 3px; @@ -827,7 +830,8 @@ &:focus { background: #fff; - box-shadow: inset 0 -200px 200px -100px rgba(0, 0, 0, 0.1), + box-shadow: + inset 0 -200px 200px -100px rgba(0, 0, 0, 0.1), 0 0 5px 3px rgba(00, 180, 250, 0.2); } @@ -837,7 +841,8 @@ &.btn-primary { background: rgba(200, 240, 255, 0.2); - box-shadow: inset 0 -200px 200px -100px rgba(0, 120, 160, 0.2), + box-shadow: + inset 0 -200px 200px -100px rgba(0, 120, 160, 0.2), 0 1px 3px rgba(0, 0, 0, 0.2); color: rgba(0, 80, 120, 1); @@ -847,7 +852,8 @@ } &:focus { - box-shadow: inset 0 -200px 200px -100px rgba(0, 120, 160, 0.2), + box-shadow: + inset 0 -200px 200px -100px rgba(0, 120, 160, 0.2), 0 0 5px 3px rgba(00, 180, 250, 0.2); } } diff --git a/war/src/main/webapp/scripts/behavior.js b/war/src/main/webapp/scripts/behavior.js index dc1d493c2e4d..75a36fafce26 100644 --- a/war/src/main/webapp/scripts/behavior.js +++ b/war/src/main/webapp/scripts/behavior.js @@ -54,7 +54,7 @@ var Behaviour = (function () { selector: selector, id: id, priority: priority, - behavior: behavior, + behavior: behavior }); storage.sort(function (a, b) { var location = a.priority - b.priority; @@ -153,7 +153,7 @@ var Behaviour = (function () { func(e); }; } - }, + } }; })(); diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index 61f4a5460bf7..cacfef0d6e72 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -156,7 +156,7 @@ var crumb = { form.action = form.action + "?" + this.fieldName + "=" + this.value; } } - }, + } }; (function initializeCrumb() { @@ -253,9 +253,9 @@ var FormChecker = { fetch(url, { method: params.method, headers: crumb.wrap({ - "Content-Type": "application/x-www-form-urlencoded", + "Content-Type": "application/x-www-form-urlencoded" }), - body: method !== "get" ? params.parameters : null, + body: method !== "get" ? params.parameters : null }).then((response) => { params.onComplete(response); }); @@ -279,10 +279,10 @@ var FormChecker = { FormChecker.schedule(); layoutUpdateCallback.call(); }); - }, + } }); this.inProgress++; - }, + } }; /** @@ -434,7 +434,7 @@ function qs(owner) { toString: function () { return this.params; - }, + } }; } @@ -735,7 +735,7 @@ function registerValidator(e) { response.status === 200 ? responseText : errorMessage ); }); - }, + } }); }; var oldOnchange = e.onchange; @@ -1337,7 +1337,7 @@ function rowvgStartEachRow(recursive, f) { ds.responseType = YAHOO.util.XHRDataSource.TYPE_JSON; ds.responseSchema = { resultsList: "suggestions", - fields: ["name"], + fields: ["name"] }; // Instantiate the AutoComplete @@ -1358,7 +1358,7 @@ function rowvgStartEachRow(recursive, f) { var Dom = YAHOO.util.Dom; Dom.setXY(container, [ Dom.getX(textbox), - Dom.getY(textbox) + textbox.offsetHeight, + Dom.getY(textbox) + textbox.offsetHeight ]); return true; }; @@ -1423,7 +1423,7 @@ function rowvgStartEachRow(recursive, f) { return true; } } - }, + } }).getWrapperElement(); })(); }); @@ -1580,7 +1580,7 @@ function rowvgStartEachRow(recursive, f) { * @param {boolean} recursive * If true, this visits all the rows from nested visibility groups. */ - eachRow: rowvgStartEachRow, + eachRow: rowvgStartEachRow }; } ); @@ -1899,7 +1899,7 @@ function rowvgStartEachRow(recursive, f) { } fetch(url, { method: "post", - headers: crumb.wrap({}), + headers: crumb.wrap({}) }); }); } @@ -1917,7 +1917,7 @@ var Path = { return p; } return p.substring(idx + 1); - }, + } }; /** @@ -1976,13 +1976,13 @@ function replaceDescription(initialDescription, submissionUrl) { if (initialDescription !== undefined && submissionUrl !== undefined) { parameters = { description: initialDescription, - submissionUrl: submissionUrl, + submissionUrl: submissionUrl }; } fetch("./descriptionForm", { method: "post", headers: crumb.wrap({}), - body: objectToUrlFormEncoded(parameters), + body: objectToUrlFormEncoded(parameters) }).then((rsp) => { rsp.text().then((responseText) => { d.innerHTML = responseText; @@ -2125,7 +2125,7 @@ function AutoScroller(scrollContainer) { document.documentElement.scrollTop = currentHeight; } scrollDiv.scrollTop = currentHeight; - }, + } }; } @@ -2138,7 +2138,7 @@ function refreshPart(id, url) { if (isPageVisible()) { fetch(url, { headers: crumb.wrap({}), - method: "post", + method: "post" }).then((rsp) => { if (rsp.ok) { rsp.text().then((responseText) => { @@ -2325,7 +2325,7 @@ function getElementOverflowParams(element) { element: element, clientWidth: wrappedClientWidth, scrollWidth: element.scrollWidth, - isOverflowed: wrappedClientHeight > nowrapClientHeight, + isOverflowed: wrappedClientHeight > nowrapClientHeight }; return overflowParams; } finally { @@ -2401,7 +2401,7 @@ function createSearchBox(searchURL) { ds.responseType = YAHOO.util.XHRDataSource.TYPE_JSON; ds.responseSchema = { resultsList: "suggestions", - fields: ["name"], + fields: ["name"] }; var ac = new YAHOO.widget.AutoComplete( "search-box", @@ -2787,8 +2787,8 @@ function validateButton(checkUrl, paramList, button) { method: "post", body: objectToUrlFormEncoded(parameters), headers: crumb.wrap({ - "Content-Type": "application/x-www-form-urlencoded", - }), + "Content-Type": "application/x-www-form-urlencoded" + }) }).then((rsp) => { rsp.text().then((responseText) => { spinner.style.display = "none"; @@ -2865,5 +2865,5 @@ var layoutUpdateCallback = { for (var i = 0, length = this.callbacks.length; i < length; i++) { this.callbacks[i](); } - }, + } }; diff --git a/war/src/main/webapp/scripts/loading.js b/war/src/main/webapp/scripts/loading.js index e14e8379db40..74f69d89b3d9 100644 --- a/war/src/main/webapp/scripts/loading.js +++ b/war/src/main/webapp/scripts/loading.js @@ -39,7 +39,7 @@ const Fetch = { } }; xhr.send(); - }, + } }; function safeRedirector(preferredUrl, fallbackUrl) { diff --git a/war/src/main/webapp/scripts/sortable.js b/war/src/main/webapp/scripts/sortable.js index 428c35c14430..7045483ea124 100644 --- a/war/src/main/webapp/scripts/sortable.js +++ b/war/src/main/webapp/scripts/sortable.js @@ -140,7 +140,7 @@ var Sortable = (function () { if (vals.length == 2) { return { column: parseInt(vals[0]), - direction: arrowTable[vals[1]], + direction: arrowTable[vals[1]] }; } } @@ -186,7 +186,7 @@ var Sortable = (function () { } else { this.pref = { column: column, - direction: arrow.sortdir || arrowTable.up, + direction: arrow.sortdir || arrowTable.up }; } @@ -301,23 +301,23 @@ var Sortable = (function () { return data; } return this.getInnerText(x); - }, + } }; var arrowTable = { up: { id: "up", - text: "  ↑", + text: "  ↑" }, down: { id: "down", - text: "  ↓", + text: "  ↓" }, none: { id: "none", - text: "", + text: "" }, - lnkRef: null, + lnkRef: null }; arrowTable.up.next = arrowTable.down; @@ -439,7 +439,7 @@ var Sortable = (function () { return function (a, b) { return -f(a, b); }; - }, + } }; var storage; @@ -448,7 +448,7 @@ var Sortable = (function () { YAHOO.util.StorageEngineHTML5.ENGINE_NAME, YAHOO.util.StorageManager.LOCATION_SESSION, { - order: [YAHOO.util.StorageEngineGears], + order: [YAHOO.util.StorageEngineGears] } ); } catch (e) { @@ -460,13 +460,13 @@ var Sortable = (function () { }, hasKey: function () { return false; - }, + } }; } return { Sortable: Sortable, - sorter: sorter, + sorter: sorter }; })(); diff --git a/war/webpack.config.js b/war/webpack.config.js index 50b54ba939b8..a3da78c45592 100644 --- a/war/webpack.config.js +++ b/war/webpack.config.js @@ -11,48 +11,48 @@ module.exports = (env, argv) => ({ entry: { pluginSetupWizard: [ path.join(__dirname, "src/main/js/pluginSetupWizard.js"), - path.join(__dirname, "src/main/scss/pluginSetupWizard.scss"), + path.join(__dirname, "src/main/scss/pluginSetupWizard.scss") ], "plugin-manager-ui": [ - path.join(__dirname, "src/main/js/plugin-manager-ui.js"), + path.join(__dirname, "src/main/js/plugin-manager-ui.js") ], "add-item": [ path.join(__dirname, "src/main/js/add-item.js"), - path.join(__dirname, "src/main/js/add-item.scss"), + path.join(__dirname, "src/main/js/add-item.scss") ], "pages/dashboard": [path.join(__dirname, "src/main/js/pages/dashboard")], "pages/manage-jenkins/system-information": [ path.join( __dirname, "src/main/js/pages/manage-jenkins/system-information" - ), + ) ], app: [path.join(__dirname, "src/main/js/app.js")], "pages/manage-jenkins": [ - path.join(__dirname, "src/main/js/pages/manage-jenkins"), + path.join(__dirname, "src/main/js/pages/manage-jenkins") ], "pages/register": [path.join(__dirname, "src/main/js/pages/register")], "keyboard-shortcuts": [ - path.join(__dirname, "src/main/js/keyboard-shortcuts.js"), + path.join(__dirname, "src/main/js/keyboard-shortcuts.js") ], "sortable-drag-drop": [ - path.join(__dirname, "src/main/js/sortable-drag-drop.js"), + path.join(__dirname, "src/main/js/sortable-drag-drop.js") ], "section-to-sidebar-items": [ - path.join(__dirname, "src/main/js/section-to-sidebar-items.js"), + path.join(__dirname, "src/main/js/section-to-sidebar-items.js") ], "section-to-tabs": [path.join(__dirname, "src/main/js/section-to-tabs.js")], "components/row-selection-controller": [ - path.join(__dirname, "src/main/js/components/row-selection-controller"), + path.join(__dirname, "src/main/js/components/row-selection-controller") ], "filter-build-history": [ - path.join(__dirname, "src/main/js/filter-build-history.js"), + path.join(__dirname, "src/main/js/filter-build-history.js") ], "simple-page": [path.join(__dirname, "src/main/scss/simple-page.scss")], - styles: [path.join(__dirname, "src/main/scss/styles.scss")], + styles: [path.join(__dirname, "src/main/scss/styles.scss")] }, output: { - path: path.join(__dirname, "src/main/webapp/jsbundles"), + path: path.join(__dirname, "src/main/webapp/jsbundles") }, devtool: argv.mode === "production" @@ -61,11 +61,11 @@ module.exports = (env, argv) => ({ plugins: [ new RemoveEmptyScriptsPlugin({}), new MiniCSSExtractPlugin({ - filename: "[name].css", + filename: "[name].css" }), // Clean all assets within the specified output. // It will not clean copied fonts - new CleanPlugin(), + new CleanPlugin() ], module: { rules: [ @@ -76,8 +76,8 @@ module.exports = (env, argv) => ({ { loader: MiniCSSExtractPlugin.loader, options: { - esModule: false, - }, + esModule: false + } }, { loader: "css-loader", @@ -88,30 +88,30 @@ module.exports = (env, argv) => ({ url: { filter: (url, resourcePath) => { return !resourcePath.includes("styles.scss"); - }, - }, - }, + } + } + } }, { loader: "postcss-loader", options: { - sourceMap: true, - }, + sourceMap: true + } }, { loader: "sass-loader", options: { - sourceMap: true, - }, - }, - ], + sourceMap: true + } + } + ] }, { test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/, type: "asset/resource", generator: { - filename: "fonts/[name].[ext]", - }, + filename: "fonts/[name].[ext]" + } }, { test: /\.hbs$/, @@ -131,17 +131,17 @@ module.exports = (env, argv) => ({ "inSelectedPlugins", "dependencyCount", "eachDependency", - "ifVisibleDependency", - ], - }, - }, + "ifVisibleDependency" + ] + } + } }, { test: /\.js$/, exclude: /node_modules/, - loader: "babel-loader", - }, - ], + loader: "babel-loader" + } + ] }, optimization: { splitChunks: { @@ -150,9 +150,9 @@ module.exports = (env, argv) => ({ commons: { test: /[\\/]node_modules[\\/]/, name: "vendors", - chunks: "all", - }, - }, + chunks: "all" + } + } }, minimizer: [ new CssMinimizerPlugin({ @@ -160,18 +160,18 @@ module.exports = (env, argv) => ({ preset: [ "default", { - svgo: { exclude: true }, - }, - ], - }, - }), - ], + svgo: { exclude: true } + } + ] + } + }) + ] }, resolve: { alias: { "@": path.resolve(__dirname, "src/main/js"), // Needed to be able to register helpers at runtime - handlebars: "handlebars/runtime", - }, - }, + handlebars: "handlebars/runtime" + } + } }); From 879469283382a9df01b9a583432adb16db0ee105 Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Mon, 10 Jul 2023 10:39:16 +0200 Subject: [PATCH 3/6] Add trailing commas --- .prettierrc.json | 2 +- .../hudson/PluginManager/_installed.js | 6 +- .../resources/hudson/PluginManager/_table.js | 18 +-- .../console/ExpandableDetailsNote/script.js | 2 +- .../ReverseProxySetupMonitor/resources.js | 4 +- .../build-timeline-widget.js | 16 +- .../model/Job/buildTimeTrend_resources.js | 10 +- .../hudson/model/LoadStatistics/resources.js | 2 +- .../model/UpdateCenter/_download-failure.js | 2 +- .../model/UpdateCenter/update-center.js | 4 +- .../hudson/views/BuildButtonColumn/icon.js | 4 +- .../URICheckEncodingMonitor/adjunct.js | 4 +- .../formelementpath/form-element-path.js | 2 +- .../setInitialRootUrlFieldValue.js | 2 +- .../resources.js | 12 +- .../security/ApiTokenProperty/resources.js | 18 +-- .../resources.js | 8 +- .../seed/UserSeedProperty/resources.js | 2 +- .../resources/lib/form/advanced/advanced.js | 8 +- .../main/resources/lib/form/apply/apply.js | 4 +- .../resources/lib/form/combobox/combobox.js | 4 +- .../expandableTextbox/expandableTextbox.js | 2 +- .../filter-menu-button/filter-menu-button.js | 6 +- .../lib/form/hetero-list/hetero-list.js | 12 +- .../resources/lib/form/password/password.js | 6 +- .../lib/form/radioBlock/radioBlock.js | 4 +- .../lib/form/repeatable/repeatable.js | 22 +-- .../main/resources/lib/form/select/select.js | 8 +- .../resources/lib/form/textarea/textarea.js | 6 +- .../lib/form/validateButton/adjunct.js | 2 +- .../resources/lib/hudson/build-caption.js | 2 +- .../resources/lib/hudson/progressive-text.js | 6 +- .../resources/lib/hudson/property-table.js | 2 +- .../resources/lib/hudson/widget-refresh.js | 2 +- .../lib/layout/confirmationLink/adjunct.js | 2 +- .../lib/layout/copyButton/copyButton.js | 4 +- .../progressiveRendering.js | 10 +- war/.eslintrc.js | 10 +- war/.stylelintrc.js | 14 +- war/postcss.config.js | 8 +- war/src/main/js/add-item.js | 4 +- war/src/main/js/api/pluginManager.js | 40 ++--- war/src/main/js/api/securityConfig.js | 12 +- .../components/dropdowns/inpage-jumplist.js | 4 +- .../main/js/components/dropdowns/jumplists.js | 18 +-- .../components/dropdowns/overflow-button.js | 2 +- .../main/js/components/dropdowns/templates.js | 14 +- war/src/main/js/components/dropdowns/utils.js | 18 +-- war/src/main/js/components/modals/index.js | 6 +- .../main/js/components/notifications/index.js | 10 +- .../row-selection-controller/index.js | 16 +- .../main/js/components/search-bar/index.js | 18 +-- war/src/main/js/components/tooltips/index.js | 22 +-- war/src/main/js/filter-build-history.js | 22 +-- war/src/main/js/pages/dashboard/index.js | 4 +- war/src/main/js/pages/manage-jenkins/index.js | 4 +- war/src/main/js/pages/register/index.js | 4 +- war/src/main/js/plugin-manager-ui.js | 8 +- war/src/main/js/pluginSetupWizardGui.js | 118 +++++++------- war/src/main/js/section-to-sidebar-items.js | 4 +- war/src/main/js/sortable-drag-drop.js | 2 +- war/src/main/js/util/jenkins.js | 20 +-- war/src/main/js/util/jenkinsLocalStorage.js | 2 +- war/src/main/js/util/keyboard.js | 2 +- war/src/main/js/util/localStorage.js | 4 +- war/src/main/js/util/page.js | 2 +- war/src/main/scss/abstracts/theme.scss | 4 +- war/src/main/webapp/scripts/behavior.js | 8 +- war/src/main/webapp/scripts/combobox.js | 2 +- .../main/webapp/scripts/hudson-behavior.js | 150 +++++++++--------- war/src/main/webapp/scripts/loading.js | 2 +- war/src/main/webapp/scripts/sortable.js | 36 ++--- war/webpack.config.js | 94 +++++------ 73 files changed, 469 insertions(+), 469 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index ae90e224ba95..2b25a30c5fd8 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,5 +1,5 @@ { "endOfLine": "auto", "htmlWhitespaceSensitivity": "ignore", - "trailingComma": "none" + "trailingComma": "all" } diff --git a/core/src/main/resources/hudson/PluginManager/_installed.js b/core/src/main/resources/hudson/PluginManager/_installed.js index b1d60737df4b..e3712b850818 100644 --- a/core/src/main/resources/hudson/PluginManager/_installed.js +++ b/core/src/main/resources/hudson/PluginManager/_installed.js @@ -21,8 +21,8 @@ (btn.checked ? "Enabled" : "Disabled"), { method: "post", - headers: crumb.wrap({}) - } + headers: crumb.wrap({}), + }, ).then((rsp) => { if (!rsp.ok) { rsp.text().then((responseText) => { @@ -38,7 +38,7 @@ let e = Array.from( document .getElementById("plugins") - .querySelectorAll("input[type='checkbox']") + .querySelectorAll("input[type='checkbox']"), ).find(function (e) { return String(e.checked) !== e.getAttribute("original"); }); diff --git a/core/src/main/resources/hudson/PluginManager/_table.js b/core/src/main/resources/hudson/PluginManager/_table.js index 03bd447a22c6..5329cf32906b 100644 --- a/core/src/main/resources/hudson/PluginManager/_table.js +++ b/core/src/main/resources/hudson/PluginManager/_table.js @@ -41,7 +41,7 @@ Behaviour.specify("#filter-box", "_table", 0, function (e) { } } var instructions = document.getElementById( - "hidden-by-default-instructions" + "hidden-by-default-instructions", ); if (instructions) { instructions.style.display = anyVisible ? "none" : ""; @@ -53,7 +53,7 @@ Behaviour.specify("#filter-box", "_table", 0, function (e) { (function () { var instructionsTd = document.getElementById( - "hidden-by-default-instructions-td" + "hidden-by-default-instructions-td", ); if (instructionsTd) { // only on Available tab @@ -371,25 +371,25 @@ Behaviour.specify("#filter-box", "_table", 0, function (e) { pluginTR.jenkinsPluginMetadata = { enableInput: enableInput, dependenciesDiv: dependenciesDiv, - dependentsDiv: dependentsDiv + dependentsDiv: dependentsDiv, }; if (dependenciesDiv) { pluginTR.jenkinsPluginMetadata.dependencies = selectAll( "span", - dependenciesDiv + dependenciesDiv, ); pluginTR.jenkinsPluginMetadata.dependencyIds = processSpanSet( - pluginTR.jenkinsPluginMetadata.dependencies + pluginTR.jenkinsPluginMetadata.dependencies, ); } if (dependentsDiv) { pluginTR.jenkinsPluginMetadata.dependents = selectAll( "span", - dependentsDiv + dependentsDiv, ); pluginTR.jenkinsPluginMetadata.dependentIds = processSpanSet( - pluginTR.jenkinsPluginMetadata.dependents + pluginTR.jenkinsPluginMetadata.dependents, ); } @@ -467,7 +467,7 @@ Behaviour.specify("#filter-box", "_table", 0, function (e) { window.addEventListener("load", function () { const compatibleCheckbox = document.querySelector( - "[data-select='compatible']" + "[data-select='compatible']", ); if (compatibleCheckbox) { compatibleCheckbox.addEventListener("click", () => { @@ -487,7 +487,7 @@ window.addEventListener("load", function () { if (updateCenterError) { notificationBar.show( updateCenterError.content.textContent, - notificationBar.ERROR + notificationBar.ERROR, ); } }); diff --git a/core/src/main/resources/hudson/console/ExpandableDetailsNote/script.js b/core/src/main/resources/hudson/console/ExpandableDetailsNote/script.js index edccad221f51..bd71b5fec807 100644 --- a/core/src/main/resources/hudson/console/ExpandableDetailsNote/script.js +++ b/core/src/main/resources/hudson/console/ExpandableDetailsNote/script.js @@ -9,6 +9,6 @@ detail.style.display = detail.style.display == "block" ? "none" : "block"; }); - } + }, ); })(); diff --git a/core/src/main/resources/hudson/diagnosis/ReverseProxySetupMonitor/resources.js b/core/src/main/resources/hudson/diagnosis/ReverseProxySetupMonitor/resources.js index 7b1170460cc3..2382b20894c6 100644 --- a/core/src/main/resources/hudson/diagnosis/ReverseProxySetupMonitor/resources.js +++ b/core/src/main/resources/hudson/diagnosis/ReverseProxySetupMonitor/resources.js @@ -2,7 +2,7 @@ var redirectForm = document.getElementById("redirect-error"); if (!redirectForm) { console.warn( - 'This script expects to have an element with id="redirect-error" to be working.' + 'This script expects to have an element with id="redirect-error" to be working.', ); return; } @@ -16,7 +16,7 @@ fetch(urlToTest, { cache: "no-cache", headers: crumb.wrap({}), - body + body, }) .then((rsp) => callback(rsp)) // normally you don't need a catch function with fetch because HTTP errors doesn't reject a promise, diff --git a/core/src/main/resources/hudson/model/BuildTimelineWidget/build-timeline-widget.js b/core/src/main/resources/hudson/model/BuildTimelineWidget/build-timeline-widget.js index 0cb05360ce73..941f5cc8d5bc 100644 --- a/core/src/main/resources/hudson/model/BuildTimelineWidget/build-timeline-widget.js +++ b/core/src/main/resources/hudson/model/BuildTimelineWidget/build-timeline-widget.js @@ -15,12 +15,12 @@ function getData(eventSource1, current, min, max) { "timeline/data/?" + new URLSearchParams({ min: current * interval, - max: (current + 1) * interval + max: (current + 1) * interval, }), { method: "POST", - headers: crumb.wrap({}) - } + headers: crumb.wrap({}), + }, ).then((t) => { if (t.ok) { t.json() @@ -62,7 +62,7 @@ function doLoad() { eventSource: eventSource1, timeZone: tz, theme: theme1, - layout: "overview" // original, overview, detailed + layout: "overview", // original, overview, detailed }), // the main area Timeline.createBandInfo({ @@ -71,8 +71,8 @@ function doLoad() { timeZone: tz, theme: theme1, intervalUnit: Timeline.DateTime.HOUR, - intervalPixels: 200 - }) + intervalPixels: 200, + }), ]; bandInfos[0].highlight = true; bandInfos[0].syncWith = 1; @@ -118,7 +118,7 @@ if (window.addEventListener) { (function () { var resize = new YAHOO.util.Resize("resizeContainer", { handles: "b", - minHeight: 300 // this should be the same as the height of the container div, + minHeight: 300, // this should be the same as the height of the container div, // to fix an issue when it's resized to be smaller than the original height }); @@ -129,6 +129,6 @@ if (window.addEventListener) { tl.layout(); }, null, - true + true, ); })(); diff --git a/core/src/main/resources/hudson/model/Job/buildTimeTrend_resources.js b/core/src/main/resources/hudson/model/Job/buildTimeTrend_resources.js index 4d78549beab7..7fcfa705ff73 100644 --- a/core/src/main/resources/hudson/model/Job/buildTimeTrend_resources.js +++ b/core/src/main/resources/hudson/model/Job/buildTimeTrend_resources.js @@ -109,20 +109,20 @@ function generateSVGIcon(iconName, iconSizeClass) { "href", imagesURL + "/build-status/build-status-sprite.svg#build-status-" + - (isInProgress ? "in-progress" : "static") + (isInProgress ? "in-progress" : "static"), ); svg1.appendChild(use1); const svg2 = document.createElementNS("http://www.w3.org/2000/svg", "svg"); svg2.setAttribute( "class", - "svg-icon icon-" + iconName + " " + (iconSizeClass || "icon-sm") + "svg-icon icon-" + iconName + " " + (iconSizeClass || "icon-sm"), ); svg2.setAttribute("viewBox", "0 0 24 24"); const use2 = document.createElementNS("http://www.w3.org/2000/svg", "use"); use2.setAttribute( "href", - imagesURL + "/build-status/build-status-sprite.svg#" + buildStatus + imagesURL + "/build-status/build-status-sprite.svg#" + buildStatus, ); svg2.appendChild(use2); @@ -174,7 +174,7 @@ window.displayBuilds = function (data) { "jenkins-table__link", "jenkins-table__badge", "model-link", - "inside" + "inside", ); a2.href = rootUrl + "/" + e.url; a2.textContent = e.displayName; @@ -190,7 +190,7 @@ window.displayBuilds = function (data) { "onclick", 'javascript:tl.getBand(0).scrollToCenter(Timeline.DateTime.parseGregorianDateTime("' + e.timestampString3 + - '"))' + '"))', ); button.textContent = e.timestampString; td3.appendChild(button); diff --git a/core/src/main/resources/hudson/model/LoadStatistics/resources.js b/core/src/main/resources/hudson/model/LoadStatistics/resources.js index e53560a45245..2ffbf37ed892 100644 --- a/core/src/main/resources/hudson/model/LoadStatistics/resources.js +++ b/core/src/main/resources/hudson/model/LoadStatistics/resources.js @@ -29,7 +29,7 @@ if (graphLocation) { const type = timespanSelect.value; const parentSelector = graphLocation.getAttribute( - "data-graph-parent-selector" + "data-graph-parent-selector", ); const baseUrl = graphLocation.getAttribute("data-graph-base-url"); const graphAlt = graphLocation.getAttribute("data-graph-alt"); diff --git a/core/src/main/resources/hudson/model/UpdateCenter/_download-failure.js b/core/src/main/resources/hudson/model/UpdateCenter/_download-failure.js index c7876c0c2b52..2040aab6684e 100644 --- a/core/src/main/resources/hudson/model/UpdateCenter/_download-failure.js +++ b/core/src/main/resources/hudson/model/UpdateCenter/_download-failure.js @@ -12,5 +12,5 @@ Behaviour.specify( n.style.display = "block"; this.style.display = "none"; }; - } + }, ); diff --git a/core/src/main/resources/hudson/model/UpdateCenter/update-center.js b/core/src/main/resources/hudson/model/UpdateCenter/update-center.js index 13005a65247f..aa426cb9adfa 100644 --- a/core/src/main/resources/hudson/model/UpdateCenter/update-center.js +++ b/core/src/main/resources/hudson/model/UpdateCenter/update-center.js @@ -9,14 +9,14 @@ Behaviour.specify( crumb.appendToForm(form); form.submit(); }); - } + }, ); function refresh() { window.setTimeout(function () { fetch("./body", { method: "post", - headers: crumb.wrap({}) + headers: crumb.wrap({}), }).then((rsp) => { if (rsp.ok) { rsp.text().then((responseText) => { diff --git a/core/src/main/resources/hudson/views/BuildButtonColumn/icon.js b/core/src/main/resources/hudson/views/BuildButtonColumn/icon.js index a53833eda350..80977933eaaa 100644 --- a/core/src/main/resources/hudson/views/BuildButtonColumn/icon.js +++ b/core/src/main/resources/hudson/views/BuildButtonColumn/icon.js @@ -11,10 +11,10 @@ Behaviour.specify( icon.onclick = function () { fetch(url, { method: "post", - headers: crumb.wrap({}) + headers: crumb.wrap({}), }); hoverNotification(message, this, -100); return false; }; - } + }, ); diff --git a/core/src/main/resources/jenkins/diagnostics/URICheckEncodingMonitor/adjunct.js b/core/src/main/resources/jenkins/diagnostics/URICheckEncodingMonitor/adjunct.js index 05ff9efc19fa..fda1897c03b1 100644 --- a/core/src/main/resources/jenkins/diagnostics/URICheckEncodingMonitor/adjunct.js +++ b/core/src/main/resources/jenkins/diagnostics/URICheckEncodingMonitor/adjunct.js @@ -8,10 +8,10 @@ Behaviour.specify( fetch(url + "?" + params).then((rsp) => { rsp.text().then((responseText) => { var message = document.getElementById( - "URICheckEncodingMonitor-message" + "URICheckEncodingMonitor-message", ); message.innerHTML = responseText; }); }); - } + }, ); diff --git a/core/src/main/resources/jenkins/formelementpath/form-element-path.js b/core/src/main/resources/jenkins/formelementpath/form-element-path.js index 4b7cc9bb2dc4..bf8d7cab62d6 100644 --- a/core/src/main/resources/jenkins/formelementpath/form-element-path.js +++ b/core/src/main/resources/jenkins/formelementpath/form-element-path.js @@ -83,7 +83,7 @@ document.addEventListener("DOMContentLoaded", function () { "hetero-list-add", "advanced-button", "apply-button", - "validate-button" + "validate-button", ].forEach(function (clazz) { if (element.classList.contains(clazz)) { name = clazz; diff --git a/core/src/main/resources/jenkins/install/SetupWizard/setInitialRootUrlFieldValue.js b/core/src/main/resources/jenkins/install/SetupWizard/setInitialRootUrlFieldValue.js index 64808b501098..40d800cea6fc 100644 --- a/core/src/main/resources/jenkins/install/SetupWizard/setInitialRootUrlFieldValue.js +++ b/core/src/main/resources/jenkins/install/SetupWizard/setInitialRootUrlFieldValue.js @@ -13,7 +13,7 @@ rootUrlField.onkeydown = function (event) { var iframeRelativeUrl = "setupWizard/setupWizardConfigureInstance"; var rootUrl = iframeUrl.substr( 0, - iframeUrl.length - iframeRelativeUrl.length + iframeUrl.length - iframeRelativeUrl.length, ); // to keep only the root url rootUrlField.value = rootUrl; diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js index c6307720e653..7278b6021ddf 100644 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js +++ b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js @@ -70,7 +70,7 @@ return { close: close, - startListeners: startListeners + startListeners: startListeners, }; } @@ -86,19 +86,19 @@ var normalMonitors = initializeAmMonitor( document.getElementById("visible-am-container"), { - closeAll: closeAll - } + closeAll: closeAll, + }, ); var securityMonitors = initializeAmMonitor( document.getElementById("visible-sec-am-container"), { - closeAll: closeAll - } + closeAll: closeAll, + }, ); monitorWidgets = [normalMonitors, securityMonitors].filter( function (widget) { return widget !== null; - } + }, ); monitorWidgets.forEach(function (widget) { diff --git a/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js b/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js index 72492c1f56b0..47e4d6c1bed1 100644 --- a/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js +++ b/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js @@ -30,7 +30,7 @@ Behaviour.specify( event.preventDefault(); revokeToken(element); }); - } + }, ); Behaviour.specify( @@ -41,7 +41,7 @@ Behaviour.specify( element.addEventListener("click", function () { saveApiToken(element); }); - } + }, ); function revokeToken(anchorRevoke) { @@ -57,13 +57,13 @@ function revokeToken(anchorRevoke) { fetch(targetUrl, { body: new URLSearchParams({ tokenUuid: tokenUuid }), method: "post", - headers: crumb.wrap({}) + headers: crumb.wrap({}), }).then((rsp) => { if (rsp.ok) { if (repeatedChunk.querySelectorAll(".legacy-token").length > 0) { // we are revoking the legacy token var messageIfLegacyRevoked = anchorRevoke.getAttribute( - "data-message-if-legacy-revoked" + "data-message-if-legacy-revoked", ); var legacyInput = document.getElementById("apiToken"); @@ -91,7 +91,7 @@ function saveApiToken(button) { fetch(targetUrl, { body: new URLSearchParams({ newTokenName: tokenName }), method: "post", - headers: crumb.wrap({}) + headers: crumb.wrap({}), }).then((rsp) => { if (rsp.ok) { rsp.json().then((json) => { @@ -115,7 +115,7 @@ function saveApiToken(button) { // show the copy button var tokenCopyButton = repeatedChunk.querySelector( - ".jenkins-copy-button" + ".jenkins-copy-button", ); tokenCopyButton.setAttribute("text", tokenValue); tokenCopyButton.classList.remove("jenkins-hidden"); @@ -125,7 +125,7 @@ function saveApiToken(button) { uuidInput.value = tokenUuid; var warningMessage = repeatedChunk.querySelector( - ".display-after-generation" + ".display-after-generation", ); warningMessage.classList.add("visible"); @@ -133,7 +133,7 @@ function saveApiToken(button) { button.remove(); var revokeButton = repeatedChunk.querySelector( - ".api-token-property-token-revoke" + ".api-token-property-token-revoke", ); revokeButton.classList.remove("hidden-button"); @@ -154,7 +154,7 @@ function adjustTokenEmptyListMessage(tokenList) { // number of token that are already existing or freshly created var numOfToken = tokenList.querySelectorAll( - ".token-list-existing-item, .token-list-fresh-item" + ".token-list-existing-item, .token-list-fresh-item", ).length; if (numOfToken >= 1) { if (!emptyListMessage.classList.contains("hidden-message")) { diff --git a/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js b/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js index adefbc710cee..fd43b0655a10 100644 --- a/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js +++ b/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js @@ -33,7 +33,7 @@ function selectFresh(anchor) { var parent = anchor.closest(".legacy-token-usage"); var allCheckBoxes = parent.querySelectorAll(".token-to-revoke"); var concernedCheckBoxes = parent.querySelectorAll( - ".token-to-revoke.fresh-token" + ".token-to-revoke.fresh-token", ); checkTheDesiredOne(allCheckBoxes, concernedCheckBoxes); @@ -43,7 +43,7 @@ function selectRecent(anchor) { var parent = anchor.closest(".legacy-token-usage"); var allCheckBoxes = parent.querySelectorAll(".token-to-revoke"); var concernedCheckBoxes = parent.querySelectorAll( - ".token-to-revoke.recent-token" + ".token-to-revoke.recent-token", ); checkTheDesiredOne(allCheckBoxes, concernedCheckBoxes); @@ -92,7 +92,7 @@ function confirmAndRevokeAllSelected(button) { var confirmMessageTemplate = button.getAttribute("data-confirm-template"); var confirmMessage = confirmMessageTemplate.replace( "%num%", - allCheckedCheckBoxes.length + allCheckedCheckBoxes.length, ); if (confirm(confirmMessage)) { var url = button.getAttribute("data-url"); @@ -111,7 +111,7 @@ function confirmAndRevokeAllSelected(button) { body: Object.toJSON ? Object.toJSON({ values: selectedValues }) : JSON.stringify({ values: selectedValues }), - headers: crumb.wrap({ "Content-Type": "application/json" }) + headers: crumb.wrap({ "Content-Type": "application/json" }), }).then(() => window.location.reload()); } } diff --git a/core/src/main/resources/jenkins/security/seed/UserSeedProperty/resources.js b/core/src/main/resources/jenkins/security/seed/UserSeedProperty/resources.js index 48ac8cd0c823..fa0b80d60bde 100644 --- a/core/src/main/resources/jenkins/security/seed/UserSeedProperty/resources.js +++ b/core/src/main/resources/jenkins/security/seed/UserSeedProperty/resources.js @@ -35,7 +35,7 @@ function resetSeed(button) { if (confirm(confirmMessage)) { fetch(targetUrl, { method: "post", - headers: crumb.wrap({}) + headers: crumb.wrap({}), }).then((rsp) => { if (rsp.ok) { if (redirectAfterClick) { diff --git a/core/src/main/resources/lib/form/advanced/advanced.js b/core/src/main/resources/lib/form/advanced/advanced.js index e8b257c15d5c..d155f7ec7e5d 100644 --- a/core/src/main/resources/lib/form/advanced/advanced.js +++ b/core/src/main/resources/lib/form/advanced/advanced.js @@ -37,7 +37,7 @@ Behaviour.specify( } const oneOrMoreFieldsEditedNotice = parentContainer.querySelector( - ".jenkins-edited-section-label" + ".jenkins-edited-section-label", ); if (oneOrMoreFieldsEditedNotice.classList.contains("jenkins-hidden")) { @@ -63,7 +63,7 @@ Behaviour.specify( JSON.stringify(Object.fromEntries(formData)); oneOrMoreFieldsEditedNotice.classList.toggle( "jenkins-hidden", - result + result, ); }); }); @@ -83,7 +83,7 @@ Behaviour.specify( layoutUpdateCallback.call(); }); e = null; // avoid memory leak - } + }, ); Behaviour.specify( @@ -99,5 +99,5 @@ Behaviour.specify( const customizedFields = element.getAttribute("data-customized-fields"); console.log("no element " + id + " for " + customizedFields); } - } + }, ); diff --git a/core/src/main/resources/lib/form/apply/apply.js b/core/src/main/resources/lib/form/apply/apply.js index 71c83dda3131..d67d9306173d 100644 --- a/core/src/main/resources/lib/form/apply/apply.js +++ b/core/src/main/resources/lib/form/apply/apply.js @@ -12,7 +12,7 @@ Behaviour.specify( draggable: true, zindex: 4, modal: true, - visible: false + visible: false, }); responseDialog.setHeader("Error"); @@ -102,5 +102,5 @@ Behaviour.specify( f.target = "_self"; } }); - } + }, ); diff --git a/core/src/main/resources/lib/form/combobox/combobox.js b/core/src/main/resources/lib/form/combobox/combobox.js index a1ad886784c8..12a4f90085f2 100644 --- a/core/src/main/resources/lib/form/combobox/combobox.js +++ b/core/src/main/resources/lib/form/combobox/combobox.js @@ -15,14 +15,14 @@ Behaviour.specify("INPUT.combobox2", "combobox", 100, function (e) { } return candidates; }, - {} + {}, ); refillOnChange(e, function (params) { var urlSearchParams = new URLSearchParams(params); fetch(e.getAttribute("fillUrl") + "?" + urlSearchParams, { headers: crumb.wrap({}), - method: "post" + method: "post", }).then((rsp) => { if (rsp.ok) { rsp.json().then((json) => { diff --git a/core/src/main/resources/lib/form/expandableTextbox/expandableTextbox.js b/core/src/main/resources/lib/form/expandableTextbox/expandableTextbox.js index 2ed84695367c..5718de0656eb 100644 --- a/core/src/main/resources/lib/form/expandableTextbox/expandableTextbox.js +++ b/core/src/main/resources/lib/form/expandableTextbox/expandableTextbox.js @@ -48,5 +48,5 @@ Behaviour.specify( element.addEventListener("click", function () { expandTextArea(element); }); - } + }, ); diff --git a/core/src/main/resources/lib/form/filter-menu-button/filter-menu-button.js b/core/src/main/resources/lib/form/filter-menu-button/filter-menu-button.js index 2b9e5e9d54a7..142c6f1edb01 100644 --- a/core/src/main/resources/lib/form/filter-menu-button/filter-menu-button.js +++ b/core/src/main/resources/lib/form/filter-menu-button/filter-menu-button.js @@ -2,14 +2,14 @@ window.createFilterMenuButton = function ( button, menu, menuAlignment, - menuMinScrollHeight + menuMinScrollHeight, ) { var MIN_NUM_OPTIONS = 5; var menuButton = new YAHOO.widget.Button(button, { type: "menu", menu: menu, menualignment: menuAlignment, - menuminscrollheight: menuMinScrollHeight + menuminscrollheight: menuMinScrollHeight, }); var filter = _createFilterMenuButton(menuButton._menu); @@ -39,7 +39,7 @@ function _createFilterMenuButton(menu) { filterInput.setAttribute("type", "search"); filterInput.addEventListener("input", (event) => - _applyFilterKeyword(menu, event.currentTarget) + _applyFilterKeyword(menu, event.currentTarget), ); filterInput.addEventListener("keypress", (event) => { if (event.key === "Enter") { diff --git a/core/src/main/resources/lib/form/hetero-list/hetero-list.js b/core/src/main/resources/lib/form/hetero-list/hetero-list.js index 7b3a149b9f9d..a51423bf6e0b 100644 --- a/core/src/main/resources/lib/form/hetero-list/hetero-list.js +++ b/core/src/main/resources/lib/form/hetero-list/hetero-list.js @@ -44,7 +44,7 @@ Behaviour.specify( html: n.innerHTML, name: name, tooltip: tooltip, - descriptorId: descriptorId + descriptorId: descriptorId, }); } prototypes.remove(); @@ -58,7 +58,7 @@ Behaviour.specify( btn, menu, menuAlign.split("-"), - 250 + 250, ); // copy class names for (i = 0; i < btn.classList.length; i++) { @@ -148,17 +148,17 @@ Behaviour.specify( new YAHOO.util.Anim( nc, { - opacity: { to: 1 } + opacity: { to: 1 }, }, 0.2, - YAHOO.util.Easing.easeIn + YAHOO.util.Easing.easeIn, ).animate(); Behaviour.applySubtree(nc, true); ensureVisible(nc); layoutUpdateCallback.call(); }, - true + true, ); }); @@ -188,7 +188,7 @@ Behaviour.specify( } }); } - } + }, ); Behaviour.specify("DIV.dd-handle", "hetero-list", -100, function (e) { diff --git a/core/src/main/resources/lib/form/password/password.js b/core/src/main/resources/lib/form/password/password.js index 5b34ffbe7a11..4cd33dbfc6ec 100644 --- a/core/src/main/resources/lib/form/password/password.js +++ b/core/src/main/resources/lib/form/password/password.js @@ -35,12 +35,12 @@ Behaviour.specify( secretUpdateBtn.onclick = function () { e.querySelector(".hidden-password-field").setAttribute( "type", - "password" + "password", ); e.querySelector(".hidden-password-placeholder").remove(); secretUpdateBtn.remove(); }; - } + }, ); Behaviour.specify( @@ -51,5 +51,5 @@ Behaviour.specify( element.addEventListener("input", function () { element.setAttribute("type", "password"); }); - } + }, ); diff --git a/core/src/main/resources/lib/form/radioBlock/radioBlock.js b/core/src/main/resources/lib/form/radioBlock/radioBlock.js index 629f97b750eb..b504ddeb0d54 100644 --- a/core/src/main/resources/lib/form/radioBlock/radioBlock.js +++ b/core/src/main/resources/lib/form/radioBlock/radioBlock.js @@ -28,7 +28,7 @@ var radioBlockSupport = { } } layoutUpdateCallback.call(); - } + }, }; // this needs to happen before TR.row-set-end rule kicks in. @@ -87,5 +87,5 @@ Behaviour.specify( r.onclick = r.onchange = function () { g.updateButtons(); }; - } + }, ); diff --git a/core/src/main/resources/lib/form/repeatable/repeatable.js b/core/src/main/resources/lib/form/repeatable/repeatable.js index 32ce63625b76..b72ef304a037 100644 --- a/core/src/main/resources/lib/form/repeatable/repeatable.js +++ b/core/src/main/resources/lib/form/repeatable/repeatable.js @@ -63,10 +63,10 @@ var repeatableSupport = { new YAHOO.util.Anim( nc, { - opacity: { to: 1 } + opacity: { to: 1 }, }, 0.2, - YAHOO.util.Easing.easeIn + YAHOO.util.Easing.easeIn, ).animate(); Behaviour.applySubtree(nc, true); @@ -83,7 +83,7 @@ var repeatableSupport = { var addButtonElements = Array.from(this.container.children).filter( function (b) { return b.classList.contains("repeatable-add"); - } + }, ); if (addButtonElements.length == 2) { @@ -96,7 +96,7 @@ var repeatableSupport = { addButtonElements = Array.from(this.container.children).filter( function (b) { return b.classList.contains("repeatable-add"); - } + }, ); if (addButtonElements.length == 1 && this.enableTopButton) { @@ -130,10 +130,10 @@ var repeatableSupport = { n, { opacity: { to: 0 }, - height: { to: 0 } + height: { to: 0 }, }, 0.2, - YAHOO.util.Easing.easeIn + YAHOO.util.Easing.easeIn, ); a.onComplete.subscribe(function () { var p = n.parentNode; @@ -165,7 +165,7 @@ var repeatableSupport = { } } layoutUpdateCallback.call(); - } + }, }; // do the ones that extract innerHTML so that they can get their original HTML before @@ -194,7 +194,7 @@ Behaviour.specify( repeatableSupport.onAdd(button); }); button = null; // avoid memory leak - } + }, ); /** @@ -221,9 +221,9 @@ Behaviour.specify( input.parentNode.replaceChild(button, input); console.warn( "Adapted element to new markup, it should be changed to use f:repeatableDeleteButton instead in the plugin", - button + button, ); - } + }, ); Behaviour.specify( @@ -234,7 +234,7 @@ Behaviour.specify( e.addEventListener("click", function () { repeatableSupport.onDelete(e); }); - } + }, ); // radio buttons in repeatable content diff --git a/core/src/main/resources/lib/form/select/select.js b/core/src/main/resources/lib/form/select/select.js index d2eaf5d4a302..3aa7e3ecc7cf 100644 --- a/core/src/main/resources/lib/form/select/select.js +++ b/core/src/main/resources/lib/form/select/select.js @@ -18,7 +18,7 @@ function updateListBox(listBox, url, config) { if (!settingMain) { console.warn( "Couldn't find the expected validation element (.validation-error-area) for element", - listBox.parentNode + listBox.parentNode, ); return; } @@ -100,9 +100,9 @@ function updateListBox(listBox, url, config) { fetch(url, { method: "post", headers: crumb.wrap({ - "Content-Type": "application/x-www-form-urlencoded" + "Content-Type": "application/x-www-form-urlencoded", }), - body: objectToUrlFormEncoded(config.parameters) + body: objectToUrlFormEncoded(config.parameters), }).then((response) => { if (response.ok) { config.onSuccess(response); @@ -154,7 +154,7 @@ Behaviour.specify("SELECT.select", "select", 1000, function (e) { if (hasChanged(e, value)) { fireEvent(e, "change"); } - } + }, }); }); }); diff --git a/core/src/main/resources/lib/form/textarea/textarea.js b/core/src/main/resources/lib/form/textarea/textarea.js index b9f4994dc8da..a31ed7194672 100644 --- a/core/src/main/resources/lib/form/textarea/textarea.js +++ b/core/src/main/resources/lib/form/textarea/textarea.js @@ -69,8 +69,8 @@ Behaviour.specify( method: "post", headers: crumb.wrap({}), body: new URLSearchParams({ - text: text - }) + text: text, + }), }).then((rsp) => { rsp.text().then((responseText) => { if (rsp.ok) { @@ -87,5 +87,5 @@ Behaviour.specify( hidePreview.style.display = "none"; previewDiv.style.display = "none"; }; - } + }, ); diff --git a/core/src/main/resources/lib/form/validateButton/adjunct.js b/core/src/main/resources/lib/form/validateButton/adjunct.js index 9e526dc1cf46..da2a9bf0b55f 100644 --- a/core/src/main/resources/lib/form/validateButton/adjunct.js +++ b/core/src/main/resources/lib/form/validateButton/adjunct.js @@ -6,5 +6,5 @@ Behaviour.specify( element.onclick = function () { safeValidateButton(this); }; - } + }, ); diff --git a/core/src/main/resources/lib/hudson/build-caption.js b/core/src/main/resources/lib/hudson/build-caption.js index c3b802336205..b77e5128a60c 100644 --- a/core/src/main/resources/lib/hudson/build-caption.js +++ b/core/src/main/resources/lib/hudson/build-caption.js @@ -6,7 +6,7 @@ setTimeout(updateBuildCaptionIcon, 5000); } else { var progressBar = document.querySelector( - ".build-caption-progress-container" + ".build-caption-progress-container", ); if (progressBar) { progressBar.style.display = "none"; diff --git a/core/src/main/resources/lib/hudson/progressive-text.js b/core/src/main/resources/lib/hudson/progressive-text.js index 90a90339ad92..d0065b8020bb 100644 --- a/core/src/main/resources/lib/hudson/progressive-text.js +++ b/core/src/main/resources/lib/hudson/progressive-text.js @@ -27,8 +27,8 @@ Behaviour.specify( method: "post", headers, body: new URLSearchParams({ - start: e.fetchedBytes - }) + start: e.fetchedBytes, + }), }).then((rsp) => { if (rsp.status >= 500 || rsp.status === 0) { setTimeout(function () { @@ -75,5 +75,5 @@ Behaviour.specify( document.getElementById(idref).fetchedBytes = startOffset !== "" ? Number(startOffset) : 0; fetchNext(document.getElementById(idref), href, onFinishEvent); - } + }, ); diff --git a/core/src/main/resources/lib/hudson/property-table.js b/core/src/main/resources/lib/hudson/property-table.js index 97d17794068a..b673617fbe59 100644 --- a/core/src/main/resources/lib/hudson/property-table.js +++ b/core/src/main/resources/lib/hudson/property-table.js @@ -17,7 +17,7 @@ if (selection === null || window.getSelection().type !== "Range") { elem.parentElement.classList.add("jenkins-hidden"); elem.parentElement.previousSibling.classList.remove( - "jenkins-hidden" + "jenkins-hidden", ); } }); diff --git a/core/src/main/resources/lib/hudson/widget-refresh.js b/core/src/main/resources/lib/hudson/widget-refresh.js index 2211c93c5412..8d406488a032 100644 --- a/core/src/main/resources/lib/hudson/widget-refresh.js +++ b/core/src/main/resources/lib/hudson/widget-refresh.js @@ -6,5 +6,5 @@ Behaviour.specify( var id = e.getAttribute("data-id"); var url = e.getAttribute("data-url"); refreshPart(id, url); - } + }, ); diff --git a/core/src/main/resources/lib/layout/confirmationLink/adjunct.js b/core/src/main/resources/lib/layout/confirmationLink/adjunct.js index 92603448f898..7df25956479a 100644 --- a/core/src/main/resources/lib/layout/confirmationLink/adjunct.js +++ b/core/src/main/resources/lib/layout/confirmationLink/adjunct.js @@ -19,5 +19,5 @@ Behaviour.specify( } return false; }; - } + }, ); diff --git a/core/src/main/resources/lib/layout/copyButton/copyButton.js b/core/src/main/resources/lib/layout/copyButton/copyButton.js index 0713405f019a..334d18e54179 100644 --- a/core/src/main/resources/lib/layout/copyButton/copyButton.js +++ b/core/src/main/resources/lib/layout/copyButton/copyButton.js @@ -32,9 +32,9 @@ Behaviour.specify( } else { hoverNotification( "Copy is only supported with a secure (HTTPS) connection", - copyButton + copyButton, ); } }); - } + }, ); diff --git a/core/src/main/resources/lib/layout/progressiveRendering/progressiveRendering.js b/core/src/main/resources/lib/layout/progressiveRendering/progressiveRendering.js index b55c49b6bbad..3d674da73218 100644 --- a/core/src/main/resources/lib/layout/progressiveRendering/progressiveRendering.js +++ b/core/src/main/resources/lib/layout/progressiveRendering/progressiveRendering.js @@ -34,19 +34,19 @@ function progressivelyRender(handler, callback, statusId) { "Aborted."; } else if (r.status == "error") { document.querySelector( - "#" + statusId + " .progress-bar-done" + "#" + statusId + " .progress-bar-done", ).style.width = "100%"; document.querySelector( - "#" + statusId + " .progress-bar-left" + "#" + statusId + " .progress-bar-left", ).style.width = "0%"; document.getElementById(statusId).className = "progress-bar red"; } else { callback(r.data); document.querySelector( - "#" + statusId + " .progress-bar-done" + "#" + statusId + " .progress-bar-done", ).style.width = 100 * r.status + "%"; document.querySelector( - "#" + statusId + " .progress-bar-left" + "#" + statusId + " .progress-bar-left", ).style.width = 100 - 100 * r.status + "%"; checkNewsLater(500); } @@ -68,7 +68,7 @@ document.addEventListener("DOMContentLoaded", function () { progressivelyRender( window.proxy, window[holder.getAttribute("data-callback")], - holder.getAttribute("data-id") + holder.getAttribute("data-id"), ); }); }); diff --git a/war/.eslintrc.js b/war/.eslintrc.js index a683c60a06f5..15da526346cb 100644 --- a/war/.eslintrc.js +++ b/war/.eslintrc.js @@ -2,16 +2,16 @@ module.exports = { env: { browser: true, - es2022: true + es2022: true, }, // Uses eslint default ruleset extends: ["eslint:recommended", "prettier"], parserOptions: { sourceType: "module", - ecmaVersion: 2022 + ecmaVersion: 2022, }, rules: { - curly: "error" + curly: "error", }, globals: { $: "readonly", @@ -71,6 +71,6 @@ module.exports = { Utilities: "readonly", UTILITIES_VERSION: "writeable", YAHOO: "readonly", - YUI: "readonly" - } + YUI: "readonly", + }, }; diff --git a/war/.stylelintrc.js b/war/.stylelintrc.js index 56bd7ef72c26..cfea225e3035 100644 --- a/war/.stylelintrc.js +++ b/war/.stylelintrc.js @@ -10,8 +10,8 @@ module.exports = { "value-keyword-case": [ "lower", { - camelCaseSvgKeywords: true - } + camelCaseSvgKeywords: true, + }, ], "property-no-vendor-prefix": null, "at-rule-no-unknown": [ @@ -24,15 +24,15 @@ module.exports = { "include", "mixin", "for", - "use" - ] - } + "use", + ], + }, ], "color-function-notation": "legacy", "alpha-value-notation": "number", "number-max-precision": 5, "function-no-unknown": null, "no-duplicate-selectors": null, - "hue-degree-notation": "number" - } + "hue-degree-notation": "number", + }, }; diff --git a/war/postcss.config.js b/war/postcss.config.js index 3e8dc44ceda3..2886b7822f36 100644 --- a/war/postcss.config.js +++ b/war/postcss.config.js @@ -5,9 +5,9 @@ module.exports = { "postcss-preset-env": { stage: false, features: { - "media-query-ranges": true + "media-query-ranges": true, }, - preserve: false - } - } + preserve: false, + }, + }, }; diff --git a/war/src/main/js/add-item.js b/war/src/main/js/add-item.js index 063629c43dfa..99b251d690c3 100644 --- a/war/src/main/js/add-item.js +++ b/war/src/main/js/add-item.js @@ -252,7 +252,7 @@ $.when(getItems()).done(function (data) { "c-335061", "c-D33833", "c-6D6B6D", - "c-6699CC" + "c-6699CC", ]; var desc = elem.description || ""; var name = elem.displayName; @@ -300,7 +300,7 @@ $.when(getItems()).done(function (data) { activateValidationMessage( "#itemname-invalid", ".add-item-name", - message + message, ); } else { cleanValidationMessages(".add-item-name"); diff --git a/war/src/main/js/api/pluginManager.js b/war/src/main/js/api/pluginManager.js index 37336eec4e62..2727e99cf7a4 100644 --- a/war/src/main/js/api/pluginManager.js +++ b/war/src/main/js/api/pluginManager.js @@ -23,8 +23,8 @@ pluginManager.initialPluginList = function (handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); - } - } + }, + }, ); }; @@ -111,8 +111,8 @@ pluginManager.installPlugins = function (plugins, handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); - } - } + }, + }, ); }; @@ -140,8 +140,8 @@ pluginManager.installStatus = function (handler, correlationId) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); - } - } + }, + }, ); }; @@ -167,8 +167,8 @@ pluginManager.availablePlugins = function (handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); - } - } + }, + }, ); }; @@ -187,8 +187,8 @@ pluginManager.availablePluginsSearch = function (query, limit, handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); - } - } + }, + }, ); }; @@ -216,8 +216,8 @@ pluginManager.incompleteInstallStatus = function (handler, correlationId) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); - } - } + }, + }, ); }; @@ -235,8 +235,8 @@ pluginManager.completeInstall = function (handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, message: errorThrown }); - } - } + }, + }, ); }; @@ -253,8 +253,8 @@ pluginManager.getRestartStatus = function (handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, message: errorThrown }); - } - } + }, + }, ); }; @@ -272,8 +272,8 @@ pluginManager.installPluginsDone = function (handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, message: errorThrown }); - } - } + }, + }, ); }; @@ -291,8 +291,8 @@ pluginManager.restartJenkins = function (handler) { timeout: pluginManagerErrorTimeoutMillis, error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, message: errorThrown }); - } - } + }, + }, ); }; diff --git a/war/src/main/js/api/securityConfig.js b/war/src/main/js/api/securityConfig.js index 78612f7d7562..576b0e05ff50 100644 --- a/war/src/main/js/api/securityConfig.js +++ b/war/src/main/js/api/securityConfig.js @@ -20,8 +20,8 @@ function saveFirstUser($form, success, error) { success(response); }, { - error: error - } + error: error, + }, ); } @@ -37,8 +37,8 @@ function saveConfigureInstance($form, success, error) { success(response); }, { - error: error - } + error: error, + }, ); } @@ -48,12 +48,12 @@ function saveConfigureInstance($form, success, error) { function saveProxy($form, success, error) { jenkins.staplerPost("/pluginManager/proxyConfigure", $form, success, { dataType: "html", - error: error + error: error, }); } export default { saveFirstUser: saveFirstUser, saveConfigureInstance: saveConfigureInstance, - saveProxy: saveProxy + saveProxy: saveProxy, }; diff --git a/war/src/main/js/components/dropdowns/inpage-jumplist.js b/war/src/main/js/components/dropdowns/inpage-jumplist.js index 97add0173c09..d912b77330a2 100644 --- a/war/src/main/js/components/dropdowns/inpage-jumplist.js +++ b/war/src/main/js/components/dropdowns/inpage-jumplist.js @@ -12,8 +12,8 @@ function init() { chevron.classList.add("children"); chevron.items = Array.from( document.querySelectorAll( - "form > div > .jenkins-section > .jenkins-section__title" - ) + "form > div > .jenkins-section > .jenkins-section__title", + ), ).map((section) => { section.id = toId(section.textContent); return { label: section.textContent, url: "#" + section.id }; diff --git a/war/src/main/js/components/dropdowns/jumplists.js b/war/src/main/js/components/dropdowns/jumplists.js index ed9ac8b48e7c..6af9d5229c24 100644 --- a/war/src/main/js/components/dropdowns/jumplists.js +++ b/war/src/main/js/components/dropdowns/jumplists.js @@ -15,7 +15,7 @@ function generateJumplistAccessors() { const isFirefox = navigator.userAgent.indexOf("Firefox") !== -1; // Firefox adds unwanted lines when copying buttons in text, so use a span instead const dropdownChevron = document.createElement( - isFirefox ? "span" : "button" + isFirefox ? "span" : "button", ); dropdownChevron.className = "jenkins-menu-dropdown-chevron"; dropdownChevron.dataset.href = link.href; @@ -51,13 +51,13 @@ function generateDropdowns() { .then((json) => instance.setContent( Utils.generateDropdownItems( - mapChildrenItemsToDropdownItems(json.items) - ) - ) + mapChildrenItemsToDropdownItems(json.items), + ), + ), ) .catch((error) => console.log(`Jumplist request failed: ${error}`)) .finally(() => (instance.loaded = true)); - }) + }), ); } @@ -69,13 +69,13 @@ function mapChildrenItemsToDropdownItems(items) { if (item.type === "HEADER") { return { type: "HEADER", - label: item.displayName + label: item.displayName, }; } if (item.type === "SEPARATOR") { return { - type: "SEPARATOR" + type: "SEPARATOR", }; } @@ -103,7 +103,7 @@ function mapChildrenItemsToDropdownItems(items) { } else { fetch(item.url, { method: "post", - headers: crumb.wrap({}) + headers: crumb.wrap({}), }); if (event.length === 1 && event[0].target != null) { hoverNotification("Done.", event[0].target); @@ -115,7 +115,7 @@ function mapChildrenItemsToDropdownItems(items) { ? () => { return mapChildrenItemsToDropdownItems(item.subMenu.items); } - : null + : null, }; }); } diff --git a/war/src/main/js/components/dropdowns/overflow-button.js b/war/src/main/js/components/dropdowns/overflow-button.js index a1c825d99632..55edc6e0de22 100644 --- a/war/src/main/js/components/dropdowns/overflow-button.js +++ b/war/src/main/js/components/dropdowns/overflow-button.js @@ -13,7 +13,7 @@ function init() { Utils.generateDropdown(element, (instance) => { instance.setContent(element.nextElementSibling.content); }); - } + }, ); } diff --git a/war/src/main/js/components/dropdowns/templates.js b/war/src/main/js/components/dropdowns/templates.js index 390be0238c67..d20ae72674a0 100644 --- a/war/src/main/js/components/dropdowns/templates.js +++ b/war/src/main/js/components/dropdowns/templates.js @@ -23,16 +23,16 @@ function dropdown() { onHide: (instance) => { const referenceParent = instance.reference.parentNode; referenceParent.classList.remove("model-link--open"); - } + }, }; } function menuItem(options) { const itemOptions = Object.assign( { - type: "link" + type: "link", }, - options + options, ); const label = xmlEscape(itemOptions.label); @@ -78,19 +78,19 @@ function menuItem(options) { function heading(label) { return createElementFromHtml( - `

${label}

` + `

${label}

`, ); } function separator() { return createElementFromHtml( - `
` + `
`, ); } function placeholder(label) { return createElementFromHtml( - `

${label}

` + `

${label}

`, ); } @@ -99,5 +99,5 @@ export default { menuItem, heading, separator, - placeholder + placeholder, }; diff --git a/war/src/main/js/components/dropdowns/utils.js b/war/src/main/js/components/dropdowns/utils.js index 5da8a1c2d3df..8636d82befbd 100644 --- a/war/src/main/js/components/dropdowns/utils.js +++ b/war/src/main/js/components/dropdowns/utils.js @@ -30,8 +30,8 @@ function generateDropdown(element, callback) { }, onShown(instance) { behaviorShim.applySubtree(instance.popper); - } - }) + }, + }), ); } @@ -61,8 +61,8 @@ function generateDropdownItems(items) { content: generateDropdownItems(item.subMenu()), trigger: "mouseenter", placement: "right-start", - offset: [-8, 0] - }) + offset: [-8, 0], + }), ); } @@ -108,23 +108,23 @@ function generateDropdownItems(items) { const isVisible = window.getComputedStyle(container).visibility === "visible"; const isLastDropdown = Array.from( - document.querySelectorAll(".jenkins-dropdown") + document.querySelectorAll(".jenkins-dropdown"), ) .filter((dropdown) => container !== dropdown) .filter( (dropdown) => - window.getComputedStyle(dropdown).visibility === "visible" + window.getComputedStyle(dropdown).visibility === "visible", ) .every( (dropdown) => !( container.compareDocumentPosition(dropdown) & Node.DOCUMENT_POSITION_FOLLOWING - ) + ), ); return isVisible && isLastDropdown; - } + }, ); behaviorShim.applySubtree(menuItems); @@ -134,5 +134,5 @@ function generateDropdownItems(items) { export default { generateDropdown, - generateDropdownItems + generateDropdownItems, }; diff --git a/war/src/main/js/components/modals/index.js b/war/src/main/js/components/modals/index.js index 04aca16ec628..34a6e55ab178 100644 --- a/war/src/main/js/components/modals/index.js +++ b/war/src/main/js/components/modals/index.js @@ -3,7 +3,7 @@ import { CLOSE } from "@/util/symbols"; const defaults = { maxWidth: undefined, - hideCloseButton: false + hideCloseButton: false, }; export function showModal(contents, options = {}) { @@ -11,13 +11,13 @@ export function showModal(contents, options = {}) { const modal = createElementFromHtml( `
-
` + `, ); modal.style.maxWidth = options.maxWidth; if ("title" in options) { const titleElement = createElementFromHtml( - `

` + `

`, ); titleElement.append(options.title); modal.prepend(titleElement); diff --git a/war/src/main/js/components/notifications/index.js b/war/src/main/js/components/notifications/index.js index d8e3a69f0dfc..eb670da19290 100644 --- a/war/src/main/js/components/notifications/index.js +++ b/war/src/main/js/components/notifications/index.js @@ -12,16 +12,16 @@ function init() { SUCCESS: { alertClass: "jenkins-notification jenkins-notification--success", - icon: Symbols.SUCCESS + icon: Symbols.SUCCESS, }, WARNING: { alertClass: "jenkins-notification jenkins-notification--warning", - icon: Symbols.WARNING + icon: Symbols.WARNING, }, ERROR: { alertClass: "jenkins-notification jenkins-notification--error", icon: Symbols.ERROR, - sticky: true + sticky: true, }, init: function () { @@ -56,7 +56,7 @@ function init() { this.init(); this.div.appendChild( - createElementFromHtml(options.icon || this.defaultIcon) + createElementFromHtml(options.icon || this.defaultIcon), ); const message = this.div.appendChild(document.createElement("span")); message.appendChild(document.createTextNode(text)); @@ -71,7 +71,7 @@ function init() { self.hide(); }, this.DELAY); } - } + }, }; } diff --git a/war/src/main/js/components/row-selection-controller/index.js b/war/src/main/js/components/row-selection-controller/index.js index 395619847bba..d4de91b89de4 100644 --- a/war/src/main/js/components/row-selection-controller/index.js +++ b/war/src/main/js/components/row-selection-controller/index.js @@ -1,15 +1,15 @@ const rowSelectionControllers = document.querySelectorAll( - ".jenkins-table__checkbox" + ".jenkins-table__checkbox", ); rowSelectionControllers.forEach((headerCheckbox) => { const table = headerCheckbox.closest(".jenkins-table"); const tableCheckboxes = table.querySelectorAll("input[type='checkbox']"); const moreOptionsButton = table.querySelector( - ".jenkins-table__checkbox-options" + ".jenkins-table__checkbox-options", ); const moreOptionsDropdown = table.querySelector( - ".jenkins-table__checkbox-dropdown" + ".jenkins-table__checkbox-dropdown", ); const moreOptionsAllButton = table.querySelector("[data-select='all']"); const moreOptionsNoneButton = table.querySelector("[data-select='none']"); @@ -23,14 +23,14 @@ rowSelectionControllers.forEach((headerCheckbox) => { const allCheckboxesSelected = () => { const selectedCheckboxes = Array.from(tableCheckboxes).filter( - (e) => e.checked + (e) => e.checked, ); return tableCheckboxes.length === selectedCheckboxes.length; }; const anyCheckboxesSelected = () => { const selectedCheckboxes = Array.from(tableCheckboxes).filter( - (e) => e.checked + (e) => e.checked, ); return selectedCheckboxes.length > 0; }; @@ -66,7 +66,7 @@ rowSelectionControllers.forEach((headerCheckbox) => { headerCheckbox.classList.remove("jenkins-table__checkbox--indeterminate"); if (moreOptionsDropdown !== null) { moreOptionsDropdown.classList.remove( - "jenkins-table__checkbox-dropdown--visible" + "jenkins-table__checkbox-dropdown--visible", ); } @@ -89,7 +89,7 @@ rowSelectionControllers.forEach((headerCheckbox) => { return; } moreOptionsDropdown.classList.remove( - "jenkins-table__checkbox-dropdown--visible" + "jenkins-table__checkbox-dropdown--visible", ); } }); @@ -97,7 +97,7 @@ rowSelectionControllers.forEach((headerCheckbox) => { if (moreOptionsButton !== null) { moreOptionsButton.addEventListener("click", () => { moreOptionsDropdown.classList.toggle( - "jenkins-table__checkbox-dropdown--visible" + "jenkins-table__checkbox-dropdown--visible", ); }); } diff --git a/war/src/main/js/components/search-bar/index.js b/war/src/main/js/components/search-bar/index.js index 3b5c89de2e98..7b8ede4dc704 100644 --- a/war/src/main/js/components/search-bar/index.js +++ b/war/src/main/js/components/search-bar/index.js @@ -12,11 +12,11 @@ function init() { .forEach((searchBar) => { const searchWrapper = searchBar.parentElement.parentElement; const searchResultsContainer = createElementFromHtml( - `
` + `
`, ); searchWrapper.appendChild(searchResultsContainer); const searchResults = createElementFromHtml( - `
` + `
`, ); searchResultsContainer.appendChild(searchResults); @@ -37,16 +37,16 @@ function init() { createElementFromHtml( `
${item.icon}
${xmlEscape(item.label)}
` - ) + }">
${item.icon}
${xmlEscape(item.label)}`, + ), ); }); if (results.length === 0 && container === searchResults) { container.appendChild( createElementFromHtml( - `

No results

` - ) + `

No results

`, + ), ); } } @@ -64,13 +64,13 @@ function init() { function showResultsContainer() { searchResultsContainer.classList.add( - "jenkins-search__results-container--visible" + "jenkins-search__results-container--visible", ); } function hideResultsContainer() { searchResultsContainer.classList.remove( - "jenkins-search__results-container--visible" + "jenkins-search__results-container--visible", ); searchResultsContainer.style.height = "1px"; } @@ -84,7 +84,7 @@ function init() { makeKeyboardNavigable( searchResultsContainer, () => searchResults.querySelectorAll("a"), - SELECTED_CLASS + SELECTED_CLASS, ); // Workaround: Firefox doesn't update the dropdown height correctly so diff --git a/war/src/main/js/components/tooltips/index.js b/war/src/main/js/components/tooltips/index.js index e5ff6ed57437..6b28e3e7f52b 100644 --- a/war/src/main/js/components/tooltips/index.js +++ b/war/src/main/js/components/tooltips/index.js @@ -5,7 +5,7 @@ const TOOLTIP_BASE = { arrow: false, theme: "tooltip", animation: "tooltip", - appendTo: document.body + appendTo: document.body, }; /** @@ -37,10 +37,10 @@ function registerTooltip(element) { }, onHidden(instance) { instance.reference.setAttribute("title", instance.props.content); - } + }, }, - TOOLTIP_BASE - ) + TOOLTIP_BASE, + ), ); } @@ -55,10 +55,10 @@ function registerTooltip(element) { instance.props.interactive = instance.reference.getAttribute("data-tooltip-interactive") === "true"; - } + }, }, - TOOLTIP_BASE - ) + TOOLTIP_BASE, + ), ); } } @@ -80,10 +80,10 @@ function hoverNotification(text, element) { setTimeout(() => { instance.hide(); }, 3000); - } + }, }, - TOOLTIP_BASE - ) + TOOLTIP_BASE, + ), ); tooltip.show(); } @@ -95,7 +95,7 @@ function init() { 1000, (element) => { registerTooltip(element); - } + }, ); window.hoverNotification = hoverNotification; diff --git a/war/src/main/js/filter-build-history.js b/war/src/main/js/filter-build-history.js index 1552ddd7ef15..05fa29d05fae 100644 --- a/war/src/main/js/filter-build-history.js +++ b/war/src/main/js/filter-build-history.js @@ -2,10 +2,10 @@ import debounce from "lodash/debounce"; const buildHistoryContainer = document.getElementById("buildHistory"); const pageSearchInputContainer = buildHistoryContainer.querySelector( - ".build-search-row .jenkins-search" + ".build-search-row .jenkins-search", ); const pageSearchInput = buildHistoryContainer.querySelector( - ".build-search-row input" + ".build-search-row input", ); const buildHistoryPage = document.getElementById("buildHistoryPage"); const properties = document.getElementById("properties"); @@ -27,8 +27,8 @@ function updateBuilds(params) { if (isPageVisible()) { fetch(ajaxUrl + toQueryString(params), { headers: { - n: buildHistoryContainer.headers[1] - } + n: buildHistoryContainer.headers[1], + }, }).then((rsp) => { if (rsp.ok) { rsp.text().then((responseText) => { @@ -91,7 +91,7 @@ function updateBuilds(params) { if (newDataTable.classList.contains("hasPageData")) { buildHistoryPage.setAttribute( "page-entry-newest", - newDataTable.getAttribute("page-entry-newest") + newDataTable.getAttribute("page-entry-newest"), ); } @@ -112,7 +112,7 @@ function createRefreshTimeout(params) { cancelRefreshTimeout(); buildRefreshTimeout = window.setTimeout( () => updateBuilds(params), - updateBuildsRefreshInterval + updateBuildsRefreshInterval, ); } @@ -143,19 +143,19 @@ function getDataTable(buildHistoryDiv) { function updatePageParams(dataTable) { buildHistoryPage.setAttribute( "page-has-up", - dataTable.getAttribute("page-has-up") + dataTable.getAttribute("page-has-up"), ); buildHistoryPage.setAttribute( "page-has-down", - dataTable.getAttribute("page-has-down") + dataTable.getAttribute("page-has-down"), ); buildHistoryPage.setAttribute( "page-entry-newest", - dataTable.getAttribute("page-entry-newest") + dataTable.getAttribute("page-entry-newest"), ); buildHistoryPage.setAttribute( "page-entry-oldest", - dataTable.getAttribute("page-entry-oldest") + dataTable.getAttribute("page-entry-oldest"), ); } function togglePageUpDown() { @@ -330,7 +330,7 @@ function checkRowCellOverflows(row) { // eslint-disable-next-line no-inner-declarations function expandLeftWithRight( leftCellOverFlowParams, - rightCellOverflowParams + rightCellOverflowParams, ) { // Float them left and right... leftCellOverFlowParams.element.style.float = "left"; diff --git a/war/src/main/js/pages/dashboard/index.js b/war/src/main/js/pages/dashboard/index.js index 7b360e62d8c3..dd524851c4d5 100644 --- a/war/src/main/js/pages/dashboard/index.js +++ b/war/src/main/js/pages/dashboard/index.js @@ -5,11 +5,11 @@ document.querySelector("#button-icon-legend").addEventListener("click", () => { const template = document.querySelector("#template-icon-legend"); const title = template.getAttribute("data-title"); const content = createElementFromHtml( - "
" + template.innerHTML + "
" + "
" + template.innerHTML + "
", ); showModal(content, { maxWidth: "550px", - title: title + title: title, }); }); diff --git a/war/src/main/js/pages/manage-jenkins/index.js b/war/src/main/js/pages/manage-jenkins/index.js index 4a44dcfae12d..43d780a94828 100644 --- a/war/src/main/js/pages/manage-jenkins/index.js +++ b/war/src/main/js/pages/manage-jenkins/index.js @@ -5,9 +5,9 @@ searchBarInput.suggestions = function () { .map((item) => ({ url: item.querySelector("a").href, icon: item.querySelector( - ".jenkins-section__item__icon svg, .jenkins-section__item__icon img" + ".jenkins-section__item__icon svg, .jenkins-section__item__icon img", ).outerHTML, - label: item.querySelector("dt").textContent + label: item.querySelector("dt").textContent, })) .filter((item) => !item.url.endsWith("#")); }; diff --git a/war/src/main/js/pages/register/index.js b/war/src/main/js/pages/register/index.js index e166154d32de..01864a4379d3 100644 --- a/war/src/main/js/pages/register/index.js +++ b/war/src/main/js/pages/register/index.js @@ -4,7 +4,7 @@ const passwordField = document.querySelector("#password1"); const password2Field = document.querySelector("#password2"); const showPasswordField = document.querySelector("#showPassword"); const passwordStrengthWrapper = document.querySelector( - "#passwordStrengthWrapper" + "#passwordStrengthWrapper", ); const passwordStrengthIndicator = document.querySelector("#passwordStrength"); @@ -54,7 +54,7 @@ function passwordScore(password) { digits: /\d/.test(password), lower: /[a-z]/.test(password), upper: /[A-Z]/.test(password), - nonWords: /\W/.test(password) + nonWords: /\W/.test(password), }; let variationCount = 0; diff --git a/war/src/main/js/plugin-manager-ui.js b/war/src/main/js/plugin-manager-ui.js index c1f7ac4168b3..568bf64ee570 100644 --- a/war/src/main/js/plugin-manager-ui.js +++ b/war/src/main/js/plugin-manager-ui.js @@ -40,13 +40,13 @@ function applyFilter(searchQuery) { clearOldResults(); var rows = pluginManagerAvailable({ plugins: plugins.filter( - (plugin) => selectedPlugins.indexOf(plugin.name) === -1 + (plugin) => selectedPlugins.indexOf(plugin.name) === -1, ), - admin + admin, }); tbody.insertAdjacentHTML("beforeend", rows); - } + }, ); } @@ -74,7 +74,7 @@ document.addEventListener("DOMContentLoaded", function () { if (updateCenterError) { notificationBar.show( updateCenterError.content.textContent, - notificationBar.ERROR + notificationBar.ERROR, ); } }); diff --git a/war/src/main/js/pluginSetupWizardGui.js b/war/src/main/js/pluginSetupWizardGui.js index a0ddadac6684..7d123e39876e 100644 --- a/war/src/main/js/pluginSetupWizardGui.js +++ b/war/src/main/js/pluginSetupWizardGui.js @@ -122,7 +122,7 @@ var createPluginSetupWizard = function (appendTarget) { if (visibleDependencies[plugName]) { return options.fn(); } - } + }, ); // wrap calls with this method to handle generic errors returned by the plugin manager @@ -176,7 +176,7 @@ var createPluginSetupWizard = function (appendTarget) { $tip .tooltip({ html: true, - title: text + title: text, }) .tooltip("show"); }); @@ -200,7 +200,7 @@ var createPluginSetupWizard = function (appendTarget) { var decorations = [ function () { // any decorations after DOM replacement go here - } + }, ]; var getJenkinsVersionFull = function () { @@ -235,7 +235,7 @@ var createPluginSetupWizard = function (appendTarget) { onComplete(); } }, - { dataType: "html" } + { dataType: "html" }, ); }); } else { @@ -249,10 +249,10 @@ var createPluginSetupWizard = function (appendTarget) { { translations: translations, baseUrl: jenkins.baseUrl, - jenkinsVersion: getJenkinsVersion() + jenkinsVersion: getJenkinsVersion(), }, - data - ) + data, + ), ); if (panel === currentPanel) { // just replace id-marked elements @@ -300,7 +300,7 @@ var createPluginSetupWizard = function (appendTarget) { var $modalHeader = $container.find(".modal-header"); if ($modalHeader.length > 0 && $modalHeader.is(".closeable")) { $modalHeader.prepend( - '' + '', ); } @@ -310,7 +310,7 @@ var createPluginSetupWizard = function (appendTarget) { var $modalFooter = $container.find(".modal-footer"); if ($modalFooter.length === 0) { $modalFooter = $('').appendTo( - $container + $container, ); } $modalFooter.prepend( @@ -318,7 +318,7 @@ var createPluginSetupWizard = function (appendTarget) { translations.installWizard_jenkinsVersionTitle + " " + getJenkinsVersionFull() + - "" + "", ); } @@ -400,9 +400,9 @@ var createPluginSetupWizard = function (appendTarget) { if (p) { var plug = $.extend( { - installStatus: "pending" + installStatus: "pending", }, - p + p, ); installingPlugins.push(plug); } @@ -418,14 +418,14 @@ var createPluginSetupWizard = function (appendTarget) { function () { return progressPanel(arguments); }, - { installingPlugins: [] } + { installingPlugins: [] }, ); pluginManager.installPlugins( pluginNames, handleGenericError(function () { showStatePanel(); - }) + }), ); }; @@ -519,14 +519,14 @@ var createPluginSetupWizard = function (appendTarget) { }, INITIAL_PLUGINS_INSTALLING: function () { showInstallProgress(); - } + }, }; var showStatePanel = function (state) { if (!state) { pluginManager.installStatus( handleGenericError(function (data) { showStatePanel(data.state); - }) + }), ); return; } @@ -543,7 +543,7 @@ var createPluginSetupWizard = function (appendTarget) { if (failedPluginNames.length > 0) { setPanel(pluginSuccessPanel, { installingPlugins: installingPlugins, - failedPlugins: true + failedPlugins: true, }); return; } @@ -577,7 +577,7 @@ var createPluginSetupWizard = function (appendTarget) { setPanel( progressPanel, { installingPlugins: installingPlugins }, - attachScrollEvent + attachScrollEvent, ); // call to the installStatus, update progress bar & plugin details; transition on complete @@ -663,7 +663,7 @@ var createPluginSetupWizard = function (appendTarget) { $txt.append($div); var $itemProgress = $( - '.selected-plugin[id="installing-' + idIfy(j.name) + '"]' + '.selected-plugin[id="installing-' + idIfy(j.name) + '"]', ); if ($itemProgress.length > 0 && !$itemProgress.is("." + state)) { $itemProgress.addClass(state); @@ -687,7 +687,7 @@ var createPluginSetupWizard = function (appendTarget) { $(".progress-bar").css({ width: "100%" }); showStatePanel(data.state); } - }) + }), ); }; @@ -714,7 +714,7 @@ var createPluginSetupWizard = function (appendTarget) { plug.allDependencies = getAllDependencies(plug.name); } oncomplete(); - }) + }), ); }; @@ -731,7 +731,7 @@ var createPluginSetupWizard = function (appendTarget) { if (!plug) { plug = { name: plugInfo.name, - title: plugInfo.name + title: plugInfo.name, }; } plugs.push({ @@ -740,8 +740,8 @@ var createPluginSetupWizard = function (appendTarget) { usage: plugInfo.usage, title: plugInfo.title ? plugInfo.title : plug.title, excerpt: plugInfo.excerpt ? plugInfo.excerpt : plug.excerpt, - updated: new Date(plug.buildDate) - }) + updated: new Date(plug.buildDate), + }), }); } } @@ -754,7 +754,7 @@ var createPluginSetupWizard = function (appendTarget) { loadPluginCategories(function () { setPanel(pluginSelectionPanel, pluginSelectionPanelData(), function () { $bs(".plugin-selector .plugin-list").scrollspy({ - target: ".plugin-selector .categories" + target: ".plugin-selector .categories", }); }); }); @@ -765,7 +765,7 @@ var createPluginSetupWizard = function (appendTarget) { return { categories: categories, categorizedPlugins: categorizedPlugins, - selectedPlugins: selectedPluginNames + selectedPlugins: selectedPluginNames, }; }; @@ -834,7 +834,7 @@ var createPluginSetupWizard = function (appendTarget) { ? xform : function (d) { return d; - } + }, ); return elements; }; @@ -857,18 +857,18 @@ var createPluginSetupWizard = function (appendTarget) { var pos = $pl.scrollTop() + $el.position().top; $pl.stop(true).animate( { - scrollTop: pos + scrollTop: pos, }, - 100 + 100, ); setTimeout(function () { // wait for css transitions to finish var pos = $pl.scrollTop() + $el.position().top; $pl.stop(true).animate( { - scrollTop: pos + scrollTop: pos, }, - 50 + 50, ); }, 50); } @@ -895,7 +895,7 @@ var createPluginSetupWizard = function (appendTarget) { text.toLowerCase(), function (d) { return d.toLowerCase(); - } + }, ); if (localMatches.length > 0) { matches = matches.concat(localMatches); @@ -922,7 +922,7 @@ var createPluginSetupWizard = function (appendTarget) { function () { var val = $(this).val(); searchForPlugins(val, true); - } + }, ); // handle keyboard up/down navigation between items in @@ -983,13 +983,13 @@ var createPluginSetupWizard = function (appendTarget) { var top = $pl.scrollTop() + $el.position().top; $pl.stop(true).animate( { - scrollTop: top + scrollTop: top, }, 250, function () { var top = $pl.scrollTop() + $el.position().top; $pl.stop(true).scrollTop(top); - } + }, ); }; @@ -1008,7 +1008,7 @@ var createPluginSetupWizard = function (appendTarget) { showStatePanel(); } else { setPanel(errorPanel, { - errorMessage: "Error trying to create first user: " + data.statusText + errorMessage: "Error trying to create first user: " + data.statusText, }); } }; @@ -1023,7 +1023,7 @@ var createPluginSetupWizard = function (appendTarget) { if ($main.length > 0) { responseText = responseText.replace( /body([^>]*)[>](.|[\r\n])+[<][/]body/, - "body$1>" + $main.html() + "" + $main.html() + " 0) { responseText = responseText.replace( /body([^>]*)[>](.|[\r\n])+[<][/]body/, - "body$1>" + $main.html() + "" + $main.html() + " { const headerToScrollTo = document.getElementById( - item.querySelector(".task-link").dataset.sectionId + item.querySelector(".task-link").dataset.sectionId, ); const sectionTopPosition = headerToScrollTo.getBoundingClientRect().top + window.scrollY - 70; window.scrollTo({ top: i === 0 ? 0 : sectionTopPosition, - behavior: "smooth" + behavior: "smooth", }); }); diff --git a/war/src/main/js/sortable-drag-drop.js b/war/src/main/js/sortable-drag-drop.js index 3f75dffa0b52..5689119af42c 100644 --- a/war/src/main/js/sortable-drag-drop.js +++ b/war/src/main/js/sortable-drag-drop.js @@ -32,7 +32,7 @@ function registerSortableDragDrop(e) { }, onUnchoose: function (event) { event.item.style.removeProperty("height"); - } + }, }); } diff --git a/war/src/main/js/util/jenkins.js b/war/src/main/js/util/jenkins.js index d8c44b9e005a..ddb1464108d3 100644 --- a/war/src/main/js/util/jenkins.js +++ b/war/src/main/js/util/jenkins.js @@ -25,7 +25,7 @@ jenkins.stringify = function (o) { a: Array.prototype.toJSON, o: Object.prototype.toJSON, h: Hash.prototype.toJSON, - s: String.prototype.toJSON + s: String.prototype.toJSON, }; try { delete Array.prototype.toJSON; @@ -73,7 +73,7 @@ jenkins.get = function (url, success, options) { type: "GET", cache: false, dataType: "json", - success: success + success: success, }; if (options instanceof Object) { $.extend(args, options); @@ -121,7 +121,7 @@ jenkins.post = function (url, data, success, options) { data: formBody, contentType: "application/json", success: success, - headers: headers + headers: headers, }; if (options instanceof Object) { $.extend(args, options); @@ -161,7 +161,7 @@ jenkins.loadTranslations = function (bundleName, handler, onError) { console.log('"' + property + '" not found in translation bundle.'); } return property; - } + }, }); } @@ -213,8 +213,8 @@ jenkins.testConnectivity = function (siteId, handler) { } else { handler.call({ isError: true, errorMessage: errorThrown }); } - } - } + }, + }, ); }; testConnectivity(); @@ -254,7 +254,7 @@ jenkins.buildFormPost = function ($form) { $.param({ "core:apply": "", Submit: "Save", - json: $form.find("input[name=json]").val() + json: $form.find("input[name=json]").val(), }) ); } @@ -286,10 +286,10 @@ jenkins.staplerPost = function (url, $form, success, options) { { processData: false, contentType: "application/x-www-form-urlencoded", - crumb: crumb + crumb: crumb, }, - options - ) + options, + ), ); }; diff --git a/war/src/main/js/util/jenkinsLocalStorage.js b/war/src/main/js/util/jenkinsLocalStorage.js index ee6541da34b8..6f60ff7783ef 100644 --- a/war/src/main/js/util/jenkinsLocalStorage.js +++ b/war/src/main/js/util/jenkinsLocalStorage.js @@ -35,5 +35,5 @@ export default { setGlobalItem, getGlobalItem, setPageItem, - getPageItem + getPageItem, }; diff --git a/war/src/main/js/util/keyboard.js b/war/src/main/js/util/keyboard.js index 9a2168799d9d..3e44eb32fd11 100644 --- a/war/src/main/js/util/keyboard.js +++ b/war/src/main/js/util/keyboard.js @@ -11,7 +11,7 @@ export default function makeKeyboardNavigable( selectedClass, additionalBehaviours = () => {}, hasKeyboardPriority = () => - window.getComputedStyle(container).visibility === "visible" + window.getComputedStyle(container).visibility === "visible", ) { window.addEventListener("keydown", (e) => { let items = Array.from(itemsFunc()); diff --git a/war/src/main/js/util/localStorage.js b/war/src/main/js/util/localStorage.js index 7f2b5b079e14..70d4eb9b5d8f 100644 --- a/war/src/main/js/util/localStorage.js +++ b/war/src/main/js/util/localStorage.js @@ -13,7 +13,7 @@ function setMock() { }, removeItem: function (name) { delete this.storage[name]; - } + }, }; } @@ -43,5 +43,5 @@ export default { setMock, setItem, getItem, - removeItem + removeItem, }; diff --git a/war/src/main/js/util/page.js b/war/src/main/js/util/page.js index 1a99cbf1dac2..33d10a4a7540 100644 --- a/war/src/main/js/util/page.js +++ b/war/src/main/js/util/page.js @@ -64,5 +64,5 @@ export default { onWinScroll, pageHeaderHeight, breadcrumbBarHeight, - removeTextHighlighting + removeTextHighlighting, }; diff --git a/war/src/main/scss/abstracts/theme.scss b/war/src/main/scss/abstracts/theme.scss index 96211eeadf64..79ebb07112a5 100644 --- a/war/src/main/scss/abstracts/theme.scss +++ b/war/src/main/scss/abstracts/theme.scss @@ -11,7 +11,7 @@ $colors: ( "pink": #fb0f45, "purple": #af52de, "red": #e6001f, - "yellow": #ffb31a + "yellow": #ffb31a, ); $semantics: ( @@ -19,7 +19,7 @@ $semantics: ( "warning": var(--orange), "success": var(--green), "destructive": var(--red), - "build": var(--green) + "build": var(--green), ); :root, diff --git a/war/src/main/webapp/scripts/behavior.js b/war/src/main/webapp/scripts/behavior.js index 75a36fafce26..791aa9d3adfb 100644 --- a/war/src/main/webapp/scripts/behavior.js +++ b/war/src/main/webapp/scripts/behavior.js @@ -54,7 +54,7 @@ var Behaviour = (function () { selector: selector, id: id, priority: priority, - behavior: behavior + behavior: behavior, }); storage.sort(function (a, b) { var location = a.priority - b.priority; @@ -128,7 +128,7 @@ var Behaviour = (function () { var list = findElementsBySelector( node, registration.selector, - includeSelf + includeSelf, ); if (list.length > 0) { //console.log(registration.id + ":" + registration.selector + " @" + registration.priority + " on " + list.length + " elements"); @@ -153,7 +153,7 @@ var Behaviour = (function () { func(e); }; } - } + }, }; })(); @@ -196,7 +196,7 @@ function findElementsBySelector(startNode, selector, includeSelf) { } }; return Array.from(startNode.parentNode.querySelectorAll(selector)).filter( - isSelfOrChild + isSelfOrChild, ); } else { return Array.from(startNode.querySelectorAll(selector)); diff --git a/war/src/main/webapp/scripts/combobox.js b/war/src/main/webapp/scripts/combobox.js index 191ae0079d59..d8323b42d2e6 100644 --- a/war/src/main/webapp/scripts/combobox.js +++ b/war/src/main/webapp/scripts/combobox.js @@ -89,7 +89,7 @@ function ComboBox(idOrField, callback, config) { : idOrField; if (typeof this.field == "undefined") { alert( - "You have specified an invalid id for the field you want to turn into a combo box" + "You have specified an invalid id for the field you want to turn into a combo box", ); } this.dropdown = document.createElement("div"); diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index cacfef0d6e72..fdac0422a0ae 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -156,12 +156,12 @@ var crumb = { form.action = form.action + "?" + this.fieldName + "=" + this.value; } } - } + }, }; (function initializeCrumb() { var extensionsAvailable = document.head.getAttribute( - "data-extensions-available" + "data-extensions-available", ); if (extensionsAvailable === "true") { var crumbHeaderName = document.head.getAttribute("data-crumb-header"); @@ -253,9 +253,9 @@ var FormChecker = { fetch(url, { method: params.method, headers: crumb.wrap({ - "Content-Type": "application/x-www-form-urlencoded" + "Content-Type": "application/x-www-form-urlencoded", }), - body: method !== "get" ? params.parameters : null + body: method !== "get" ? params.parameters : null, }).then((response) => { params.onComplete(response); }); @@ -279,10 +279,10 @@ var FormChecker = { FormChecker.schedule(); layoutUpdateCallback.call(); }); - } + }, }); this.inProgress++; - } + }, }; /** @@ -434,7 +434,7 @@ function qs(owner) { toString: function () { return this.params; - } + }, }; } @@ -663,7 +663,7 @@ function registerValidator(e) { if (!tr) { console.warn( "Couldn't find the expected validation element (.validation-error-area) for element", - e.closest(".jenkins-form-item") + e.closest(".jenkins-form-item"), ); return; } @@ -681,13 +681,13 @@ function registerValidator(e) { } catch (e) { if (window.console != null) { console.warn( - "Legacy checkUrl '" + url + "' is not valid JavaScript: " + e + "Legacy checkUrl '" + url + "' is not valid JavaScript: " + e, ); } if (window.YUI != null) { YUI.log( "Legacy checkUrl '" + url + "' is not valid JavaScript: " + e, - "warn" + "warn", ); } return url; // return plain url as fallback @@ -698,7 +698,7 @@ function registerValidator(e) { depends.split(" ").forEach( TryEach(function (n) { q.nearBy(n); - }) + }), ); } return url + q.toString(); @@ -717,7 +717,7 @@ function registerValidator(e) { "Failed to register validation method: " + e.getAttribute("checkUrl") + " : " + - e + e, ); return; } @@ -732,10 +732,10 @@ function registerValidator(e) { const errorMessage = `
An internal error occurred during form field validation (HTTP ${response.status}). Please reload the page and if the problem persists, ask the administrator for help.
`; updateValidationArea( validationArea, - response.status === 200 ? responseText : errorMessage + response.status === 200 ? responseText : errorMessage, ); }); - } + }, }); }; var oldOnchange = e.onchange; @@ -760,13 +760,13 @@ function registerValidator(e) { if (window.YUI != null) { YUI.log( "Unable to find a nearby control of the name " + name, - "warn" + "warn", ); } return; } c.addEventListener("change", checker.bind(e)); - }) + }), ); } @@ -780,7 +780,7 @@ function registerRegexpValidator(e, regexp, message) { if (!tr) { console.warn( "Couldn't find the expected parent element (.setting-main) for element", - e.closest(".jenkins-form-item") + e.closest(".jenkins-form-item"), ); return; } @@ -800,7 +800,7 @@ function registerRegexpValidator(e, regexp, message) { } else { updateValidationArea( this.targetElement, - `
${message}
` + `
${message}
`, ); set = true; } @@ -821,7 +821,7 @@ function registerMinMaxValidator(e) { if (!tr) { console.warn( "Couldn't find the expected parent element (.setting-main) for element", - e.closest(".jenkins-form-item") + e.closest(".jenkins-form-item"), ); return; } @@ -857,7 +857,7 @@ function registerMinMaxValidator(e) { // The value is out of range updateValidationArea( this.targetElement, - `
This value should be between ${min} and ${max}
` + `
This value should be between ${min} and ${max}
`, ); set = true; } else { @@ -876,7 +876,7 @@ function registerMinMaxValidator(e) { if (parseInt(min) > parseInt(this.value)) { updateValidationArea( this.targetElement, - `
This value should be larger than ${min}
` + `
This value should be larger than ${min}
`, ); set = true; } else { @@ -894,7 +894,7 @@ function registerMinMaxValidator(e) { if (parseInt(max) < parseInt(this.value)) { updateValidationArea( this.targetElement, - `
This value should be less than ${max}
` + `
This value should be less than ${max}
`, ); set = true; } else { @@ -1232,7 +1232,7 @@ function rowvgStartEachRow(recursive, f) { function (e) { // progressBar.jelly e.onclick = progressBarOnClick; - } + }, ); //