dependencies update and fix lint unused disabled line
This commit is contained in:
@@ -17,9 +17,7 @@ const loadExtensionTranslation = async function (svgEditor) {
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/${lang}.js`);
|
||||
} catch (_error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/en.js`);
|
||||
}
|
||||
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);
|
||||
@@ -84,7 +82,6 @@ export default {
|
||||
// Add the button and its handler(s)
|
||||
const title = `${name}:buttons.0.title`;
|
||||
const key = `${name}:buttons.0.key`;
|
||||
// eslint-disable-next-line no-unsanitized/property
|
||||
const buttonTemplate = `
|
||||
<se-button id="tool_eyedropper" title="${title}" src="eye_dropper.svg" shortcut=${key}></se-button>
|
||||
`;
|
||||
|
||||
@@ -16,9 +16,7 @@ const loadExtensionTranslation = async function (svgEditor) {
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/${lang}.js`);
|
||||
} catch (_error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/en.js`);
|
||||
}
|
||||
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);
|
||||
|
||||
@@ -22,9 +22,7 @@ const loadExtensionTranslation = async function (svgEditor) {
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/${lang}.js`);
|
||||
} catch (_error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/en.js`);
|
||||
}
|
||||
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);
|
||||
|
||||
@@ -18,9 +18,7 @@ const loadExtensionTranslation = async function (svgEditor) {
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/${lang}.js`);
|
||||
} catch (_error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/en.js`);
|
||||
}
|
||||
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);
|
||||
@@ -380,7 +378,6 @@ export default {
|
||||
if (!preview) {
|
||||
preview = document.createElement('div');
|
||||
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;`);
|
||||
insertAfter($id('lib_framewrap'), preview);
|
||||
|
||||
@@ -431,7 +428,6 @@ export default {
|
||||
header.setAttribute('style', `position: absolute;top: 0px;left: 0px;width: 100%;`);
|
||||
|
||||
const button = document.createElement('button');
|
||||
// eslint-disable-next-line max-len
|
||||
button.innerHTML = svgEditor.i18next.t('common.cancel');
|
||||
browser.appendChild(button);
|
||||
button.addEventListener('click', function () {
|
||||
@@ -448,7 +444,6 @@ export default {
|
||||
|
||||
const back = document.createElement('button');
|
||||
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`);
|
||||
leftBlock.appendChild(back);
|
||||
back.addEventListener('click', function () {
|
||||
|
||||
@@ -43,7 +43,6 @@ Array.prototype.forEach.call(atags, function (aEle) {
|
||||
} else {
|
||||
fetch(href)
|
||||
.then( (r) => r.text())
|
||||
// eslint-disable-next-line promise/always-return
|
||||
.then( (data) => {
|
||||
post({ href, data });
|
||||
return data;
|
||||
|
||||
@@ -7,7 +7,7 @@ manipulation($, jml);
|
||||
|
||||
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.
|
||||
|
||||
@@ -27,9 +27,7 @@ const loadExtensionTranslation = async function (svgEditor) {
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/${lang}.js`);
|
||||
} catch (_error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/en.js`);
|
||||
}
|
||||
svgEditor.i18next.addResourceBundle(lang, 'translation', translationModule.default, true, true);
|
||||
@@ -159,7 +157,6 @@ export default {
|
||||
name: svgEditor.i18next.t(`${name}:name`),
|
||||
// The callback should be used to load the DOM with the appropriate UI items
|
||||
callback() {
|
||||
// eslint-disable-next-line no-unsanitized/property
|
||||
const buttonTemplate = `
|
||||
<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);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable max-len */
|
||||
/**
|
||||
* @file ext-overview_window.js
|
||||
*
|
||||
@@ -31,7 +30,6 @@ export default {
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
$id("sidepanel_content").insertAdjacentHTML( 'beforeend', propsWindowHtml );
|
||||
|
||||
// Define dynamic animation of the view box.
|
||||
|
||||
@@ -19,9 +19,7 @@ const loadExtensionTranslation = async function (svgEditor) {
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/${lang}.js`);
|
||||
} catch (_error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/en.js`);
|
||||
}
|
||||
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);
|
||||
|
||||
@@ -17,9 +17,7 @@ const loadExtensionTranslation = async function (svgEditor) {
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/${lang}.js`);
|
||||
} catch (_error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/en.js`);
|
||||
}
|
||||
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);
|
||||
@@ -83,7 +81,6 @@ export default {
|
||||
const fbtitle = `${name}:title`;
|
||||
const title_star = `${name}:buttons.0.title`;
|
||||
const title_polygon = `${name}:buttons.1.title`;
|
||||
// eslint-disable-next-line no-unsanitized/property
|
||||
const buttonTemplate = `
|
||||
<se-flyingbutton id="tools_polygon" title="${fbtitle}">
|
||||
<se-button id="tool_star" title="${title_star}" src="star.svg">
|
||||
|
||||
@@ -15,9 +15,7 @@ const loadExtensionTranslation = async function (svgEditor) {
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/${lang}.js`);
|
||||
} catch (_error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`Missing translation (${lang}) for ${name} - using 'en'`);
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
translationModule = await import(`./locale/en.js`);
|
||||
}
|
||||
svgEditor.i18next.addResourceBundle(lang, name, translationModule.default);
|
||||
@@ -43,7 +41,6 @@ export default {
|
||||
return {
|
||||
callback () {
|
||||
if ($id('tool_shapelib') === null) {
|
||||
// eslint-disable-next-line no-unsanitized/property
|
||||
const buttonTemplate = `
|
||||
<se-explorerbutton id="tool_shapelib" title="${svgEditor.i18next.t(`${name}:buttons.0.title`)}" lib="./extensions/ext-shapes/shapelib/"
|
||||
src="shapelib.svg"></se-explorerbutton>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable max-len */
|
||||
const template = document.createElement('template');
|
||||
template.innerHTML = `
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user