remove sonarjs
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable sonarjs/no-collapsible-if */
|
||||
/**
|
||||
* @param {any} obj
|
||||
* @returns {any}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable sonarjs/no-duplicate-string */
|
||||
/**
|
||||
* Tools for SVG sanitization.
|
||||
* @module sanitize
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user