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();
}
// 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);

View File

@@ -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; }

View File

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

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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':

View File

@@ -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';

View File

@@ -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) {

View File

@@ -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);

View File

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

View File

@@ -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';