dependencies update and fix lint unused disabled line

master
JFH 2021-11-25 23:40:07 +01:00
parent 83303065bb
commit b09f71e703
60 changed files with 339 additions and 613 deletions

View File

@ -5,7 +5,6 @@ import * as coords from '../../../instrumented/svgcanvas/coords.js';
describe('coords', function () { describe('coords', function () {
let elemId = 1; let elemId = 1;
// eslint-disable-next-line no-shadow
const root = document.createElement('div'); const root = document.createElement('div');
root.id = 'root'; root.id = 'root';
root.style.visibility = 'hidden'; root.style.visibility = 'hidden';

View File

@ -19,7 +19,6 @@ describe('draw.Drawing', function () {
const PATH_ATTR = { const PATH_ATTR = {
// clone will convert relative to absolute, so the test for equality fails. // clone will convert relative to absolute, so the test for equality fails.
// d: 'm7.38867,57.38867c0,-27.62431 22.37569,-50 50,-50c27.62431,0 50,22.37569 50,50c0,27.62431 -22.37569,50 -50,50c-27.62431,0 -50,-22.37569 -50,-50z', // d: 'm7.38867,57.38867c0,-27.62431 22.37569,-50 50,-50c27.62431,0 50,22.37569 50,50c0,27.62431 -22.37569,50 -50,50c-27.62431,0 -50,-22.37569 -50,-50z',
// eslint-disable-next-line max-len
d: 'M7.389,57.389C7.389,29.764 29.764,7.389 57.389,7.389C85.013,7.389 107.389,29.764 107.389,57.389C107.389,85.013 85.013,107.389 57.389,107.389C29.764,107.389 7.389,85.013 7.389,57.389z', d: 'M7.389,57.389C7.389,29.764 29.764,7.389 57.389,7.389C85.013,7.389 107.389,29.764 107.389,57.389C107.389,85.013 85.013,107.389 57.389,107.389C29.764,107.389 7.389,85.013 7.389,57.389z',
transform: 'rotate(45 57.388671875000036,57.388671874999986) ', transform: 'rotate(45 57.388671875000036,57.388671874999986) ',
'stroke-width': '5', 'stroke-width': '5',

View File

@ -25,7 +25,7 @@ describe('history', function () {
unapply (handler) { unapply (handler) {
super.unapply(handler, () => { /* empty fn */ }); super.unapply(handler, () => { /* empty fn */ });
} }
elements () { return []; } // eslint-disable-line class-methods-use-this elements () { return []; }
} }
/* /*

View File

@ -48,7 +48,7 @@ describe('path', function () {
const [ mockPathContext, mockUtilitiesContext ] = getMockContexts(); const [ mockPathContext, mockUtilitiesContext ] = getMockContexts();
pathModule.init(mockPathContext); pathModule.init(mockPathContext);
utilities.init(mockUtilitiesContext); utilities.init(mockUtilitiesContext);
new Path(path); // eslint-disable-line no-new new Path(path);
assert.equal(path.pathSegList.getItem(1).pathSegTypeAsLetter, 'L'); assert.equal(path.pathSegList.getItem(1).pathSegTypeAsLetter, 'L');
assert.equal(path.pathSegList.getItem(1).x, 10); assert.equal(path.pathSegList.getItem(1).x, 10);
@ -68,7 +68,7 @@ describe('path', function () {
const [ mockPathContext, mockUtilitiesContext ] = getMockContexts(); const [ mockPathContext, mockUtilitiesContext ] = getMockContexts();
pathModule.init(mockPathContext); pathModule.init(mockPathContext);
utilities.init(mockUtilitiesContext); utilities.init(mockUtilitiesContext);
new Path(path); // eslint-disable-line no-new new Path(path);
assert.equal(path.pathSegList.getItem(1).pathSegTypeAsLetter, 'L'); assert.equal(path.pathSegList.getItem(1).pathSegTypeAsLetter, 'L');
assert.equal(path.pathSegList.getItem(1).x, 10); assert.equal(path.pathSegList.getItem(1).x, 10);
@ -124,7 +124,7 @@ describe('path', function () {
const [ mockPathContext, mockUtilitiesContext ] = getMockContexts(); const [ mockPathContext, mockUtilitiesContext ] = getMockContexts();
pathModule.init(mockPathContext); pathModule.init(mockPathContext);
utilities.init(mockUtilitiesContext); utilities.init(mockUtilitiesContext);
new Path(path); // eslint-disable-line no-new new Path(path);
assert.equal(path.pathSegList.getItem(1).pathSegTypeAsLetter, 'L'); assert.equal(path.pathSegList.getItem(1).pathSegTypeAsLetter, 'L');
assert.equal(path.pathSegList.getItem(1).x, 10); assert.equal(path.pathSegList.getItem(1).x, 10);
@ -144,7 +144,7 @@ describe('path', function () {
const [ mockPathContext, mockUtilitiesContext ] = getMockContexts(); const [ mockPathContext, mockUtilitiesContext ] = getMockContexts();
pathModule.init(mockPathContext); pathModule.init(mockPathContext);
utilities.init(mockUtilitiesContext); utilities.init(mockUtilitiesContext);
new Path(path); // eslint-disable-line no-new new Path(path);
assert.equal(path.pathSegList.getItem(1).pathSegTypeAsLetter, 'C'); assert.equal(path.pathSegList.getItem(1).pathSegTypeAsLetter, 'C');
assert.equal(path.pathSegList.getItem(1).x1, 11); assert.equal(path.pathSegList.getItem(1).x1, 11);

View File

@ -5,7 +5,6 @@ import * as recalculate from '../../../instrumented/svgcanvas/recalculate.js';
describe('recalculate', function () { describe('recalculate', function () {
// eslint-disable-next-line no-shadow
const root = document.createElement('div'); const root = document.createElement('div');
root.id = 'root'; root.id = 'root';
root.style.visibility = 'hidden'; root.style.visibility = 'hidden';

View File

@ -1,4 +1,3 @@
/* eslint-disable max-len */
import 'pathseg'; import 'pathseg';
import { NS } from '../../../instrumented/svgcanvas/namespaces.js'; import { NS } from '../../../instrumented/svgcanvas/namespaces.js';
@ -174,7 +173,7 @@ describe('utilities bbox', function () {
const rect = { x: 10, y: 10, width: 10, height: 20 }; const rect = { x: 10, y: 10, width: 10, height: 20 };
const angle = 45; const angle = 45;
const origin = { x: 15, y: 20 }; // eslint-disable-line no-shadow const origin = { x: 15, y: 20 };
elem = mockCreateSVGElement({ elem = mockCreateSVGElement({
element: 'rect', element: 'rect',
attr: { id: 'rect2', x: rect.x, y: rect.y, width: rect.width, height: rect.height, transform: 'rotate(' + angle + ' ' + origin.x + ',' + origin.y + ')' } attr: { id: 'rect2', x: rect.x, y: rect.y, width: rect.width, height: rect.height, transform: 'rotate(' + angle + ' ' + origin.x + ',' + origin.y + ')' }
@ -263,7 +262,7 @@ describe('utilities bbox', function () {
const rect = { x: 10, y: 10, width: 10, height: 20 }; const rect = { x: 10, y: 10, width: 10, height: 20 };
const angle = 45; const angle = 45;
const origin = { x: 15, y: 20 }; // eslint-disable-line no-shadow const origin = { x: 15, y: 20 };
tx = 10; // tx right tx = 10; // tx right
ty = 10; // tx down ty = 10; // tx down
txInRotatedSpace = Math.sqrt(tx * tx + ty * ty); // translate in rotated 45 space. txInRotatedSpace = Math.sqrt(tx * tx + ty * ty); // translate in rotated 45 space.
@ -466,7 +465,7 @@ describe('utilities bbox', function () {
* @param {module:math.XYObject} origin * @param {module:math.XYObject} origin
* @returns {module:math.XYObject} * @returns {module:math.XYObject}
*/ */
function rotatePoint (point, angle, origin) { // eslint-disable-line no-shadow function rotatePoint (point, angle, origin) {
if (!origin) { if (!origin) {
origin = { x: 0, y: 0 }; origin = { x: 0, y: 0 };
} }
@ -485,7 +484,7 @@ describe('utilities bbox', function () {
* @param {module:math.XYObject} origin * @param {module:math.XYObject} origin
* @returns {module:utilities.BBoxObject} * @returns {module:utilities.BBoxObject}
*/ */
function rotateRect (rect, angle, origin) { // eslint-disable-line no-shadow function rotateRect (rect, angle, origin) {
const tl = rotatePoint({ x: rect.x, y: rect.y }, angle, origin); const tl = rotatePoint({ x: rect.x, y: rect.y }, angle, origin);
const tr = rotatePoint({ x: rect.x + rect.width, y: rect.y }, angle, origin); const tr = rotatePoint({ x: rect.x + rect.width, y: rect.y }, angle, origin);
const br = rotatePoint({ x: rect.x + rect.width, y: rect.y + rect.height }, angle, origin); const br = rotatePoint({ x: rect.x + rect.width, y: rect.y + rect.height }, angle, origin);

View File

@ -1,4 +1,3 @@
/* eslint-disable max-len */
import * as utilities from '../../../instrumented/svgcanvas/utilities.js'; import * as utilities from '../../../instrumented/svgcanvas/utilities.js';
import { NS } from '../../../instrumented/svgcanvas/namespaces.js'; import { NS } from '../../../instrumented/svgcanvas/namespaces.js';
@ -29,7 +28,6 @@ describe('utilities', function () {
let mockHistorySubCommands = []; let mockHistorySubCommands = [];
const mockHistory = { const mockHistory = {
BatchCommand: class { BatchCommand: class {
// eslint-disable-next-line class-methods-use-this
addSubCommand (cmd) { addSubCommand (cmd) {
mockHistorySubCommands.push(cmd); mockHistorySubCommands.push(cmd);
} }

View File

@ -1,4 +1,3 @@
/* eslint-disable max-len */
import assertionWrapper from './assertion-wrapper.js'; import assertionWrapper from './assertion-wrapper.js';
/** /**

View File

@ -14,7 +14,6 @@ module.exports = {
'screencasts', 'screencasts',
'test' 'test'
], ],
// eslint-disable-next-line max-len
excludePattern: 'svgedit-config-*|build-html.js|rollup*|external/babel-polyfill|extensions/mathjax|imagelib/jquery.min.js|jspdf/jspdf.min.js|jspdf/underscore-min.js|jquery-ui|jquery.min.js|js-hotkeys' excludePattern: 'svgedit-config-*|build-html.js|rollup*|external/babel-polyfill|extensions/mathjax|imagelib/jquery.min.js|jspdf/jspdf.min.js|jspdf/underscore-min.js|jquery-ui|jquery.min.js|js-hotkeys'
}, },
sourceType: 'module', sourceType: 'module',

811
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -73,8 +73,8 @@
"canvg": "3.0.9", "canvg": "3.0.9",
"core-js": "3.19.1", "core-js": "3.19.1",
"elix": "15.0.1", "elix": "15.0.1",
"html2canvas": "1.3.2", "html2canvas": "1.3.3",
"i18next": "21.5.2", "i18next": "21.5.3",
"jspdf": "2.4.0", "jspdf": "2.4.0",
"pathseg": "1.2.1", "pathseg": "1.2.1",
"regenerator-runtime": "0.13.9", "regenerator-runtime": "0.13.9",
@ -102,7 +102,7 @@
"copyfiles": "2.4.1", "copyfiles": "2.4.1",
"core-js-bundle": "3.19.1", "core-js-bundle": "3.19.1",
"cp-cli": "2.0.0", "cp-cli": "2.0.0",
"cypress": "9.0.0", "cypress": "9.1.0",
"cypress-multi-reporters": "1.5.0", "cypress-multi-reporters": "1.5.0",
"cypress-plugin-snapshots": "1.4.4", "cypress-plugin-snapshots": "1.4.4",
"eslint": "^7", "eslint": "^7",
@ -132,10 +132,10 @@
"promise-fs": "2.1.1", "promise-fs": "2.1.1",
"qr-manipulation": "0.7.0", "qr-manipulation": "0.7.0",
"query-result": "1.0.5", "query-result": "1.0.5",
"remark-cli": "10.0.0", "remark-cli": "10.0.1",
"remark-lint-ordered-list-marker-value": "3.1.0", "remark-lint-ordered-list-marker-value": "3.1.0",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"rollup": "2.60.0", "rollup": "2.60.1",
"rollup-plugin-copy": "3.4.0", "rollup-plugin-copy": "3.4.0",
"rollup-plugin-filesize": "9.1.1", "rollup-plugin-filesize": "9.1.1",
"rollup-plugin-node-polyfills": "0.2.1", "rollup-plugin-node-polyfills": "0.2.1",

View File

@ -32,7 +32,6 @@ const extensionDirs = getDirectories('src/editor/extensions');
const dest = [ 'dist/editor' ]; const dest = [ 'dist/editor' ];
// remove existing distribution // remove existing distribution
// eslint-disable-next-line no-console
rimraf('./dist', () => console.info('recreating dist')); rimraf('./dist', () => console.info('recreating dist'));
// config for svgedit core module // config for svgedit core module

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line node/no-unpublished-import
import { mergeDeep } from './components/jgraduate/Util.js'; import { mergeDeep } from './components/jgraduate/Util.js';
/** /**

View File

@ -1,4 +1,3 @@
/* eslint-disable max-len */
/* globals seConfirm seAlert */ /* globals seConfirm seAlert */
/** /**
* The main module for the visual SVG this. * The main module for the visual SVG this.
@ -69,7 +68,6 @@ class Editor extends EditorStartup {
this.docprops = false; this.docprops = false;
this.configObj.preferences = false; this.configObj.preferences = false;
this.canvMenu = null; this.canvMenu = null;
// eslint-disable-next-line max-len
this.goodLangs = [ 'ar', 'cs', 'de', 'en', 'es', 'fa', 'fr', 'fy', 'hi', 'it', 'ja', 'nl', 'pl', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'zh-CN', 'zh-TW' ]; this.goodLangs = [ 'ar', 'cs', 'de', 'en', 'es', 'fa', 'fr', 'fy', 'hi', 'it', 'ja', 'nl', 'pl', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'zh-CN', 'zh-TW' ];
const modKey = (isMac() ? 'meta+' : 'ctrl+'); const modKey = (isMac() ? 'meta+' : 'ctrl+');
this.shortcuts = [ this.shortcuts = [
@ -678,7 +676,6 @@ class Editor extends EditorStartup {
* @returns {void} * @returns {void}
*/ */
setIcon(elem, iconId) { setIcon(elem, iconId) {
// eslint-disable-next-line max-len
const img = document.createElement("img"); const img = document.createElement("img");
img.src = this.configObj.curConfig.imgPath + iconId; img.src = this.configObj.curConfig.imgPath + iconId;
const icon = (typeof iconId === 'string') ? img : iconId.cloneNode(true); const icon = (typeof iconId === 'string') ? img : iconId.cloneNode(true);
@ -829,7 +826,6 @@ class Editor extends EditorStartup {
* *
* @returns {void} * @returns {void}
*/ */
// eslint-disable-next-line class-methods-use-this
hideSourceEditor() { hideSourceEditor() {
const $editorDialog = $id('se-svg-editor-dialog'); const $editorDialog = $id('se-svg-editor-dialog');
$editorDialog.setAttribute('dialog', 'closed'); $editorDialog.setAttribute('dialog', 'closed');
@ -918,7 +914,6 @@ class Editor extends EditorStartup {
* @param {Event} e * @param {Event} e
* @returns {void} * @returns {void}
*/ */
// eslint-disable-next-line class-methods-use-this
onDragEnter(e) { onDragEnter(e) {
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();
@ -930,7 +925,6 @@ class Editor extends EditorStartup {
* @param {Event} e * @param {Event} e
* @returns {void} * @returns {void}
*/ */
// eslint-disable-next-line class-methods-use-this
onDragOver(e) { onDragOver(e) {
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();
@ -941,7 +935,6 @@ class Editor extends EditorStartup {
* @param {Event} e * @param {Event} e
* @returns {void} * @returns {void}
*/ */
// eslint-disable-next-line class-methods-use-this
onDragLeave(e) { onDragLeave(e) {
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();

View File

@ -199,7 +199,6 @@ class MainMenu {
* *
* @returns {void} * @returns {void}
*/ */
// eslint-disable-next-line class-methods-use-this
clickImport() { clickImport() {
/* empty fn */ /* empty fn */
} }
@ -266,7 +265,6 @@ class MainMenu {
* *
* @returns {void} * @returns {void}
*/ */
// eslint-disable-next-line class-methods-use-this
openHomePage() { openHomePage() {
window.open(homePage, "_blank"); window.open(homePage, "_blank");
} }
@ -277,7 +275,6 @@ class MainMenu {
init() { init() {
// add Top panel // add Top panel
const template = document.createElement("template"); const template = document.createElement("template");
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<se-menu id="main_button" label="SVG-Edit" src="logo.svg" alt="logo"> <se-menu id="main_button" label="SVG-Edit" src="logo.svg" alt="logo">
<se-menu-item id="tool_import" label="tools.import_doc" src="importImg.svg"></se-menu-item> <se-menu-item id="tool_import" label="tools.import_doc" src="importImg.svg"></se-menu-item>

View File

@ -70,7 +70,6 @@ class Rulers {
// Bit of a hack to fully clear the canvas in Safari & IE9 // Bit of a hack to fully clear the canvas in Safari & IE9
const $hcanv = $hcanvOrig.cloneNode(true); const $hcanv = $hcanvOrig.cloneNode(true);
// eslint-disable-next-line no-unsanitized/property
$hcanvOrig.replaceWith($hcanv); $hcanvOrig.replaceWith($hcanv);
const hcanv = $hcanv; const hcanv = $hcanv;

View File

@ -1,5 +1,3 @@
/* eslint-disable max-len */
/* eslint-disable no-bitwise */
/** /**
* @external Math * @external Math
*/ */

View File

@ -1,4 +1,3 @@
/* eslint-disable no-bitwise */
import { findPos } from './Util.js'; import { findPos } from './Util.js';
/** /**
* Whether a value is `null` or `undefined`. * Whether a value is `null` or `undefined`.
@ -282,14 +281,14 @@ export default class Slider {
* @param {GenericCallback} callback * @param {GenericCallback} callback
* @returns {void} * @returns {void}
*/ */
function bind (callback) { // eslint-disable-line promise/prefer-await-to-callbacks function bind (callback) {
if (typeof callback === 'function') changeEvents.push(callback); if (typeof callback === 'function') changeEvents.push(callback);
} }
/** /**
* @param {GenericCallback} callback * @param {GenericCallback} callback
* @returns {void} * @returns {void}
*/ */
function unbind (callback) { // eslint-disable-line promise/prefer-await-to-callbacks function unbind (callback) {
if (typeof callback !== 'function') return; if (typeof callback !== 'function') return;
let i; let i;
while ((i = changeEvents.includes(callback))) changeEvents.splice(i, 1); while ((i = changeEvents.includes(callback))) changeEvents.splice(i, 1);

View File

@ -1,5 +1,3 @@
/* eslint-disable no-loop-func */
/* eslint-disable prefer-destructuring */
/* eslint-disable no-unsanitized/property */ /* eslint-disable no-unsanitized/property */
/** /**
* @file jGraduate 0.4 * @file jGraduate 0.4
@ -60,7 +58,6 @@ if (!window.console) {
* @returns {external:jQuery} * @returns {external:jQuery}
*/ */
// export default function jQueryPluginJGraduate ($) { // export default function jQueryPluginJGraduate ($) {
/* eslint-disable jsdoc/require-property */
/** /**
* @namespace {PlainObject} jGraduate * @namespace {PlainObject} jGraduate
* @memberof external:jQuery * @memberof external:jQuery
@ -195,7 +192,6 @@ export function jGraduateMethod (elem, options, okCallback, cancelCallback, i18n
const idref = '#' + $this.getAttribute('id') + ' '; const idref = '#' + $this.getAttribute('id') + ' ';
if (!idref) { if (!idref) {
// eslint-disable-next-line no-alert
alert('Container element must have an id attribute to maintain unique id strings for sub-elements.'); alert('Container element must have an id attribute to maintain unique id strings for sub-elements.');
return; return;
} }
@ -234,7 +230,6 @@ export function jGraduateMethod (elem, options, okCallback, cancelCallback, i18n
$this.paint = new jGraduate.Paint({ solidColor: 'ffffff' }); $this.paint = new jGraduate.Paint({ solidColor: 'ffffff' });
} }
$this.classList.add('jGraduate_Picker'); $this.classList.add('jGraduate_Picker');
// eslint-disable-next-line no-unsanitized/property
$this.innerHTML = `<ul class="jGraduate_tabs"> $this.innerHTML = `<ul class="jGraduate_tabs">
<li class="jGraduate_tab_color jGraduate_tab_current" id="jGraduate_tab_color" data-type="col">${i18next.t('config.jgraduate_solid_color')}</li> <li class="jGraduate_tab_color jGraduate_tab_current" id="jGraduate_tab_color" data-type="col">${i18next.t('config.jgraduate_solid_color')}</li>
<li class="jGraduate_tab_lingrad" id="jGraduate_tab_lingrad" data-type="lg">${i18next.t('config.jgraduate_linear_gradient')}</li> <li class="jGraduate_tab_lingrad" id="jGraduate_tab_lingrad" data-type="lg">${i18next.t('config.jgraduate_linear_gradient')}</li>
@ -244,10 +239,8 @@ export function jGraduateMethod (elem, options, okCallback, cancelCallback, i18n
<div class="jGraduate_gradPick" id="jGraduate_gradPick"></div> <div class="jGraduate_gradPick" id="jGraduate_gradPick"></div>
<div class="jGraduate_LightBox" id="jGraduate_LightBox"></div> <div class="jGraduate_LightBox" id="jGraduate_LightBox"></div>
<div id="${id}_jGraduate_stopPicker" class="jGraduate_stopPicker"></div>`; <div id="${id}_jGraduate_stopPicker" class="jGraduate_stopPicker"></div>`;
/* JFH !!!! */
const colPicker = $this.querySelector('#jGraduate_colPick'); const colPicker = $this.querySelector('#jGraduate_colPick');
const gradPicker = $this.querySelector('#jGraduate_gradPick'); const gradPicker = $this.querySelector('#jGraduate_gradPick');
// eslint-disable-next-line no-unsanitized/property
const html = `<div id="${id}_jGraduate_Swatch" class="jGraduate_Swatch"> const html = `<div id="${id}_jGraduate_Swatch" class="jGraduate_Swatch">
<h2 class="jGraduate_Title">${$settings.window.pickerTitle}</h2> <h2 class="jGraduate_Title">${$settings.window.pickerTitle}</h2>
<div id="${id}_jGraduate_GradContainer" class="jGraduate_GradContainer"></div> <div id="${id}_jGraduate_GradContainer" class="jGraduate_GradContainer"></div>

View File

@ -15,7 +15,6 @@
* John Dyers' website: {@link http://johndyer.name} * John Dyers' website: {@link http://johndyer.name}
* Color Picker page: {@link http://johndyer.name/photoshop-like-javascript-color-picker/} * Color Picker page: {@link http://johndyer.name/photoshop-like-javascript-color-picker/}
*/ */
/* eslint-disable no-bitwise */
/* eslint-disable max-len */ /* eslint-disable max-len */
/* gl#bals svgEditor */ /* gl#bals svgEditor */
import ColorValuePicker from './ColorValuePicker.js'; import ColorValuePicker from './ColorValuePicker.js';
@ -96,7 +95,7 @@ export const jPicker = /** @lends external:jQuery.jPicker */ {
* @param {module:jPicker.JPickerInit} init * @param {module:jPicker.JPickerInit} init
* @returns {external:jQuery.jPicker.Color} * @returns {external:jQuery.jPicker.Color}
*/ */
Color: function (init) { // eslint-disable-line object-shorthand Color: function (init) {
const that = this; const that = this;
/** /**
* *
@ -628,7 +627,6 @@ export function jPickerMethod (elem, options, commitCallback, liveCallback, canc
if (settings.window.expandable) { if (settings.window.expandable) {
const content = document.createElement('span'); const content = document.createElement('span');
content.classList.add('jPicker'); content.classList.add('jPicker');
// eslint-disable-next-line no-unsanitized/property
content.innerHTML = `<span class="Icon" id="jq-ae-Icon"> content.innerHTML = `<span class="Icon" id="jq-ae-Icon">
<span class="Color" id="jq-ae-Color">&nbsp;</span> <span class="Color" id="jq-ae-Color">&nbsp;</span>
<span class="Alpha" id="jq-ae-Alpha">&nbsp;</span> <span class="Alpha" id="jq-ae-Alpha">&nbsp;</span>
@ -1324,7 +1322,6 @@ export function jPickerMethod (elem, options, commitCallback, liveCallback, canc
const all = color.active.val('all'); const all = color.active.val('all');
if (win.alphaPrecision < 0) win.alphaPrecision = 0; if (win.alphaPrecision < 0) win.alphaPrecision = 0;
else if (win.alphaPrecision > 2) win.alphaPrecision = 2; else if (win.alphaPrecision > 2) win.alphaPrecision = 2;
// eslint-disable-next-line no-unsanitized/property
const controlHtml = `<table class="jPicker" id="jPicker-table" cellpadding="0" cellspacing="0"> const controlHtml = `<table class="jPicker" id="jPicker-table" cellpadding="0" cellspacing="0">
<tbody> <tbody>
${win.expandable ? '<tr><td class="Move" colspan="5">&nbsp;</td></tr>' : ''} ${win.expandable ? '<tr><td class="Move" colspan="5">&nbsp;</td></tr>' : ''}

View File

@ -1,7 +1,6 @@
/* globals svgEditor */ /* globals svgEditor */
import { t } from '../locale.js'; import { t } from '../locale.js';
const template = document.createElement('template'); const template = document.createElement('template');
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<style> <style>
:host(:hover) :not(.disabled) :host(:hover) :not(.disabled)
@ -113,7 +112,6 @@ export class ToolButton extends HTMLElement {
} }
break; break;
default: default:
// eslint-disable-next-line no-console
console.error(`unknown attribute: ${name}`); console.error(`unknown attribute: ${name}`);
break; break;
} }

View File

@ -1,11 +1,9 @@
/* globals svgEditor */ /* globals svgEditor */
/* eslint-disable max-len */
import { jGraduate, jGraduateMethod } from './jgraduate/jQuery.jGraduate.js'; import { jGraduate, jGraduateMethod } from './jgraduate/jQuery.jGraduate.js';
import PaintBox from './PaintBox.js'; import PaintBox from './PaintBox.js';
import { t } from '../locale.js'; import { t } from '../locale.js';
const template = document.createElement('template'); const template = document.createElement('template');
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<style> <style>
.jPicker .Icon { .jPicker .Icon {
@ -708,7 +706,6 @@ export class SeColorPicker extends HTMLElement {
this.$label.setAttribute('title', newValue); this.$label.setAttribute('title', newValue);
break; break;
default: default:
// eslint-disable-next-line no-console
console.error(`unknown attribute: ${name}`); console.error(`unknown attribute: ${name}`);
break; break;
} }

View File

@ -169,7 +169,6 @@ export class ExplorerButton extends HTMLElement {
)).join(''); )).join('');
await this.updateLib(lib[0]); await this.updateLib(lib[0]);
} catch (error) { } catch (error) {
// eslint-disable-next-line no-console
console.error(error); console.error(error);
} }
break; break;
@ -177,7 +176,6 @@ export class ExplorerButton extends HTMLElement {
this.$img.setAttribute('src', this.imgPath + '/' + newValue); this.$img.setAttribute('src', this.imgPath + '/' + newValue);
break; break;
default: default:
// eslint-disable-next-line no-console
console.error(`unknown attribute: ${name}`); console.error(`unknown attribute: ${name}`);
break; break;
} }
@ -273,7 +271,6 @@ export class ExplorerButton extends HTMLElement {
} }
break; break;
default: default:
// eslint-disable-next-line no-console
console.error('unknown nodeName for:', ev.target, ev.target.className); console.error('unknown nodeName for:', ev.target, ev.target.className);
} }
}; };
@ -308,7 +305,6 @@ export class ExplorerButton extends HTMLElement {
return `<se-button data-shape="${key}"src="data:image/svg+xml;base64,${encoded}"></se-button>`; return `<se-button data-shape="${key}"src="data:image/svg+xml;base64,${encoded}"></se-button>`;
}).join(''); }).join('');
} catch (error) { } catch (error) {
// eslint-disable-next-line no-console
console.error(`could not read file:${libDir}${lib}.json`, error); console.error(`could not read file:${libDir}${lib}.json`, error);
} }
} }

View File

@ -148,7 +148,6 @@ export class FlyingButton extends HTMLElement {
} }
break; break;
default: default:
// eslint-disable-next-line no-console
console.error(`unknown attribute: ${name}`); console.error(`unknown attribute: ${name}`);
break; break;
} }
@ -270,7 +269,6 @@ export class FlyingButton extends HTMLElement {
} }
break; break;
default: default:
// eslint-disable-next-line no-console
console.error('unkonw nodeName for:', ev.target, ev.target.className); console.error('unkonw nodeName for:', ev.target, ev.target.className);
} }
}; };

View File

@ -88,7 +88,6 @@ export class SEInput extends HTMLElement {
this.$input.value = newValue; this.$input.value = newValue;
break; break;
default: default:
// eslint-disable-next-line no-console
console.error(`unknown attribute: ${name}`); console.error(`unknown attribute: ${name}`);
break; break;
} }

View File

@ -100,7 +100,6 @@ export class SeList extends HTMLElement {
}); });
break; break;
default: default:
// eslint-disable-next-line no-console
console.error(`unknown attribute: ${name}`); console.error(`unknown attribute: ${name}`);
break; break;
} }

View File

@ -70,7 +70,6 @@ export class SeListItem extends HTMLElement {
this.$img.setAttribute('height', newValue); this.$img.setAttribute('height', newValue);
break; break;
default: default:
// eslint-disable-next-line no-console
console.error(`unknown attribute: ${name}`); console.error(`unknown attribute: ${name}`);
break; break;
} }

View File

@ -75,7 +75,6 @@ export class SeMenu extends HTMLElement {
this.$label.prepend(newValue); this.$label.prepend(newValue);
break; break;
default: default:
// eslint-disable-next-line no-console
console.error(`unknown attribute: ${name}`); console.error(`unknown attribute: ${name}`);
break; break;
} }

View File

@ -59,7 +59,6 @@ export class SeMenuItem extends HTMLElement {
this.$label.textContent = `${t(newValue)} ${shortcut ? `(${shortcut})` : ''}`; this.$label.textContent = `${t(newValue)} ${shortcut ? `(${shortcut})` : ''}`;
break; break;
default: default:
// eslint-disable-next-line no-console
console.error(`unknown attribute: ${name}`); console.error(`unknown attribute: ${name}`);
break; break;
} }

View File

@ -14,7 +14,6 @@ const palette = [
]; ];
const template = document.createElement('template'); const template = document.createElement('template');
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<style> <style>
.square { .square {

View File

@ -101,7 +101,6 @@ export class SeSelect extends HTMLElement {
} }
break; break;
default: default:
// eslint-disable-next-line no-console
console.error(`unknown attribute: ${name}`); console.error(`unknown attribute: ${name}`);
break; break;
} }

View File

@ -122,7 +122,6 @@ export class SESpinInput extends HTMLElement {
this.$input.value = newValue; this.$input.value = newValue;
break; break;
default: default:
// eslint-disable-next-line no-console
console.error(`unknown attribute: ${name}`); console.error(`unknown attribute: ${name}`);
break; break;
} }

View File

@ -1,6 +1,5 @@
import { t } from '../locale.js'; import { t } from '../locale.js';
const template = document.createElement('template'); const template = document.createElement('template');
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<style> <style>
#layersLabel { #layersLabel {
@ -60,7 +59,6 @@ export class SeText extends HTMLElement {
//this.$div.setAttribute("value", newValue); //this.$div.setAttribute("value", newValue);
break; break;
default: default:
// eslint-disable-next-line no-console
console.error(`unknown attribute: ${name}`); console.error(`unknown attribute: ${name}`);
break; break;
} }

View File

@ -1,5 +1,4 @@
const template = document.createElement('template'); const template = document.createElement('template');
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<style> <style>
.contextMenu { .contextMenu {

View File

@ -1,5 +1,4 @@
const template = document.createElement('template'); const template = document.createElement('template');
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<style> <style>
.contextMenu { .contextMenu {

View File

@ -1,5 +1,4 @@
const template = document.createElement('template'); const template = document.createElement('template');
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<style> <style>
:not(:defined) { :not(:defined) {
@ -563,7 +562,6 @@ export class SeEditPrefsDialog extends HTMLElement {
const newdiv = document.createElement('div'); const newdiv = document.createElement('div');
if (e === 'chessboard') { if (e === 'chessboard') {
newdiv.dataset.bgColor = e; newdiv.dataset.bgColor = e;
// eslint-disable-next-line max-len
newdiv.style.backgroundImage = 'url(data:image/gif;base64,R0lGODlhEAAQAIAAAP///9bW1iH5BAAAAAAALAAAAAAQABAAAAIfjG+gq4jM3IFLJgpswNly/XkcBpIiVaInlLJr9FZWAQA7)'; newdiv.style.backgroundImage = 'url(data:image/gif;base64,R0lGODlhEAAQAIAAAP///9bW1iH5BAAAAAAALAAAAAAQABAAAAIfjG+gq4jM3IFLJgpswNly/XkcBpIiVaInlLJr9FZWAQA7)';
newdiv.classList.add('color_block'); newdiv.classList.add('color_block');
} else { } else {

View File

@ -1,7 +1,6 @@
import './se-elix/define/NumberSpinBox.js'; import './se-elix/define/NumberSpinBox.js';
const template = document.createElement('template'); const template = document.createElement('template');
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<style> <style>

View File

@ -1,7 +1,6 @@
import { isValidUnit } from '../../common/units.js'; import { isValidUnit } from '../../common/units.js';
const template = document.createElement('template'); const template = document.createElement('template');
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<style> <style>
:not(:defined) { :not(:defined) {

View File

@ -1,4 +1,3 @@
/* eslint-disable class-methods-use-this */
import { import {
defaultState, defaultState,
setState, setState,

View File

@ -42,7 +42,6 @@ export class SePromptDialog extends HTMLElement {
} }
break; break;
default: default:
// eslint-disable-next-line no-console
console.error('unknown attr for:', name, 'newValue =', newValue); console.error('unknown attr for:', name, 'newValue =', newValue);
break; break;
} }

View File

@ -1,5 +1,4 @@
const template = document.createElement('template'); const template = document.createElement('template');
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<style> <style>
:not(:defined) { :not(:defined) {

View File

@ -17,9 +17,7 @@ const loadExtensionTranslation = async function (svgEditor) {
// eslint-disable-next-line no-unsanitized/method // eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/${lang}.js`); translationModule = await import(`./locale/${lang}.js`);
} catch (_error) { } catch (_error) {
// eslint-disable-next-line no-console
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`); console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
// eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/en.js`); translationModule = await import(`./locale/en.js`);
} }
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default); svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);
@ -84,7 +82,6 @@ export default {
// Add the button and its handler(s) // Add the button and its handler(s)
const title = `${name}:buttons.0.title`; const title = `${name}:buttons.0.title`;
const key = `${name}:buttons.0.key`; const key = `${name}:buttons.0.key`;
// eslint-disable-next-line no-unsanitized/property
const buttonTemplate = ` const buttonTemplate = `
<se-button id="tool_eyedropper" title="${title}" src="eye_dropper.svg" shortcut=${key}></se-button> <se-button id="tool_eyedropper" title="${title}" src="eye_dropper.svg" shortcut=${key}></se-button>
`; `;

View File

@ -16,9 +16,7 @@ const loadExtensionTranslation = async function (svgEditor) {
// eslint-disable-next-line no-unsanitized/method // eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/${lang}.js`); translationModule = await import(`./locale/${lang}.js`);
} catch (_error) { } catch (_error) {
// eslint-disable-next-line no-console
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`); console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
// eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/en.js`); translationModule = await import(`./locale/en.js`);
} }
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default); svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);

View File

@ -22,9 +22,7 @@ const loadExtensionTranslation = async function (svgEditor) {
// eslint-disable-next-line no-unsanitized/method // eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/${lang}.js`); translationModule = await import(`./locale/${lang}.js`);
} catch (_error) { } catch (_error) {
// eslint-disable-next-line no-console
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`); console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
// eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/en.js`); translationModule = await import(`./locale/en.js`);
} }
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default); svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);

View File

@ -18,9 +18,7 @@ const loadExtensionTranslation = async function (svgEditor) {
// eslint-disable-next-line no-unsanitized/method // eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/${lang}.js`); translationModule = await import(`./locale/${lang}.js`);
} catch (_error) { } catch (_error) {
// eslint-disable-next-line no-console
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`); console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
// eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/en.js`); translationModule = await import(`./locale/en.js`);
} }
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default); svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);
@ -380,7 +378,6 @@ export default {
if (!preview) { if (!preview) {
preview = document.createElement('div'); preview = document.createElement('div');
preview.setAttribute('id', 'imglib_preview'); preview.setAttribute('id', 'imglib_preview');
// eslint-disable-next-line max-len
preview.setAttribute('style', `position: absolute;top: 45px;right: 10px;width: 180px;bottom: 45px;background: #fff;overflow: auto;`); preview.setAttribute('style', `position: absolute;top: 45px;right: 10px;width: 180px;bottom: 45px;background: #fff;overflow: auto;`);
insertAfter($id('lib_framewrap'), preview); insertAfter($id('lib_framewrap'), preview);
@ -431,7 +428,6 @@ export default {
header.setAttribute('style', `position: absolute;top: 0px;left: 0px;width: 100%;`); header.setAttribute('style', `position: absolute;top: 0px;left: 0px;width: 100%;`);
const button = document.createElement('button'); const button = document.createElement('button');
// eslint-disable-next-line max-len
button.innerHTML = svgEditor.i18next.t('common.cancel'); button.innerHTML = svgEditor.i18next.t('common.cancel');
browser.appendChild(button); browser.appendChild(button);
button.addEventListener('click', function () { button.addEventListener('click', function () {
@ -448,7 +444,6 @@ export default {
const back = document.createElement('button'); const back = document.createElement('button');
back.style.visibility = "hidden"; back.style.visibility = "hidden";
// eslint-disable-next-line max-len
back.innerHTML = `<img class="svg_icon" src="${imgPath}/library.svg" alt="icon" width="16" height="16" />` + svgEditor.i18next.t(`${name}:show_list`); back.innerHTML = `<img class="svg_icon" src="${imgPath}/library.svg" alt="icon" width="16" height="16" />` + svgEditor.i18next.t(`${name}:show_list`);
leftBlock.appendChild(back); leftBlock.appendChild(back);
back.addEventListener('click', function () { back.addEventListener('click', function () {

View File

@ -43,7 +43,6 @@ Array.prototype.forEach.call(atags, function (aEle) {
} else { } else {
fetch(href) fetch(href)
.then( (r) => r.text()) .then( (r) => r.text())
// eslint-disable-next-line promise/always-return
.then( (data) => { .then( (data) => {
post({ href, data }); post({ href, data });
return data; return data;

View File

@ -7,7 +7,7 @@ manipulation($, jml);
const baseAPIURL = 'https://openclipart.org/search/json/'; const baseAPIURL = 'https://openclipart.org/search/json/';
const jsVoid = 'javascript: void(0);'; // eslint-disable-line no-script-url const jsVoid = 'javascript: void(0);';
/** /**
* Shows results after query submission. * Shows results after query submission.

View File

@ -27,9 +27,7 @@ const loadExtensionTranslation = async function (svgEditor) {
// eslint-disable-next-line no-unsanitized/method // eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/${lang}.js`); translationModule = await import(`./locale/${lang}.js`);
} catch (_error) { } catch (_error) {
// eslint-disable-next-line no-console
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`); console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
// eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/en.js`); translationModule = await import(`./locale/en.js`);
} }
svgEditor.i18next.addResourceBundle(lang, 'translation', translationModule.default, true, true); svgEditor.i18next.addResourceBundle(lang, 'translation', translationModule.default, true, true);
@ -159,7 +157,6 @@ export default {
name: svgEditor.i18next.t(`${name}:name`), name: svgEditor.i18next.t(`${name}:name`),
// The callback should be used to load the DOM with the appropriate UI items // The callback should be used to load the DOM with the appropriate UI items
callback() { callback() {
// eslint-disable-next-line no-unsanitized/property
const buttonTemplate = ` const buttonTemplate = `
<se-menu-item id="tool_clear" label="opensave.new_doc" shortcut="N" src="new.svg"></se-menu-item>`; <se-menu-item id="tool_clear" label="opensave.new_doc" shortcut="N" src="new.svg"></se-menu-item>`;
svgCanvas.insertChildAtIndex($id('main_button'), buttonTemplate, 0); svgCanvas.insertChildAtIndex($id('main_button'), buttonTemplate, 0);

View File

@ -1,4 +1,3 @@
/* eslint-disable max-len */
/** /**
* @file ext-overview_window.js * @file ext-overview_window.js
* *
@ -31,7 +30,6 @@ export default {
'</div>' + '</div>' +
'</div>' + '</div>' +
'</div>'; '</div>';
// eslint-disable-next-line no-unsanitized/method
$id("sidepanel_content").insertAdjacentHTML( 'beforeend', propsWindowHtml ); $id("sidepanel_content").insertAdjacentHTML( 'beforeend', propsWindowHtml );
// Define dynamic animation of the view box. // Define dynamic animation of the view box.

View File

@ -19,9 +19,7 @@ const loadExtensionTranslation = async function (svgEditor) {
// eslint-disable-next-line no-unsanitized/method // eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/${lang}.js`); translationModule = await import(`./locale/${lang}.js`);
} catch (_error) { } catch (_error) {
// eslint-disable-next-line no-console
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`); console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
// eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/en.js`); translationModule = await import(`./locale/en.js`);
} }
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default); svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);

View File

@ -17,9 +17,7 @@ const loadExtensionTranslation = async function (svgEditor) {
// eslint-disable-next-line no-unsanitized/method // eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/${lang}.js`); translationModule = await import(`./locale/${lang}.js`);
} catch (_error) { } catch (_error) {
// eslint-disable-next-line no-console
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`); console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
// eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/en.js`); translationModule = await import(`./locale/en.js`);
} }
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default); svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);
@ -83,7 +81,6 @@ export default {
const fbtitle = `${name}:title`; const fbtitle = `${name}:title`;
const title_star = `${name}:buttons.0.title`; const title_star = `${name}:buttons.0.title`;
const title_polygon = `${name}:buttons.1.title`; const title_polygon = `${name}:buttons.1.title`;
// eslint-disable-next-line no-unsanitized/property
const buttonTemplate = ` const buttonTemplate = `
<se-flyingbutton id="tools_polygon" title="${fbtitle}"> <se-flyingbutton id="tools_polygon" title="${fbtitle}">
<se-button id="tool_star" title="${title_star}" src="star.svg"> <se-button id="tool_star" title="${title_star}" src="star.svg">

View File

@ -15,9 +15,7 @@ const loadExtensionTranslation = async function (svgEditor) {
// eslint-disable-next-line no-unsanitized/method // eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/${lang}.js`); translationModule = await import(`./locale/${lang}.js`);
} catch (_error) { } catch (_error) {
// eslint-disable-next-line no-console
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`); console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
// eslint-disable-next-line no-unsanitized/method
translationModule = await import(`./locale/en.js`); translationModule = await import(`./locale/en.js`);
} }
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default); svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);
@ -43,7 +41,6 @@ export default {
return { return {
callback () { callback () {
if ($id('tool_shapelib') === null) { if ($id('tool_shapelib') === null) {
// eslint-disable-next-line no-unsanitized/property
const buttonTemplate = ` const buttonTemplate = `
<se-explorerbutton id="tool_shapelib" title="${svgEditor.i18next.t(`${name}:buttons.0.title`)}" lib="./extensions/ext-shapes/shapelib/" <se-explorerbutton id="tool_shapelib" title="${svgEditor.i18next.t(`${name}:buttons.0.title`)}" lib="./extensions/ext-shapes/shapelib/"
src="shapelib.svg"></se-explorerbutton> src="shapelib.svg"></se-explorerbutton>

View File

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const template = document.createElement('template'); const template = document.createElement('template');
template.innerHTML = ` template.innerHTML = `
<style> <style>

View File

@ -165,7 +165,6 @@ class BottomPanel {
const template = document.createElement('template'); const template = document.createElement('template');
const { i18next } = this.editor; const { i18next } = this.editor;
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<div id="tools_bottom"> <div id="tools_bottom">
<!-- Zoom buttons --> <!-- Zoom buttons -->

View File

@ -1,4 +1,3 @@
/* eslint-disable no-alert */
import SvgCanvas from "../../svgcanvas/svgcanvas.js"; import SvgCanvas from "../../svgcanvas/svgcanvas.js";
const { $id } = SvgCanvas; const { $id } = SvgCanvas;
@ -45,7 +44,6 @@ class LayersPanel {
const template = document.createElement("template"); const template = document.createElement("template");
const { i18next } = this.editor; const { i18next } = this.editor;
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<div id="sidepanels"> <div id="sidepanels">
<se-text id="sidepanel_handle" title="ui.panel_action" text="ui.panel"></se-text> <se-text id="sidepanel_handle" title="ui.panel_action" text="ui.panel"></se-text>

View File

@ -25,7 +25,6 @@ class LeftPanel {
* @param {string|Element} button The DOM element or string selector representing the toolbar button * @param {string|Element} button The DOM element or string selector representing the toolbar button
* @returns {boolean} Whether the button was disabled or not * @returns {boolean} Whether the button was disabled or not
*/ */
// eslint-disable-next-line class-methods-use-this
updateLeftPanel(button) { updateLeftPanel(button) {
if (button.disabled) return false; if (button.disabled) return false;
// remove the pressed state on other(s) button(s) // remove the pressed state on other(s) button(s)

View File

@ -150,7 +150,6 @@ class TopPanel {
promptImgURL({ cancelDeletes = false } = {}) { promptImgURL({ cancelDeletes = false } = {}) {
let curhref = this.editor.svgCanvas.getHref(this.editor.selectedElement); let curhref = this.editor.svgCanvas.getHref(this.editor.selectedElement);
curhref = curhref.startsWith("data:") ? "" : curhref; curhref = curhref.startsWith("data:") ? "" : curhref;
// eslint-disable-next-line no-alert
const url = prompt( const url = prompt(
this.editor.i18next.t('notification.enterNewImgURL'), this.editor.i18next.t('notification.enterNewImgURL'),
curhref curhref
@ -263,7 +262,6 @@ class TopPanel {
} else { } else {
const point = this.path.getNodePoint(); const point = this.path.getNodePoint();
$id("tool_add_subpath").pressed = false; $id("tool_add_subpath").pressed = false;
// eslint-disable-next-line max-len
(!this.path.canDeleteNodes) ? $id("tool_node_delete").classList.add("disabled") : $id("tool_node_delete").classList.remove("disabled"); (!this.path.canDeleteNodes) ? $id("tool_node_delete").classList.add("disabled") : $id("tool_node_delete").classList.remove("disabled");
// Show open/close button based on selected point // Show open/close button based on selected point
@ -517,7 +515,6 @@ class TopPanel {
*/ */
changeRotationAngle(e) { changeRotationAngle(e) {
this.editor.svgCanvas.setRotationAngle(e.target.value); this.editor.svgCanvas.setRotationAngle(e.target.value);
// eslint-disable-next-line max-len
(Number.parseInt(e.target.value) === 0) ? $id("tool_reorient").classList.add("disabled") : $id("tool_reorient").classList.remove("disabled"); (Number.parseInt(e.target.value) === 0) ? $id("tool_reorient").classList.add("disabled") : $id("tool_reorient").classList.remove("disabled");
} }
@ -580,7 +577,6 @@ class TopPanel {
if (!valid) { if (!valid) {
e.target.value = this.selectedElement.getAttribute(attr); e.target.value = this.selectedElement.getAttribute(attr);
// eslint-disable-next-line no-alert
alert(this.editor.i18next.t('notification.invalidAttrValGiven')); alert(this.editor.i18next.t('notification.invalidAttrValGiven'));
return false; return false;
} }
@ -640,7 +636,6 @@ class TopPanel {
*/ */
makeHyperlink() { makeHyperlink() {
if (this.editor.selectedElement || this.multiselected) { if (this.editor.selectedElement || this.multiselected) {
// eslint-disable-next-line no-alert
const url = prompt( const url = prompt(
this.editor.i18next.t('notification.enterNewLinkURL'), this.editor.i18next.t('notification.enterNewLinkURL'),
"http://" "http://"
@ -827,7 +822,6 @@ class TopPanel {
// add Top panel // add Top panel
const template = document.createElement("template"); const template = document.createElement("template");
const { i18next } = this.editor; const { i18next } = this.editor;
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = ` template.innerHTML = `
<div id="tools_top"> <div id="tools_top">
<div id="editor_panel"> <div id="editor_panel">

View File

@ -119,7 +119,7 @@ export const addToSelectionMethod = function (elemsToAdd, showGrips) {
selectedElements.sort(function (a, b) { selectedElements.sort(function (a, b) {
if (a && b && a.compareDocumentPosition) { if (a && b && a.compareDocumentPosition) {
return 3 - (b.compareDocumentPosition(a) & 6); // eslint-disable-line no-bitwise return 3 - (b.compareDocumentPosition(a) & 6);
} }
if (!a) { if (!a) {
return 1; return 1;

View File

@ -18,7 +18,6 @@ import {
init as pasteInit, pasteElementsMethod init as pasteInit, pasteElementsMethod
} from './paste-elem.js'; } from './paste-elem.js';
// eslint-disable-next-line no-duplicate-imports
import { import {
identifyLayers, createLayer, cloneLayer, deleteCurrentLayer, identifyLayers, createLayer, cloneLayer, deleteCurrentLayer,
setCurrentLayer, renameCurrentLayer, setCurrentLayerPosition, setCurrentLayer, renameCurrentLayer, setCurrentLayerPosition,

View File

@ -222,7 +222,6 @@ export const changeSelectedAttributeNoUndoMethod = function (attr, newValue, ele
// that are not in the selectedElements array, we need to only request a // that are not in the selectedElements array, we need to only request a
// selector if the element is in that array // selector if the element is in that array
if (selectedElements.includes(elem)) { if (selectedElements.includes(elem)) {
// eslint-disable-next-line no-loop-func
setTimeout(function () { setTimeout(function () {
// Due to element replacement, this element may no longer // Due to element replacement, this element may no longer
// be part of the DOM // be part of the DOM