- Linting: Fix .eslintrc.js overrides to point to new paths (and avoid need for inline disabling--except import/no-namespace)

This commit is contained in:
Brett Zamir
2020-07-18 18:31:34 +08:00
parent e560784961
commit 0fc64b4912
138 changed files with 18257 additions and 19842 deletions

View File

@@ -32,7 +32,7 @@ module.exports = {
// Locales have no need for importing outside of SVG-Edit // Locales have no need for importing outside of SVG-Edit
{ {
files: [ files: [
'editor/locale/lang.*.js', 'editor/extensions/ext-locale/**', 'src/editor/locale/lang.*.js', 'src/editor/extensions/ext-locale/**',
'docs/tutorials/ExtensionDocs.md' 'docs/tutorials/ExtensionDocs.md'
], ],
rules: { rules: {
@@ -42,18 +42,20 @@ module.exports = {
// These browser files don't do importing or requiring // These browser files don't do importing or requiring
{ {
files: [ files: [
'editor/svgpathseg.js', 'editor/touch.js', 'editor/typedefs.js', 'src/editor/svgpathseg.js',
'editor/redirect-on-no-module-support.js', 'src/editor/touch.js',
'editor/extensions/imagelib/index.js', 'src/editor/typedefs.js',
'editor/external/dom-polyfill/dom-polyfill.js', 'src/editor/redirect-on-no-module-support.js',
'screencasts/svgopen2010/script.js' 'src/editor/extensions/imagelib/index.js',
'src/editor/external/dom-polyfill/dom-polyfill.js',
'docs/screencasts/svgopen2010/script.js'
], ],
rules: { rules: {
'import/unambiguous': ['off'] 'import/unambiguous': ['off']
} }
}, },
{ {
files: ['**/*.html', 'screencasts/**'], files: ['**/*.html', 'docs/screencasts/**'],
globals: { globals: {
root: 'off' root: 'off'
}, },
@@ -119,7 +121,7 @@ module.exports = {
// Dis-apply Node rules mistakenly giving errors with browser files, // Dis-apply Node rules mistakenly giving errors with browser files,
// and treating Node global `root` as being present for shadowing // and treating Node global `root` as being present for shadowing
{ {
files: ['editor/**'], files: ['src/editor/**'],
globals: { globals: {
root: 'off' root: 'off'
}, },
@@ -184,7 +186,7 @@ module.exports = {
// descriptive `svgEditor`; they also have no need for importing outside // descriptive `svgEditor`; they also have no need for importing outside
// of SVG-Edit // of SVG-Edit
{ {
files: ['editor/extensions/**'], files: ['src/editor/extensions/**'],
settings: { settings: {
polyfills: [ polyfills: [
'console', 'console',
@@ -244,7 +246,7 @@ module.exports = {
}, },
{ {
// Should probably have as external, but should still check // Should probably have as external, but should still check
files: ['canvg/rgbcolor.js'], files: ['src/editor/canvg/rgbcolor.js'],
settings: { settings: {
polyfills: [ polyfills: [
'Number.isNaN', 'Number.isNaN',

View File

@@ -101,7 +101,6 @@ iframe[0].src = frameBase + framePath +
: ''); // Append arguments to this file onto the iframe : ''); // Append arguments to this file onto the iframe
iframe[0].addEventListener('load', function () { iframe[0].addEventListener('load', function () {
// eslint-disable-next-line node/no-unsupported-features/node-builtins
svgCanvas = new EmbeddedSVGEdit(frame, [new URL(frameBase).origin]); svgCanvas = new EmbeddedSVGEdit(frame, [new URL(frameBase).origin]);
// Hide main button, as we will be controlling new, load, save, etc. from the host document // Hide main button, as we will be controlling new, load, save, etc. from the host document
let doc; let doc;

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-arrows.js * @file ext-arrows.js
* *
@@ -12,7 +11,6 @@ export default {
name: 'arrows', name: 'arrows',
async init (S) { async init (S) {
const strings = await S.importLocale(); const strings = await S.importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;
const // {svgcontent} = S, const // {svgcontent} = S,

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-closepath.js * @file ext-closepath.js
* *
@@ -15,7 +14,6 @@ export default {
name: 'closepath', name: 'closepath',
async init ({importLocale, $}) { async init ({importLocale, $}) {
const strings = await importLocale(); const strings = await importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
let selElems; let selElems;
const updateButton = function (path) { const updateButton = function (path) {

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/* eslint-disable unicorn/no-fn-reference-in-iterator */ /* eslint-disable unicorn/no-fn-reference-in-iterator */
/** /**
* @file ext-connector.js * @file ext-connector.js
@@ -12,7 +11,6 @@
export default { export default {
name: 'connector', name: 'connector',
async init (S) { async init (S) {
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;
const {getElem} = svgCanvas; const {getElem} = svgCanvas;

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-eyedropper.js * @file ext-eyedropper.js
* *
@@ -12,7 +11,6 @@ export default {
name: 'eyedropper', name: 'eyedropper',
async init (S) { async init (S) {
const strings = await S.importLocale(); const strings = await S.importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const {$, ChangeElementCommand} = S, // , svgcontent, const {$, ChangeElementCommand} = S, // , svgcontent,
// svgdoc = S.svgroot.parentNode.ownerDocument, // svgdoc = S.svgroot.parentNode.ownerDocument,

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-foreignobject.js * @file ext-foreignobject.js
* *
@@ -11,7 +10,6 @@
export default { export default {
name: 'foreignobject', name: 'foreignobject',
async init (S) { async init (S) {
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const {$, text2xml, NS, importLocale} = S; const {$, text2xml, NS, importLocale} = S;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-grid.js * @file ext-grid.js
* *
@@ -12,7 +11,6 @@ export default {
name: 'grid', name: 'grid',
async init ({$, NS, getTypeMap, importLocale}) { async init ({$, NS, getTypeMap, importLocale}) {
const strings = await importLocale(); const strings = await importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;
const svgdoc = document.getElementById('svgcanvas').ownerDocument, const svgdoc = document.getElementById('svgcanvas').ownerDocument,

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-helloworld.js * @file ext-helloworld.js
* *
@@ -18,7 +17,6 @@ export default {
async init ({$, importLocale}) { async init ({$, importLocale}) {
// See `/editor/extensions/ext-locale/helloworld/` // See `/editor/extensions/ext-locale/helloworld/`
const strings = await importLocale(); const strings = await importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;
return { return {

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-imagelib.js * @file ext-imagelib.js
* *
@@ -16,7 +15,6 @@ export default {
!window.svgEditor || !window.svgEditor ||
window.svgEditor.modules !== false; window.svgEditor.modules !== false;
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const {uiStrings, canvas: svgCanvas, curConfig: {extIconsPath}} = svgEditor; const {uiStrings, canvas: svgCanvas, curConfig: {extIconsPath}} = svgEditor;
@@ -39,7 +37,6 @@ export default {
}); });
const allowedImageLibOrigins = imagelibStrings.imgLibs.map(({url}) => { const allowedImageLibOrigins = imagelibStrings.imgLibs.map(({url}) => {
try { try {
// eslint-disable-next-line node/no-unsupported-features/node-builtins
return new URL(url).origin; return new URL(url).origin;
} catch (err) { } catch (err) {
return location.origin; return location.origin;

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'Arrows', name: 'Arrows',
langList: [ langList: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'Arrows', name: 'Arrows',
langList: [ langList: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: '箭头', name: '箭头',
langList: [ langList: [

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
name: 'ClosePath', name: 'ClosePath',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
name: '闭合路径', name: '闭合路径',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'Connector', name: 'Connector',
langList: [ langList: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'Connector', name: 'Connector',
langList: [ langList: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: '连接器', name: '连接器',
langList: [ langList: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'eyedropper', name: 'eyedropper',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: '滴管', name: '滴管',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'foreignObject', name: 'foreignObject',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: '外部对象', name: '外部对象',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'View Grid', name: 'View Grid',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: '网格视图', name: '网格视图',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'Hello World', name: 'Hello World',
text: 'Hello World!\n\nYou clicked here: {x}, {y}', text: 'Hello World!\n\nYou clicked here: {x}, {y}',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'Hello World', name: 'Hello World',
text: 'Hello World!\n\n 请点击: {x}, {y}', text: 'Hello World!\n\n 请点击: {x}, {y}',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
select_lib: 'Select an image library', select_lib: 'Select an image library',
show_list: 'Show library list', show_list: 'Show library list',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
select_lib: 'Select an image library', select_lib: 'Select an image library',
show_list: 'Show library list', show_list: 'Show library list',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
select_lib: "Choisir une bibliothèque d'images", select_lib: "Choisir une bibliothèque d'images",
show_list: 'show_list', show_list: 'show_list',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
select_lib: 'Select an image library', select_lib: 'Select an image library',
show_list: 'Show library list', show_list: 'Show library list',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
select_lib: 'Select an image library', select_lib: 'Select an image library',
show_list: 'Show library list', show_list: 'Show library list',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
select_lib: 'Select an image library', select_lib: 'Select an image library',
show_list: 'Show library list', show_list: 'Show library list',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
select_lib: 'Select an image library', select_lib: 'Select an image library',
show_list: 'Show library list', show_list: 'Show library list',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
select_lib: 'Select an image library', select_lib: 'Select an image library',
show_list: 'Show library list', show_list: 'Show library list',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
select_lib: 'Select an image library', select_lib: 'Select an image library',
show_list: 'Show library list', show_list: 'Show library list',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'Markers', name: 'Markers',
langList: [ langList: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: '标记', name: '标记',
langList: [ langList: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'MathJax', name: 'MathJax',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: '数学', name: '数学',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'Extension Panning', name: 'Extension Panning',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: '移动', name: '移动',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'placemark', name: 'placemark',
langList: [ langList: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'polygon', name: 'polygon',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: '多边形', name: '多边形',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
saved: 'Saved! Return to Item View!', saved: 'Saved! Return to Item View!',
hiddenframe: 'Moinsave frame to store hidden values' hiddenframe: 'Moinsave frame to store hidden values'

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
saved: '已保存! 返回视图!', saved: '已保存! 返回视图!',
hiddenframe: 'Moinsave frame to store hidden values' hiddenframe: 'Moinsave frame to store hidden values'

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
uploading: 'Uploading...', uploading: 'Uploading...',
hiddenframe: 'Opensave frame to store hidden values' hiddenframe: 'Opensave frame to store hidden values'

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
uploading: '正在上传...', uploading: '正在上传...',
hiddenframe: 'Opensave frame to store hidden values' hiddenframe: 'Opensave frame to store hidden values'

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
loading: 'Loading...', loading: 'Loading...',
categories: { categories: {

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
loading: 'Loading...', loading: 'Loading...',
categories: { categories: {

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
loading: '正在加载...', loading: '正在加载...',
categories: { categories: {

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'star', name: 'star',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: '星形', name: '星形',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
message: 'Standardmäßig kann SVG-Edit Ihre Editor-Einstellungen ' + message: 'Standardmäßig kann SVG-Edit Ihre Editor-Einstellungen ' +
'und die SVG-Inhalte lokal auf Ihrem Gerät abspeichern. So brauchen Sie ' + 'und die SVG-Inhalte lokal auf Ihrem Gerät abspeichern. So brauchen Sie ' +

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
message: 'By default and where supported, SVG-Edit can store your editor ' + message: 'By default and where supported, SVG-Edit can store your editor ' +
'preferences and SVG content locally on your machine so you do not ' + 'preferences and SVG content locally on your machine so you do not ' +

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
message: "Par défaut et si supporté, SVG-Edit peut stocker les préférences de l'éditeur " + message: "Par défaut et si supporté, SVG-Edit peut stocker les préférences de l'éditeur " +
"et le contenu SVG localement sur votre machine de sorte que vous n'ayez pas besoin de les " + "et le contenu SVG localement sur votre machine de sorte que vous n'ayez pas besoin de les " +

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
message: '默认情况下, SVG-Edit 在本地保存配置参数和画布内容. 如果基于隐私考虑, ' + message: '默认情况下, SVG-Edit 在本地保存配置参数和画布内容. 如果基于隐私考虑, ' +
'您可以勾选以下选项修改配置.', '您可以勾选以下选项修改配置.',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'WebAppFind', name: 'WebAppFind',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
export default { export default {
name: 'WebAppFind', name: 'WebAppFind',
buttons: [ buttons: [

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-markers.js * @file ext-markers.js
* *
@@ -33,7 +32,6 @@ export default {
name: 'markers', name: 'markers',
async init (S) { async init (S) {
const strings = await S.importLocale(); const strings = await S.importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const {$} = S; const {$} = S;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/* globals MathJax */ /* globals MathJax */
/** /**
* @file ext-mathjax.js * @file ext-mathjax.js
@@ -15,7 +14,6 @@ export default {
name: 'mathjax', name: 'mathjax',
async init ({$, importLocale}) { async init ({$, importLocale}) {
const strings = await importLocale(); const strings = await importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-overview_window.js * @file ext-overview_window.js
* *

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-panning.js * @file ext-panning.js
* *
@@ -14,7 +13,6 @@ export default {
name: 'panning', name: 'panning',
async init ({importLocale}) { async init ({importLocale}) {
const strings = await importLocale(); const strings = await importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;
const buttons = [{ const buttons = [{

View File

@@ -1,11 +1,9 @@
/* eslint-disable import/no-anonymous-default-export */
// TODO: Might add support for "exportImage" custom // TODO: Might add support for "exportImage" custom
// handler as in "ext-server_opensave.js" (and in savefile.php) // handler as in "ext-server_opensave.js" (and in savefile.php)
export default { export default {
name: 'php_savefile', name: 'php_savefile',
init ({$}) { init ({$}) {
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const { const {
curConfig: {extPath}, curConfig: {extPath},

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-placemark.js * @file ext-placemark.js
* *
@@ -9,7 +8,6 @@
export default { export default {
name: 'placemark', name: 'placemark',
async init (S) { async init (S) {
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;
const addElem = svgCanvas.addSVGElementFromJson; const addElem = svgCanvas.addSVGElementFromJson;

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-polygon.js * @file ext-polygon.js
* *
@@ -9,7 +8,6 @@
export default { export default {
name: 'polygon', name: 'polygon',
async init (S) { async init (S) {
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;
const {$, importLocale} = S, // {svgcontent} const {$, importLocale} = S, // {svgcontent}

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-server_moinsave.js * @file ext-server_moinsave.js
* *
@@ -14,7 +13,6 @@ export default {
name: 'server_moinsave', name: 'server_moinsave',
async init ({$, encode64, importLocale}) { async init ({$, encode64, importLocale}) {
const strings = await importLocale(); const strings = await importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;
const saveSvgAction = '/+modify'; const saveSvgAction = '/+modify';
@@ -30,7 +28,6 @@ export default {
svgEditor.setCustomHandlers({ svgEditor.setCustomHandlers({
async save (win, data) { async save (win, data) {
const svg = '<?xml version="1.0"?>\n' + data; const svg = '<?xml version="1.0"?>\n' + data;
// eslint-disable-next-line node/no-unsupported-features/node-builtins
const {pathname} = new URL(location); const {pathname} = new URL(location);
const name = pathname.replace(/\/+get\//, ''); const name = pathname.replace(/\/+get\//, '');
const svgData = encode64(svg); const svgData = encode64(svg);

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-server_opensave.js * @file ext-server_opensave.js
* *
@@ -13,7 +12,6 @@ export default {
name: 'server_opensave', name: 'server_opensave',
async init ({$, decode64, encode64, importLocale}) { async init ({$, decode64, encode64, importLocale}) {
const strings = await importLocale(); const strings = await importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const { const {
curConfig: { curConfig: {

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-shapes.js * @file ext-shapes.js
* *
@@ -11,7 +10,6 @@ export default {
name: 'shapes', name: 'shapes',
async init ({$, importLocale}) { async init ({$, importLocale}) {
const strings = await importLocale(); const strings = await importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const canv = svgEditor.canvas; const canv = svgEditor.canvas;
const svgroot = canv.getRootElem(); const svgroot = canv.getRootElem();

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-star.js * @file ext-star.js
* *
@@ -9,7 +8,6 @@
export default { export default {
name: 'star', name: 'star',
async init (S) { async init (S) {
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* @file ext-storage.js * @file ext-storage.js
* *
@@ -23,7 +22,6 @@
export default { export default {
name: 'storage', name: 'storage',
init ({$}) { init ({$}) {
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;
@@ -168,7 +166,6 @@ export default {
return { return {
name: 'storage', name: 'storage',
async langReady ({importLocale}) { async langReady ({importLocale}) {
// eslint-disable-next-line node/no-unsupported-features/node-builtins
const storagePrompt = new URL(top.location).searchParams.get('storagePrompt'); const storagePrompt = new URL(top.location).searchParams.get('storagePrompt');
const confirmSetStorage = await importLocale(); const confirmSetStorage = await importLocale();

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* Depends on Firefox add-on and executables from * Depends on Firefox add-on and executables from
* {@link https://github.com/brettz9/webappfind}. * {@link https://github.com/brettz9/webappfind}.
@@ -11,7 +10,6 @@ export default {
name: 'webappfind', name: 'webappfind',
async init ({importLocale, $}) { async init ({importLocale, $}) {
const strings = await importLocale(); const strings = await importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const saveMessage = 'save', const saveMessage = 'save',
readMessage = 'read', readMessage = 'read',

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/no-anonymous-default-export */
/** /**
* Should not be needed for same domain control (just call via child frame), * Should not be needed for same domain control (just call via child frame),
* but an API common for cross-domain and same domain use can be found * but an API common for cross-domain and same domain use can be found
@@ -7,7 +6,6 @@
export default { export default {
name: 'xdomain-messaging', name: 'xdomain-messaging',
init () { init () {
// eslint-disable-next-line consistent-this
const svgEditor = this; const svgEditor = this;
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;
try { try {

View File

@@ -1,4 +1,3 @@
/* eslint-disable import/unambiguous */
/* globals jQuery */ /* globals jQuery */
const $ = jQuery; const $ = jQuery;
$('a').click(function () { $('a').click(function () {

View File

@@ -248,7 +248,6 @@ jml('div', [
id: 'openclipart', id: 'openclipart',
$custom: { $custom: {
async $submit () { async $submit () {
// eslint-disable-next-line node/no-unsupported-features/node-builtins
const url = new URL(baseAPIURL); const url = new URL(baseAPIURL);
[ [
'query', 'sort', 'amount', 'page', 'byids' 'query', 'sort', 'amount', 'page', 'byids'

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'af', lang: 'af',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'ar', lang: 'ar',
dir: 'rtl', dir: 'rtl',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'az', lang: 'az',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'be', lang: 'be',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'bg', lang: 'bg',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'ca', lang: 'ca',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'cs', lang: 'cs',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'cy', lang: 'cy',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'da', lang: 'da',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'de', lang: 'de',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'el', lang: 'el',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'en', lang: 'en',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'es', lang: 'es',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'et', lang: 'et',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'fa', lang: 'fa',
dir: 'rtl', dir: 'rtl',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'fi', lang: 'fi',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'fr', lang: 'fr',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'fy', lang: 'fy',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'ga', lang: 'ga',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'gl', lang: 'gl',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'he', lang: 'he',
dir: 'rtl', dir: 'rtl',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'hi', lang: 'hi',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'hr', lang: 'hr',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'hu', lang: 'hu',
dir: 'ltr', dir: 'ltr',

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
lang: 'hy', lang: 'hy',
dir: 'ltr', dir: 'ltr',

Some files were not shown because too many files have changed in this diff Show More