upgrade and fix associated issues

master
JFH 2021-02-14 19:14:59 +01:00
parent 116a86138f
commit da87bae1ee
12 changed files with 3048 additions and 3329 deletions

View File

@ -1,10 +1,19 @@
'use strict';
"use strict";
module.exports = {
extends: ['ash-nazg/sauron-node'],
extends: [
"plugin:compat/recommended",
"plugin:node/recommended",
"plugin:no-unsanitized/DOM",
"plugin:promise/recommended",
"plugin:import/errors",
"plugin:markdown/recommended",
"plugin:sonarjs/recommended"
],
plugins: ["jsdoc", "promise", "html", "import", "sonarjs"],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module'
sourceType: "module"
},
env: {
browser: true,
@ -15,123 +24,85 @@ module.exports = {
// These are the primary polyfills needed by regular users if
// not present, e.g., with core-js-bundle; also those under
// extensions
// 'Array.isArray',
// 'Blob',
// 'console',
// 'CustomEvent',
// 'document.body',
// 'document.createElementNS',
// 'document.evaluate',
// 'document.head',
// 'document.importNode',
// 'document.querySelector',
// 'document.querySelectorAll',
// 'DOMParser',
// 'Error',
'fetch',
// 'FileReader',
// 'JSON',
// 'KeyboardEvent',
// 'location.href',
// 'location.origin',
// 'MouseEvent',
// 'MutationObserver',
// 'navigator',
// 'Number.isNaN',
// 'Number.parseFloat',
// 'Number.parseInt',
// 'Object.assign',
// 'Object.defineProperty',
// 'Object.defineProperties',
// 'Object.entries',
// 'Object.getOwnPropertyDescriptor',
// 'Object.keys',
// 'Object.values',
'Promise',
'Promise.all',
"fetch",
"Promise",
"Promise.all",
// 'Set',
'Uint8Array',
'URL'
// 'URL.createObjectURL',
// 'XMLSerializer',
// 'XMLHttpRequest',
// 'window.getComputedStyle',
// 'window.parent',
// 'window.scrollX',
// 'window.scrollY'
"Uint8Array",
"URL"
]
},
rules: {
// check-examples is not picking up eslint config properly in some
// environments; see also discussion above
// `mocha-cleanup/no-assertions-outside-it`
'jsdoc/check-examples': ['warn', {
rejectExampleCodeRegex: '^`',
checkDefaults: true,
checkParams: true,
checkProperties: true
}],
"sonarjs/cognitive-complexity": 0,
"sonarjs/no-duplicate-string": 0,
"sonarjs/no-collapsible-if": 0,
"sonarjs/no-small-switch": 0,
"sonarjs/no-identical-functions": 0,
"sonarjs/no-duplicated-branches": 0,
// https://github.com/sindresorhus/eslint-plugin-unicorn/issues/453
'unicorn/regex-shorthand': 0,
"jsdoc/check-examples": [
"warn",
{
rejectExampleCodeRegex: "^`",
checkDefaults: true,
checkParams: true,
checkProperties: true
}
],
// The Babel transform seems to have a problem converting these
'prefer-named-capture-group': 'off',
'jsdoc/require-file-overview': ['error', {
tags: {
file: {
initialCommentsOnly: true,
preventDuplicates: true
},
license: {
initialCommentsOnly: true,
preventDuplicates: true
},
copyright: {
initialCommentsOnly: true,
preventDuplicates: true
},
author: {
initialCommentsOnly: true,
preventDuplicates: true
},
module: {
initialCommentsOnly: true,
preventDuplicates: true
},
exports: {
initialCommentsOnly: true,
preventDuplicates: true
"prefer-named-capture-group": "off",
"jsdoc/require-file-overview": [
"error",
{
tags: {
file: {
initialCommentsOnly: true,
preventDuplicates: true
},
license: {
initialCommentsOnly: true,
preventDuplicates: true
},
copyright: {
initialCommentsOnly: true,
preventDuplicates: true
},
author: {
initialCommentsOnly: true,
preventDuplicates: true
},
module: {
initialCommentsOnly: true,
preventDuplicates: true
},
exports: {
initialCommentsOnly: true,
preventDuplicates: true
}
}
}
}],
],
// Warning or Off for now but should be reviewed
// Override these rules which are difficult for us
// to apply at this time
'unicorn/prefer-string-slice': 'off',
'default-case': 'off',
'require-unicode-regexp': 'off',
'max-len':
[
'warn',
{ignoreComments: true, code: 130}
], // 130 is too much but too many occurences
'unicorn/prefer-query-selector': 'off',
'unicorn/no-fn-reference-in-iterator': 'off',
'unicorn/prefer-node-append': 'off',
'unicorn/no-zero-fractions': 'off',
'unicorn/prefer-number-properties': 'off',
'eslint-comments/require-description': 'off',
'compat/compat': 'error',
'consistent-this': 'off',
'import/no-anonymous-default-export': 'off',
'node/no-unsupported-features/node-builtins': 'warn',
'prefer-exponentiation-operator': 'warn',
'node/no-unsupported-features/es-syntax': 'off',
'no-unsanitized/method': [
'error',
"default-case": "off",
"require-unicode-regexp": "off",
"max-len": ["warn", { ignoreComments: true, code: 130 }], // 130 is too much but too many occurences
"eslint-comments/require-description": "off",
"compat/compat": "error",
"consistent-this": "off",
"import/no-anonymous-default-export": "off",
"node/no-unsupported-features/node-builtins": "warn",
"prefer-exponentiation-operator": "warn",
"node/no-unsupported-features/es-syntax": "off",
"no-unsanitized/method": [
"error",
{
escape: {
methods: ['encodeURIComponent', 'encodeURI']
methods: ["encodeURIComponent", "encodeURI"]
}
}
]
@ -141,147 +112,104 @@ module.exports = {
// and translations may need a longer line length
{
files: [
'src/editor/locale/lang.*.js', 'src/editor/extensions/*/locale/**',
'docs/tutorials/ExtensionDocs.md'
'src/editor/locale/lang.*.js',
'src/editor/extensions/*/locale/**',
'docs/tutorials/ExtensionDocs.md/*.js'
],
rules: {
'import/no-anonymous-default-export': 'off',
'max-len': 'off'
"import/no-anonymous-default-export": "off",
"max-len": "off",
"node/no-missing-import": "off",
"import/no-unresolved": "off"
}
},
// These browser files don't do importing or requiring
{
files: [
'src/editor/touch.js',
'src/editor/typedefs.js',
'src/editor/redirect-on-no-module-support.js',
'src/editor/extensions/ext-imagelib/index.js',
'screencasts/svgopen2010/script.js'
"src/editor/touch.js",
"src/editor/typedefs.js",
"src/editor/redirect-on-no-module-support.js",
"src/editor/extensions/ext-imagelib/index.js",
"screencasts/svgopen2010/script.js"
],
rules: {
'import/unambiguous': ['off']
"import/unambiguous": ["off"]
}
},
{
files: ['**/*.html', 'screencasts/**'],
files: ["**/*.html", "screencasts/**"],
globals: {
root: 'off'
root: "off"
},
settings: {
polyfills: [
'document.querySelector',
'history',
'history.pushState',
'history.replaceState',
'location.hash',
'navigator',
'Number.parseFloat',
'Number.parseInt',
'Number.isNaN'
"document.querySelector",
"history",
"history.pushState",
"history.replaceState",
"location.hash",
"navigator",
"Number.parseFloat",
"Number.parseInt",
"Number.isNaN"
]
},
rules: {
'import/unambiguous': 'off'
}
},
{
files: ['.eslintrc.js', '.ncurc.js', 'tools/mochawesome-cli.js'],
extends: [
'ash-nazg/sauron-node-script'
]
},
// Our Markdown rules (and used for JSDoc examples as well, by way of
// our use of `jsdoc/check-examples` within `ash-nazg`)
{
files: ['**/*.md'],
settings: {
polyfills: [
// Tutorials
'console',
'location.href'
]
},
rules: {
// Todo: Figure out why this is not enough to disable warning
// for examples in my environment (but it is in others')
// Used in examples of assert-close.js plugin
'mocha-cleanup/no-assertions-outside-it': 'off',
'eslint-comments/no-unused-disable': 'warn',
'eol-last': ['off'],
'no-console': ['off'],
'no-undef': ['off'],
'no-unused-vars': ['warn'],
'padded-blocks': ['off'],
'import/unambiguous': ['off'],
'import/no-unresolved': ['off'],
'node/no-missing-import': ['off'],
'no-multi-spaces': 'off',
'sonarjs/no-all-duplicated-branches': 'off',
'node/no-unpublished-import': ['error', {
allowModules: ['@cypress/fiddle']
}],
'no-alert': 'off',
// Disable until may fix https://github.com/gajus/eslint-plugin-jsdoc/issues/211
indent: 'off'
"import/unambiguous": "off"
}
},
{
// As consumed by jsdoc, cannot be expressed as ESM
files: ['docs/jsdoc-config.js'],
files: ["docs/jsdoc-config.js"],
parserOptions: {
sourceType: 'script'
sourceType: "script"
},
globals: {
module: false
},
rules: {
'import/no-commonjs': 'off',
strict: 'off'
"import/no-commonjs": "off",
strict: "off"
}
},
{
files: ['cypress/plugins/index.js'],
files: ["cypress/**"],
extends: [
'ash-nazg/sauron-node-script'
]
},
{
files: ['cypress/**'],
extends: [
'plugin:cypress/recommended',
'plugin:mocha/recommended',
'plugin:mocha-cleanup/recommended-no-limits',
'plugin:@fintechstudios/chai-as-promised/recommended',
'plugin:chai-expect-keywords/recommended',
'plugin:chai-expect/recommended',
'plugin:chai-friendly/recommended'
"plugin:cypress/recommended",
"plugin:mocha/recommended",
"plugin:mocha-cleanup/recommended-no-limits",
"plugin:@fintechstudios/chai-as-promised/recommended",
"plugin:chai-expect-keywords/recommended",
"plugin:chai-expect/recommended",
"plugin:chai-friendly/recommended"
],
env: {
node: true
},
settings: {
polyfills: [
'console',
'Date.now',
'document.body',
'document.createElementNS',
'document.head',
'DOMParser',
'Number.isNaN',
'Object.keys',
'Object.entries',
'Promise'
"console",
"Date.now",
"document.body",
"document.createElementNS",
"document.head",
"DOMParser",
"Number.isNaN",
"Object.keys",
"Object.entries",
"Promise"
]
},
rules: {
// These errors are caused in Cypress files if user has not
// yet instrumented code; need to reinvestigate why we had to
// instrument separately from nyc mocha
'import/no-unresolved': ['error', {ignore: ['/instrumented/']}],
'node/no-missing-import': 'off',
'jsdoc/check-examples': 'off',
'chai-expect-keywords/no-unsupported-keywords': [
'error', {
"import/no-unresolved": ["error", { ignore: ["/instrumented/"] }],
"node/no-missing-import": "off",
"jsdoc/check-examples": "off",
"chai-expect-keywords/no-unsupported-keywords": [
"error",
{
allowChaiDOM: true
}
],
@ -291,50 +219,51 @@ module.exports = {
// Good but would be difficult to enforce (and data-* may not be less
// brittle than IDs/classes anyways)
// 'cypress/require-data-selectors': 0,
'cypress/assertion-before-screenshot': 2,
"cypress/assertion-before-screenshot": 2,
// Conflicts with Cypress `should`
'mocha-cleanup/invalid-assertions': 0,
"mocha-cleanup/invalid-assertions": 0,
// Might see about working around to avoid the option limitation,
// but convenient
'mocha-cleanup/no-expressions-in-assertions': ['error', {
replacementsOnly: true
}],
"mocha-cleanup/no-expressions-in-assertions": [
"error",
{
replacementsOnly: true
}
],
// Too oppressive when planning to extend a section
'mocha/no-hooks-for-single-case': 0,
"mocha/no-hooks-for-single-case": 0,
// Would be good to enable but needs some refactoring
'mocha/no-setup-in-describe': 0,
'mocha-cleanup/no-outside-declaration': 0,
"mocha/no-setup-in-describe": 0,
"mocha-cleanup/no-outside-declaration": 0,
// Useful to ensure allowing `this.timeout()`, etc., but a
// little oppressive
'mocha/no-mocha-arrows': 0,
"mocha/no-mocha-arrows": 0,
// Useful if enabling the regular `prefer-arrow-callback`
// 'mocha/prefer-arrow-callback': 2
'jsdoc/require-jsdoc': 0,
'no-console': 0,
'import/unambiguous': 0
"jsdoc/require-jsdoc": 0,
"no-console": 0,
"import/unambiguous": 0
}
},
{
// Node files
files: [
'docs/jsdoc-config.js',
'build/build-html.js',
'rollup.config.js', 'rollup-config.config.js'
"docs/jsdoc-config.js",
"build/build-html.js",
"rollup.config.js",
"rollup-config.config.js"
],
env: {
node: true
},
settings: {
polyfills: [
'console',
'Promise.resolve'
]
polyfills: ["console", "Promise.resolve"]
},
globals: {
require: true
@ -344,7 +273,7 @@ module.exports = {
// and we have too many modules to add to `peerDependencies`
// so this rule can know them to be available, so we instead
// disable
'node/no-unpublished-import': 'off'
"node/no-unpublished-import": "off"
}
}
]

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="421" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="green" stroke="#000" d="M0 0h120v20H0zM120 0h102v20H120zM222 0h87v20h-87zM309 0h112v20H309z"/><path fill="url(#smooth)" d="M0 0h421v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Statements 52.79%</text><text class="high" x="5" y="14">Statements 52.79%</text><text class="shadow" x="125.5" y="15">Branches 41.6%</text><text class="high" x="125" y="14">Branches 41.6%</text><text class="shadow" x="227.5" y="15">Lines 53.61%</text><text class="high" x="227" y="14">Lines 53.61%</text><text class="shadow" x="314.5" y="15">Functions 60.18%</text><text class="high" x="314" y="14">Functions 60.18%</text></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="428" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="green" stroke="#000" d="M0 0h120v20H0zM120 0h109v20H120zM229 0h87v20h-87zM316 0h112v20H316z"/><path fill="url(#smooth)" d="M0 0h428v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Statements 52.81%</text><text class="high" x="5" y="14">Statements 52.81%</text><text class="shadow" x="125.5" y="15">Branches 41.64%</text><text class="high" x="125" y="14">Branches 41.64%</text><text class="shadow" x="234.5" y="15">Lines 53.62%</text><text class="high" x="234" y="14">Lines 53.62%</text><text class="shadow" x="321.5" y="15">Functions 60.18%</text><text class="high" x="321" y="14">Functions 60.18%</text></g></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="97" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="#696969" d="M0 0h41v20H0z"/><path fill="#4c1" d="M41 0h56v20H41z"/><path fill="url(#smooth)" d="M0 0h97v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Tests</text><text class="high" x="5" y="14">Tests</text><text class="shadow" x="46.5" y="15">141/141</text><text class="high" x="46" y="14">141/141</text></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="97" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="#696969" d="M0 0h41v20H0z"/><path fill="#e05d44" d="M41 0h56v20H41z"/><path fill="url(#smooth)" d="M0 0h97v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Tests</text><text class="high" x="5" y="14">Tests</text><text class="shadow" x="46.5" y="15">140/141</text><text class="high" x="46" y="14">140/141</text></g></svg>

Before

Width:  |  Height:  |  Size: 820 B

After

Width:  |  Height:  |  Size: 823 B

View File

@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}

5900
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -136,73 +136,72 @@
"dependencies": {
"@babel/polyfill": "7.12.1",
"canvg": "3.0.7",
"core-js": "3.7.0",
"jspdf": "2.1.1",
"core-js": "3.8.3",
"jspdf": "2.3.0",
"pathseg": "1.2.0",
"regenerator-runtime": "0.13.7",
"svg2pdf.js": "2.0.0"
"svg2pdf.js": "2.1.0"
},
"devDependencies": {
"@babel/core": "7.12.3",
"@babel/preset-env": "7.12.1",
"@babel/register": "7.12.1",
"@babel/runtime-corejs3": "7.12.5",
"@cypress/code-coverage": "3.8.3",
"@cypress/fiddle": "1.18.4",
"@babel/core": "7.12.16",
"@babel/preset-env": "7.12.16",
"@babel/register": "7.12.13",
"@babel/runtime-corejs3": "7.12.13",
"@cypress/code-coverage": "3.9.2",
"@cypress/fiddle": "1.19.2",
"@fintechstudios/eslint-plugin-chai-as-promised": "3.0.2",
"@hkdobrev/run-if-changed": "0.3.1",
"@mysticatea/eslint-plugin": "13.0.0",
"@rollup/plugin-babel": "5.2.1",
"@rollup/plugin-babel": "5.3.0",
"@rollup/plugin-commonjs": "15.1.0",
"@rollup/plugin-dynamic-import-vars": "1.1.0",
"@rollup/plugin-node-resolve": "9.0.0",
"@rollup/plugin-dynamic-import-vars": "1.1.1",
"@rollup/plugin-node-resolve": "11.2.0",
"@rollup/plugin-replace": "2.3.4",
"@rollup/plugin-url": "5.0.1",
"axe-core": "4.0.2",
"@rollup/plugin-url": "6.0.0",
"axe-core": "4.1.2",
"babel-plugin-transform-object-rest-spread": "7.0.0-beta.3",
"copyfiles": "2.4.0",
"core-js-bundle": "3.7.0",
"copyfiles": "2.4.1",
"core-js-bundle": "3.8.3",
"coveradge": "0.6.0",
"cp-cli": "2.0.0",
"cross-var": "1.1.0",
"cypress": "5.5.0",
"cypress-axe": "0.10.0",
"cypress": "6.4.0",
"cypress-axe": "0.12.1",
"cypress-multi-reporters": "1.4.0",
"cypress-plugin-snapshots": "1.4.4",
"deparam": "git+https://github.com/brettz9/deparam.git#updates",
"es-dev-commonjs-transformer": "0.2.0",
"es-dev-server": "1.57.8",
"es-dev-server": "2.1.0",
"es-dev-server-rollup": "0.0.8",
"eslint": "7.13.0",
"eslint-config-ash-nazg": "22.10.0",
"eslint-config-standard": "16.0.1",
"eslint": "^7.20.0",
"eslint-config-standard": "16.0.2",
"eslint-plugin-array-func": "3.1.7",
"eslint-plugin-chai-expect": "2.2.0",
"eslint-plugin-chai-expect-keywords": "2.0.1",
"eslint-plugin-chai-expect-keywords": "2.1.0",
"eslint-plugin-chai-friendly": "0.6.0",
"eslint-plugin-compat": "3.8.0",
"eslint-plugin-compat": "^3.9.0",
"eslint-plugin-cypress": "2.11.2",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-html": "6.1.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.7.7",
"eslint-plugin-markdown": "1.0.2",
"eslint-plugin-html": "^6.1.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^31.6.1",
"eslint-plugin-markdown": "^2.0.0-rc.2",
"eslint-plugin-mocha": "8.0.0",
"eslint-plugin-mocha-cleanup": "1.9.1",
"eslint-plugin-no-unsanitized": "3.1.4",
"eslint-plugin-no-unsanitized": "^3.1.4",
"eslint-plugin-no-use-extend-native": "0.5.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-sonarjs": "0.5.0",
"eslint-plugin-standard": "4.0.2",
"eslint-plugin-unicorn": "23.0.0",
"husky": "4.3.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-standard": "4.1.0",
"eslint-plugin-unicorn": "28.0.0",
"husky": "5.0.9",
"imageoptim-cli": "3.0.2",
"jamilih": "0.53.2",
"jsdoc": "3.6.6",
"license-badger": "0.18.0",
"lint-staged": "10.5.1",
"mocha": "8.2.1",
"lint-staged": "10.5.4",
"mocha": "8.3.0",
"mocha-badge-generator": "0.9.0",
"mochawesome": "6.2.1",
"mochawesome-merge": "4.2.0",
@ -218,16 +217,16 @@
"remark-lint-ordered-list-marker-value": "2.0.1",
"requirejs": "2.3.6",
"rimraf": "3.0.2",
"rollup": "2.33.1",
"rollup": "2.39.0",
"rollup-plugin-copy": "3.3.0",
"rollup-plugin-filesize": "9.0.2",
"rollup-plugin-filesize": "9.1.0",
"rollup-plugin-node-polyfills": "0.2.1",
"rollup-plugin-progress": "1.1.2",
"rollup-plugin-re": "1.0.7",
"rollup-plugin-terser": "7.0.2",
"stackblur-canvas": "2.4.0",
"systemjs": "6.7.1",
"typescript": "4.0.5",
"underscore": "1.11.0"
"systemjs": "6.8.3",
"typescript": "4.1.5",
"underscore": "1.12.0"
}
}

View File

@ -111,8 +111,10 @@ svgCanvas.setSvgString('string');
svgCanvas.setSvgString('string')(function (data, error) {
if (error) {
// There was an error
throw error
} else {
// Handle data
console.log(data)
}
});

View File

@ -2753,12 +2753,10 @@ editor.init = () => {
* @returns {external:jQuery}
*/
const makeFlyoutHolder = function (id, child) {
const div = $('<div>', {
return $('<div>', {
class: 'tools_flyout',
id
}).appendTo('#svg_editor').append(child);
return div;
};
/**

View File

@ -165,7 +165,6 @@ export const convertPath = function (pth, toRel) {
}
d += pathDSegment(letter, [[x1, y1], [x, y]]);
break;
// eslint-disable-next-line sonarjs/no-duplicated-branches
case 10: // absolute elliptical arc (A)
x -= curx;
y -= cury;

View File

@ -77,7 +77,7 @@ export const setLinkControlPoints = function (lcp) {
* @type {null|module:path.Path}
* @memberof module:path
*/
export let path = null; // eslint-disable-line import/no-mutable-exports
export let path = null;
let editorContext_ = null;

View File

@ -2701,7 +2701,7 @@ class SvgCanvas {
* @returns {module:svgcanvas.PrivateMethods}
*/
this.getPrivateMethods = function () {
const obj = {
return {
addCommandToHistory,
BatchCommand,
ChangeElementCommand,
@ -2731,7 +2731,6 @@ class SvgCanvas {
transformPoint,
walkTree
};
return obj;
};
} // End constructor
} // End class

View File

@ -4,9 +4,6 @@
// Todo: Show /test (i.e., `unit.js`) test results at beginning?
// See https://github.com/jsdoc/jsdoc/issues/1750 to create such tags
/* eslint "jsdoc/check-tag-names": ["error", {definedTags: ["cli-arg"]}] --
we want a custom tag */
/**
* @file A CLI reporter against after-the-fact compiled (merged Mochawesome)
* Mocha results.
@ -23,7 +20,6 @@ const reporterFile = process.argv[2]
const path = '../mochawesome.json';
// eslint-disable-next-line import/no-dynamic-require -- Allow CLI to change
const MochaReporter = require(`mocha/lib/reporters/${reporterFile}.js`);
const Suite = require('mocha/lib/suite.js');
const Test = require('mocha/lib/test.js');
@ -39,8 +35,6 @@ const {constants: {
EVENT_TEST_PENDING
}} = require('mocha/lib/runner.js');
// eslint-disable-next-line max-len -- Won't let us make next line multiline
// eslint-disable-next-line import/no-dynamic-require -- Not fixed now, but may allow changing
const {results, stats} = require(path);
const runner = new Runner(