- Linting: For non-jQuery methods, apply no-fn-reference-in-iterator rule (though still keep rule disabled due to numerous jQuery false positives)
- Linting: With num. of warnings set to 0, probably need to disable `check-examples` for those environments having problems - Linting: Reenable Unicorn rules now that updatedmaster
parent
630a76c1b6
commit
41f9d801bf
33
.eslintrc.js
33
.eslintrc.js
|
@ -17,15 +17,6 @@ module.exports = {
|
|||
customTags: []
|
||||
},
|
||||
augmentsExtendsReplacesDocs: true
|
||||
// Todo: Figure out why this is not working and why seem to have to
|
||||
// disable for all Markdown:
|
||||
/*
|
||||
baseConfig: {
|
||||
rules: {
|
||||
'no-multi-spaces': 'off'
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
},
|
||||
overrides: [
|
||||
|
@ -342,12 +333,15 @@ module.exports = {
|
|||
// 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: '^`'
|
||||
}],
|
||||
/*
|
||||
'jsdoc/check-examples': ['error', {baseConfig: {
|
||||
rules: {
|
||||
'no-multi-spaces': 'off'
|
||||
}
|
||||
}}],
|
||||
*/
|
||||
'jsdoc/check-examples': 'off',
|
||||
|
||||
// https://github.com/sindresorhus/eslint-plugin-unicorn/issues/453
|
||||
'unicorn/regex-shorthand': 0,
|
||||
// The Babel transform seems to have a problem converting these
|
||||
'prefer-named-capture-group': 'off',
|
||||
// Override these `ash-nazg/sauron` rules which are difficult for us
|
||||
|
@ -360,10 +354,16 @@ module.exports = {
|
|||
ignoreRegExpLiterals: true
|
||||
} */
|
||||
'unicorn/prefer-query-selector': 'off',
|
||||
|
||||
// Might re-enable if the following is implemented:
|
||||
// https://github.com/sindresorhus/eslint-plugin-unicorn/issues/787
|
||||
'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',
|
||||
|
||||
'jsdoc/require-file-overview': ['error', {
|
||||
tags: {
|
||||
file: {
|
||||
|
@ -391,9 +391,6 @@ module.exports = {
|
|||
preventDuplicates: true
|
||||
}
|
||||
}
|
||||
}],
|
||||
|
||||
// Disable for now
|
||||
'eslint-comments/require-description': 0
|
||||
}]
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable jsdoc/check-examples */
|
||||
import assertionWrapper from './assertion-wrapper.js';
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
|
||||
const node = document.createDocumentFragment();
|
||||
nodes.forEach(n => {
|
||||
// // eslint-disable-next-line unicorn/prefer-node-append
|
||||
node.appendChild(n);
|
||||
});
|
||||
return node;
|
||||
|
@ -59,7 +60,8 @@
|
|||
},
|
||||
|
||||
append(...nodes) {
|
||||
nodes = convertNodesIntoANode(nodes);
|
||||
nodes = convertNodesIntoANode(nodes); // // eslint-disable-next-line unicorn/prefer-node-append
|
||||
|
||||
this.appendChild(nodes);
|
||||
}
|
||||
|
||||
|
|
|
@ -20032,10 +20032,10 @@ class SvgCanvas {
|
|||
elem.attr.id = changedIDs[elem.attr.id];
|
||||
}
|
||||
|
||||
if (elem.children) elem.children.forEach(checkIDs);
|
||||
if (elem.children) elem.children.forEach(child => checkIDs(child));
|
||||
}
|
||||
|
||||
clipb.forEach(checkIDs); // Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
clipb.forEach(elem => checkIDs(elem)); // Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
|
||||
/**
|
||||
* Triggered when `pasteElements` is called from a paste action (context menu or key).
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.svgEditor = factory());
|
||||
(global = global || self, global.svgEditor = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
// http://ross.posterous.com/2008/08/19/iphone-touch-events-in-javascript/
|
||||
|
@ -20038,10 +20038,10 @@
|
|||
elem.attr.id = changedIDs[elem.attr.id];
|
||||
}
|
||||
|
||||
if (elem.children) elem.children.forEach(checkIDs);
|
||||
if (elem.children) elem.children.forEach(child => checkIDs(child));
|
||||
}
|
||||
|
||||
clipb.forEach(checkIDs); // Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
clipb.forEach(elem => checkIDs(elem)); // Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
|
||||
/**
|
||||
* Triggered when `pasteElements` is called from a paste action (context menu or key).
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -19620,10 +19620,10 @@ var SvgCanvas = (function () {
|
|||
elem.attr.id = changedIDs[elem.attr.id];
|
||||
}
|
||||
|
||||
if (elem.children) elem.children.forEach(checkIDs);
|
||||
if (elem.children) elem.children.forEach(child => checkIDs(child));
|
||||
}
|
||||
|
||||
clipb.forEach(checkIDs); // Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
clipb.forEach(elem => checkIDs(elem)); // Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
|
||||
/**
|
||||
* Triggered when `pasteElements` is called from a paste action (context menu or key).
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -20035,10 +20035,10 @@
|
|||
elem.attr.id = changedIDs[elem.attr.id];
|
||||
}
|
||||
|
||||
if (elem.children) elem.children.forEach(checkIDs);
|
||||
if (elem.children) elem.children.forEach(child => checkIDs(child));
|
||||
}
|
||||
|
||||
clipb.forEach(checkIDs); // Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
clipb.forEach(elem => checkIDs(elem)); // Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
|
||||
/**
|
||||
* Triggered when `pasteElements` is called from a paste action (context menu or key).
|
||||
|
|
|
@ -42,6 +42,7 @@ function convertNodesIntoANode (nodes) {
|
|||
}
|
||||
const node = document.createDocumentFragment();
|
||||
nodes.forEach((n) => {
|
||||
// // eslint-disable-next-line unicorn/prefer-node-append
|
||||
node.appendChild(n);
|
||||
});
|
||||
return node;
|
||||
|
@ -54,6 +55,7 @@ const ParentNode = {
|
|||
},
|
||||
append (...nodes) {
|
||||
nodes = convertNodesIntoANode(nodes);
|
||||
// // eslint-disable-next-line unicorn/prefer-node-append
|
||||
this.appendChild(nodes);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -6443,9 +6443,9 @@ this.pasteElements = function (type, x, y) {
|
|||
changedIDs[elem.attr.id] = getNextId();
|
||||
elem.attr.id = changedIDs[elem.attr.id];
|
||||
}
|
||||
if (elem.children) elem.children.forEach(checkIDs);
|
||||
if (elem.children) elem.children.forEach((child) => checkIDs(child));
|
||||
}
|
||||
clipb.forEach(checkIDs);
|
||||
clipb.forEach((elem) => checkIDs(elem));
|
||||
|
||||
// Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
/**
|
||||
|
|
|
@ -20035,10 +20035,10 @@
|
|||
elem.attr.id = changedIDs[elem.attr.id];
|
||||
}
|
||||
|
||||
if (elem.children) elem.children.forEach(checkIDs);
|
||||
if (elem.children) elem.children.forEach(child => checkIDs(child));
|
||||
}
|
||||
|
||||
clipb.forEach(checkIDs); // Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
clipb.forEach(elem => checkIDs(elem)); // Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
|
||||
/**
|
||||
* Triggered when `pasteElements` is called from a paste action (context menu or key).
|
||||
|
|
Loading…
Reference in New Issue