fix eslint issues

master
JFH 2020-07-14 12:56:33 +02:00
parent 01418b44f3
commit 09c786abe9
188 changed files with 179 additions and 21 deletions

View File

@ -5,30 +5,27 @@ coverage
instrumented
dist
docs/jsdoc
archive
svgedit-config-es.js
svgedit-config-iife.js
svgedit-custom.css
editor/xdomain-svgedit-config-iife.js
src/editor/xdomain-svgedit-config-iife.js
# Vendor/minified files
editor/jquery.min.js
editor/jquery-ui
src/editor/jquery.min.js
src/editor/jquery-ui
# Previously minified though exporting
editor/js-hotkeys
src/editor/js-hotkeys
editor/jspdf/jspdf.min.js
editor/jspdf/underscore-min.js
src/editor/jspdf/jspdf.min.js
src/editor/jspdf/underscore-min.js
editor/extensions/mathjax
src/editor/extensions/mathjax
# Todo: We should at least check `compat/compat` in our other files, however
editor/external/*
!editor/external/dom-polyfill
editor/external/dom-polyfill/*
!editor/external/dom-polyfill/dom-polyfill.js
!editor/external/dynamic-import-polyfill
src/external
mochawesome-report
releases

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 500 B

View File

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -1,3 +1,4 @@
/* eslint-disable import/unambiguous */
/* globals SVGPathSeg, SVGPathSegMovetoRel, SVGPathSegMovetoAbs,
SVGPathSegMovetoRel, SVGPathSegLinetoRel, SVGPathSegLinetoAbs,
SVGPathSegLinetoHorizontalRel, SVGPathSegLinetoHorizontalAbs,

View File

@ -10,7 +10,7 @@
*/
import RGBColor from './rgbcolor.js';
import {canvasRGBA} from '../external/stackblur-canvas/dist/stackblur-es.js';
import {canvasRGBA} from '../../external/stackblur-canvas/dist/stackblur-es.js';
/**
* Whether a value is `null` or `undefined`.

View File

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

View File

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

View File

@ -1,3 +1,4 @@
/* eslint-disable import/no-anonymous-default-export */
/**
* @file ext-closepath.js
*
@ -6,7 +7,7 @@
* @copyright 2010 Jeff Schiller
*
*/
import '../svgpathseg.js';
import '../../common/svgpathseg.js';
// This extension adds a simple button to the contextual panel for paths
// The button toggles whether the path is open or closed
@ -14,6 +15,7 @@ export default {
name: 'closepath',
async init ({importLocale, $}) {
const strings = await importLocale();
// eslint-disable-next-line consistent-this
const svgEditor = this;
let selElems;
const updateButton = function (path) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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