diff --git a/src/editor/Editor.js b/src/editor/Editor.js index 7196c504..463d9a4c 100644 --- a/src/editor/Editor.js +++ b/src/editor/Editor.js @@ -526,7 +526,6 @@ class Editor extends EditorStartup { this.workarea.scroll(); } - // eslint-disable-next-line sonarjs/no-collapsible-if if (this.configObj.urldata.storagePrompt !== true && this.storagePromptState === 'ignore') { if ($id("dialog_box") != null) $id("dialog_box").style.display = 'none'; } @@ -614,7 +613,6 @@ class Editor extends EditorStartup { this.multiselected = (elems.length >= 2 && !isNullish(elems[1])); // Only updating fields for single elements for now if (!this.multiselected) { - // eslint-disable-next-line sonarjs/no-small-switch switch (mode) { case 'rotate': { const ang = this.svgCanvas.getRotationAngle(elem); diff --git a/src/editor/EditorStartup.js b/src/editor/EditorStartup.js index ac454b73..43f6ef0c 100644 --- a/src/editor/EditorStartup.js +++ b/src/editor/EditorStartup.js @@ -295,7 +295,6 @@ class EditorStartup { if (evt.type === 'mouseup') { panning = false; } return false; }); - // eslint-disable-next-line sonarjs/no-identical-functions $id('svgcanvas').addEventListener('mousemove', function(evt) { if (panning === false) { return true; } diff --git a/src/editor/components/jgraduate/Util.js b/src/editor/components/jgraduate/Util.js index 20a2399d..061a4d75 100644 --- a/src/editor/components/jgraduate/Util.js +++ b/src/editor/components/jgraduate/Util.js @@ -1,4 +1,3 @@ -/* eslint-disable sonarjs/no-collapsible-if */ /** * @param {any} obj * @returns {any} diff --git a/src/editor/components/seListItem.js b/src/editor/components/seListItem.js index 80052b57..ee1a7972 100644 --- a/src/editor/components/seListItem.js +++ b/src/editor/components/seListItem.js @@ -48,7 +48,6 @@ export class SeListItem extends HTMLElement { */ attributeChangedCallback (name, oldValue, newValue) { if (oldValue === newValue) return; - // eslint-disable-next-line sonarjs/no-small-switch switch (name) { case 'option': this.$menuitem.setAttribute('option', newValue); diff --git a/src/editor/components/seSpinInput.js b/src/editor/components/seSpinInput.js index ee097e8c..b80ffcb3 100644 --- a/src/editor/components/seSpinInput.js +++ b/src/editor/components/seSpinInput.js @@ -178,7 +178,6 @@ export class SESpinInput extends HTMLElement { this.value = e.target.value; this.dispatchEvent(this.$event); }); - // eslint-disable-next-line sonarjs/no-identical-functions this.$input.addEventListener('click', (e) => { e.preventDefault(); this.value = e.target.value; diff --git a/src/editor/dialogs/cmenuLayersDialog.js b/src/editor/dialogs/cmenuLayersDialog.js index 09b2046f..95c02782 100644 --- a/src/editor/dialogs/cmenuLayersDialog.js +++ b/src/editor/dialogs/cmenuLayersDialog.js @@ -119,7 +119,6 @@ export class SeCMenuLayerDialog extends HTMLElement { */ attributeChangedCallback (name, oldValue, newValue) { if (oldValue === newValue) return; - // eslint-disable-next-line sonarjs/no-small-switch switch (name) { case 'value': this.source = newValue; diff --git a/src/editor/dialogs/exportDialog.js b/src/editor/dialogs/exportDialog.js index 04a08ea4..ffe2dfa1 100644 --- a/src/editor/dialogs/exportDialog.js +++ b/src/editor/dialogs/exportDialog.js @@ -122,7 +122,6 @@ export class SeExportDialog extends HTMLElement { * @returns {void} */ attributeChangedCallback (name, oldValue, newValue) { - // eslint-disable-next-line sonarjs/no-small-switch let node; switch (name) { case 'dialog': diff --git a/src/editor/extensions/ext-imagelib/ext-imagelib.js b/src/editor/extensions/ext-imagelib/ext-imagelib.js index d4f03063..251653a5 100644 --- a/src/editor/extensions/ext-imagelib/ext-imagelib.js +++ b/src/editor/extensions/ext-imagelib/ext-imagelib.js @@ -455,7 +455,6 @@ export default { header.textContent = allLibs; back.style.display = 'none'; }); - // eslint-disable-next-line sonarjs/no-identical-functions back.addEventListener('touchend', function () { frame.setAttribute('src', 'about:blank'); frame.style.display = 'none'; @@ -499,7 +498,6 @@ export default { libOpts.style.display = 'none'; back.style.display = 'block'; }); - // eslint-disable-next-line sonarjs/no-identical-functions li.addEventListener('touchend', function () { frame.setAttribute('src', url); frame.style.display = 'block'; diff --git a/src/editor/panels/BottomPanel.js b/src/editor/panels/BottomPanel.js index 8ae363e2..b551dc7c 100644 --- a/src/editor/panels/BottomPanel.js +++ b/src/editor/panels/BottomPanel.js @@ -96,7 +96,6 @@ class BottomPanel { }); } if (bNoStroke && bNoFill) { - // eslint-disable-next-line sonarjs/no-identical-functions buttonsNeedingFillAndStroke.forEach((btn) => { // if btn is pressed, change to select button if ($id(btn).pressed) { diff --git a/src/svgcanvas/elem-get-set.js b/src/svgcanvas/elem-get-set.js index 7c2284e7..32c63c30 100644 --- a/src/svgcanvas/elem-get-set.js +++ b/src/svgcanvas/elem-get-set.js @@ -508,7 +508,6 @@ export const setStrokeWidthMethod = function (val) { * @param {Element} e * @returns {void} */ - // eslint-disable-next-line sonarjs/no-identical-functions function addNonG(e) { if (e.nodeName !== 'g') { elems.push(e); diff --git a/src/svgcanvas/sanitize.js b/src/svgcanvas/sanitize.js index f6d2e643..2dcce42f 100644 --- a/src/svgcanvas/sanitize.js +++ b/src/svgcanvas/sanitize.js @@ -1,4 +1,3 @@ -/* eslint-disable sonarjs/no-duplicate-string */ /** * Tools for SVG sanitization. * @module sanitize diff --git a/src/svgcanvas/selected-elem.js b/src/svgcanvas/selected-elem.js index 00cecd9f..00758f8e 100644 --- a/src/svgcanvas/selected-elem.js +++ b/src/svgcanvas/selected-elem.js @@ -443,7 +443,6 @@ export const groupSelectedElements = function (type, urlArg) { let cmdStr = ''; let url; - // eslint-disable-next-line sonarjs/no-small-switch switch (type) { case 'a': { cmdStr = 'Make hyperlink';