remove sonarjs

This commit is contained in:
JFH
2021-07-25 21:27:16 +02:00
parent 37711ae786
commit de949c81fa
12 changed files with 0 additions and 14 deletions

View File

@@ -526,7 +526,6 @@ class Editor extends EditorStartup {
this.workarea.scroll(); this.workarea.scroll();
} }
// eslint-disable-next-line sonarjs/no-collapsible-if
if (this.configObj.urldata.storagePrompt !== true && this.storagePromptState === 'ignore') { if (this.configObj.urldata.storagePrompt !== true && this.storagePromptState === 'ignore') {
if ($id("dialog_box") != null) $id("dialog_box").style.display = 'none'; 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])); this.multiselected = (elems.length >= 2 && !isNullish(elems[1]));
// Only updating fields for single elements for now // Only updating fields for single elements for now
if (!this.multiselected) { if (!this.multiselected) {
// eslint-disable-next-line sonarjs/no-small-switch
switch (mode) { switch (mode) {
case 'rotate': { case 'rotate': {
const ang = this.svgCanvas.getRotationAngle(elem); const ang = this.svgCanvas.getRotationAngle(elem);

View File

@@ -295,7 +295,6 @@ class EditorStartup {
if (evt.type === 'mouseup') { panning = false; } if (evt.type === 'mouseup') { panning = false; }
return false; return false;
}); });
// eslint-disable-next-line sonarjs/no-identical-functions
$id('svgcanvas').addEventListener('mousemove', function(evt) { $id('svgcanvas').addEventListener('mousemove', function(evt) {
if (panning === false) { return true; } if (panning === false) { return true; }

View File

@@ -1,4 +1,3 @@
/* eslint-disable sonarjs/no-collapsible-if */
/** /**
* @param {any} obj * @param {any} obj
* @returns {any} * @returns {any}

View File

@@ -48,7 +48,6 @@ export class SeListItem extends HTMLElement {
*/ */
attributeChangedCallback (name, oldValue, newValue) { attributeChangedCallback (name, oldValue, newValue) {
if (oldValue === newValue) return; if (oldValue === newValue) return;
// eslint-disable-next-line sonarjs/no-small-switch
switch (name) { switch (name) {
case 'option': case 'option':
this.$menuitem.setAttribute('option', newValue); this.$menuitem.setAttribute('option', newValue);

View File

@@ -178,7 +178,6 @@ export class SESpinInput extends HTMLElement {
this.value = e.target.value; this.value = e.target.value;
this.dispatchEvent(this.$event); this.dispatchEvent(this.$event);
}); });
// eslint-disable-next-line sonarjs/no-identical-functions
this.$input.addEventListener('click', (e) => { this.$input.addEventListener('click', (e) => {
e.preventDefault(); e.preventDefault();
this.value = e.target.value; this.value = e.target.value;

View File

@@ -119,7 +119,6 @@ export class SeCMenuLayerDialog extends HTMLElement {
*/ */
attributeChangedCallback (name, oldValue, newValue) { attributeChangedCallback (name, oldValue, newValue) {
if (oldValue === newValue) return; if (oldValue === newValue) return;
// eslint-disable-next-line sonarjs/no-small-switch
switch (name) { switch (name) {
case 'value': case 'value':
this.source = newValue; this.source = newValue;

View File

@@ -122,7 +122,6 @@ export class SeExportDialog extends HTMLElement {
* @returns {void} * @returns {void}
*/ */
attributeChangedCallback (name, oldValue, newValue) { attributeChangedCallback (name, oldValue, newValue) {
// eslint-disable-next-line sonarjs/no-small-switch
let node; let node;
switch (name) { switch (name) {
case 'dialog': case 'dialog':

View File

@@ -455,7 +455,6 @@ export default {
header.textContent = allLibs; header.textContent = allLibs;
back.style.display = 'none'; back.style.display = 'none';
}); });
// eslint-disable-next-line sonarjs/no-identical-functions
back.addEventListener('touchend', function () { back.addEventListener('touchend', function () {
frame.setAttribute('src', 'about:blank'); frame.setAttribute('src', 'about:blank');
frame.style.display = 'none'; frame.style.display = 'none';
@@ -499,7 +498,6 @@ export default {
libOpts.style.display = 'none'; libOpts.style.display = 'none';
back.style.display = 'block'; back.style.display = 'block';
}); });
// eslint-disable-next-line sonarjs/no-identical-functions
li.addEventListener('touchend', function () { li.addEventListener('touchend', function () {
frame.setAttribute('src', url); frame.setAttribute('src', url);
frame.style.display = 'block'; frame.style.display = 'block';

View File

@@ -96,7 +96,6 @@ class BottomPanel {
}); });
} }
if (bNoStroke && bNoFill) { if (bNoStroke && bNoFill) {
// eslint-disable-next-line sonarjs/no-identical-functions
buttonsNeedingFillAndStroke.forEach((btn) => { buttonsNeedingFillAndStroke.forEach((btn) => {
// if btn is pressed, change to select button // if btn is pressed, change to select button
if ($id(btn).pressed) { if ($id(btn).pressed) {

View File

@@ -508,7 +508,6 @@ export const setStrokeWidthMethod = function (val) {
* @param {Element} e * @param {Element} e
* @returns {void} * @returns {void}
*/ */
// eslint-disable-next-line sonarjs/no-identical-functions
function addNonG(e) { function addNonG(e) {
if (e.nodeName !== 'g') { if (e.nodeName !== 'g') {
elems.push(e); elems.push(e);

View File

@@ -1,4 +1,3 @@
/* eslint-disable sonarjs/no-duplicate-string */
/** /**
* Tools for SVG sanitization. * Tools for SVG sanitization.
* @module sanitize * @module sanitize

View File

@@ -443,7 +443,6 @@ export const groupSelectedElements = function (type, urlArg) {
let cmdStr = ''; let cmdStr = '';
let url; let url;
// eslint-disable-next-line sonarjs/no-small-switch
switch (type) { switch (type) {
case 'a': { case 'a': {
cmdStr = 'Make hyperlink'; cmdStr = 'Make hyperlink';