- npm: Update devDeps

- Linting (ESLint): New ash-nazg rules
This commit is contained in:
Brett Zamir
2019-02-21 19:41:09 +08:00
parent c2a9798bfe
commit d01abf19d2
27 changed files with 3408 additions and 2812 deletions

View File

@@ -527,11 +527,10 @@ var svgEditorExtension_server_moinsave = (function () {
}();
RGBColor.getHelpXML = function () {
var examples = _toConsumableArray(colorDefs.flatMap(function (_ref2) {
var examples = [].concat(_toConsumableArray(colorDefs.flatMap(function (_ref2) {
var example = _ref2.example;
return example;
})).concat(_toConsumableArray(Object.keys(simpleColors)));
})), _toConsumableArray(Object.keys(simpleColors)));
var xml = document.createElement('ul');
xml.setAttribute('id', 'rgbcolor-examples');
xml.append.apply(xml, _toConsumableArray(examples.map(function (example) {
@@ -553,11 +552,11 @@ var svgEditorExtension_server_moinsave = (function () {
function _typeof$1(obj) {
if (typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol") {
_typeof$1 = function _typeof$$1(obj) {
_typeof$1 = function _typeof$1(obj) {
return _typeof(obj);
};
} else {
_typeof$1 = function _typeof$$1(obj) {
_typeof$1 = function _typeof$1(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
};
}
@@ -3225,7 +3224,7 @@ var svgEditorExtension_server_moinsave = (function () {
_classCallCheck(this, _class22);
_this12 = _possibleConstructorReturn(this, _getPrototypeOf(_class22).call(this, node));
svg.Animations.push(_assertThisInitialized(_assertThisInitialized(_this12)));
svg.Animations.push(_assertThisInitialized(_this12));
_this12.duration = 0.0;
_this12.begin = _this12.attribute('begin').toMilliseconds();
_this12.maxDuration = _this12.begin + _this12.attribute('dur').toMilliseconds();
@@ -3443,7 +3442,7 @@ var svgEditorExtension_server_moinsave = (function () {
_this13.fontFace = child;
if (child.style('font-family').hasValue()) {
svg.Definitions[child.style('font-family').value] = _assertThisInitialized(_assertThisInitialized(_this13));
svg.Definitions[child.style('font-family').value] = _assertThisInitialized(_this13);
}
} else if (child.type === 'missing-glyph') {
_this13.missingGlyph = child;
@@ -3886,7 +3885,7 @@ var svgEditorExtension_server_moinsave = (function () {
}
_this20._isSvg = href.match(/\.svg$/);
svg.Images.push(_assertThisInitialized(_assertThisInitialized(_this20)));
svg.Images.push(_assertThisInitialized(_this20));
_this20.loaded = false;
if (!_this20._isSvg) {
@@ -4020,12 +4019,13 @@ var svgEditorExtension_server_moinsave = (function () {
_toConsumableArray(node.childNodes).forEach(function (_ref11) {
var nodeValue = _ref11.nodeValue;
css += nodeValue;
});
}); // remove comments
css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ''); // remove comments
css = svg.compressSpaces(css); // replace whitespace
css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ''); // eslint-disable-line unicorn/no-unsafe-regex
// replace whitespace
css = svg.compressSpaces(css);
var cssDefs = css.split('}');
cssDefs.forEach(function (cssDef) {
if (svg.trim(cssDef) !== '') {

View File

@@ -527,11 +527,10 @@ var svgEditorExtension_server_opensave = (function () {
}();
RGBColor.getHelpXML = function () {
var examples = _toConsumableArray(colorDefs.flatMap(function (_ref2) {
var examples = [].concat(_toConsumableArray(colorDefs.flatMap(function (_ref2) {
var example = _ref2.example;
return example;
})).concat(_toConsumableArray(Object.keys(simpleColors)));
})), _toConsumableArray(Object.keys(simpleColors)));
var xml = document.createElement('ul');
xml.setAttribute('id', 'rgbcolor-examples');
xml.append.apply(xml, _toConsumableArray(examples.map(function (example) {
@@ -553,11 +552,11 @@ var svgEditorExtension_server_opensave = (function () {
function _typeof$1(obj) {
if (typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol") {
_typeof$1 = function _typeof$$1(obj) {
_typeof$1 = function _typeof$1(obj) {
return _typeof(obj);
};
} else {
_typeof$1 = function _typeof$$1(obj) {
_typeof$1 = function _typeof$1(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
};
}
@@ -3225,7 +3224,7 @@ var svgEditorExtension_server_opensave = (function () {
_classCallCheck(this, _class22);
_this12 = _possibleConstructorReturn(this, _getPrototypeOf(_class22).call(this, node));
svg.Animations.push(_assertThisInitialized(_assertThisInitialized(_this12)));
svg.Animations.push(_assertThisInitialized(_this12));
_this12.duration = 0.0;
_this12.begin = _this12.attribute('begin').toMilliseconds();
_this12.maxDuration = _this12.begin + _this12.attribute('dur').toMilliseconds();
@@ -3443,7 +3442,7 @@ var svgEditorExtension_server_opensave = (function () {
_this13.fontFace = child;
if (child.style('font-family').hasValue()) {
svg.Definitions[child.style('font-family').value] = _assertThisInitialized(_assertThisInitialized(_this13));
svg.Definitions[child.style('font-family').value] = _assertThisInitialized(_this13);
}
} else if (child.type === 'missing-glyph') {
_this13.missingGlyph = child;
@@ -3886,7 +3885,7 @@ var svgEditorExtension_server_opensave = (function () {
}
_this20._isSvg = href.match(/\.svg$/);
svg.Images.push(_assertThisInitialized(_assertThisInitialized(_this20)));
svg.Images.push(_assertThisInitialized(_this20));
_this20.loaded = false;
if (!_this20._isSvg) {
@@ -4020,12 +4019,13 @@ var svgEditorExtension_server_opensave = (function () {
_toConsumableArray(node.childNodes).forEach(function (_ref11) {
var nodeValue = _ref11.nodeValue;
css += nodeValue;
});
}); // remove comments
css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ''); // remove comments
css = svg.compressSpaces(css); // replace whitespace
css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ''); // eslint-disable-line unicorn/no-unsafe-regex
// replace whitespace
css = svg.compressSpaces(css);
var cssDefs = css.split('}');
cssDefs.forEach(function (cssDef) {
if (svg.trim(cssDef) !== '') {

View File

@@ -250,11 +250,11 @@
function _typeof$1(obj) {
if (typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol") {
_typeof$1 = function _typeof$$1(obj) {
_typeof$1 = function _typeof$1(obj) {
return _typeof(obj);
};
} else {
_typeof$1 = function _typeof$$1(obj) {
_typeof$1 = function _typeof$1(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
};
}
@@ -268,7 +268,7 @@
}
}
function _defineProperties$1(target, props) {
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
@@ -278,9 +278,9 @@
}
}
function _createClass$1(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
if (staticProps) _defineProperties$1(Constructor, staticProps);
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
@@ -300,14 +300,14 @@
}
function _getPrototypeOf$1(o) {
_getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf$$1(o) {
_getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf$1(o);
}
function _setPrototypeOf$1(o, p) {
_setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf$$1(o, p) {
_setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
@@ -332,7 +332,7 @@
if (isNativeReflectConstruct$1()) {
_construct$1 = Reflect.construct;
} else {
_construct$1 = function _construct$$1(Parent, args, Class) {
_construct$1 = function _construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
@@ -352,7 +352,7 @@
function _wrapNativeSuper$1(Class) {
var _cache = typeof Map === "function" ? new Map() : undefined;
_wrapNativeSuper$1 = function _wrapNativeSuper$$1(Class) {
_wrapNativeSuper$1 = function _wrapNativeSuper(Class) {
if (Class === null || !_isNativeFunction$1(Class)) return Class;
if (typeof Class !== "function") {
@@ -399,7 +399,7 @@
return _assertThisInitialized$1(self);
}
function _superPropBase$1(object, property) {
function _superPropBase(object, property) {
while (!Object.prototype.hasOwnProperty.call(object, property)) {
object = _getPrototypeOf$1(object);
if (object === null) break;
@@ -408,12 +408,12 @@
return object;
}
function _get$1(target, property, receiver) {
function _get(target, property, receiver) {
if (typeof Reflect !== "undefined" && Reflect.get) {
_get$1 = Reflect.get;
_get = Reflect.get;
} else {
_get$1 = function _get$$1(target, property, receiver) {
var base = _superPropBase$1(target, property);
_get = function _get(target, property, receiver) {
var base = _superPropBase(target, property);
if (!base) return;
var desc = Object.getOwnPropertyDescriptor(base, property);
@@ -426,7 +426,7 @@
};
}
return _get$1(target, property, receiver || target);
return _get(target, property, receiver || target);
}
function _slicedToArray$1(arr, i) {
@@ -2112,17 +2112,17 @@
return _possibleConstructorReturn$1(this, _getPrototypeOf$1(JamilihMap).apply(this, arguments));
}
_createClass$1(JamilihMap, [{
_createClass(JamilihMap, [{
key: "get",
value: function get$$1(elem) {
elem = typeof elem === 'string' ? $(elem) : elem;
return _get$1(_getPrototypeOf$1(JamilihMap.prototype), "get", this).call(this, elem);
return _get(_getPrototypeOf$1(JamilihMap.prototype), "get", this).call(this, elem);
}
}, {
key: "set",
value: function set(elem, value) {
elem = typeof elem === 'string' ? $(elem) : elem;
return _get$1(_getPrototypeOf$1(JamilihMap.prototype), "set", this).call(this, elem, value);
return _get(_getPrototypeOf$1(JamilihMap.prototype), "set", this).call(this, elem, value);
}
}, {
key: "invoke",
@@ -2153,17 +2153,17 @@
return _possibleConstructorReturn$1(this, _getPrototypeOf$1(JamilihWeakMap).apply(this, arguments));
}
_createClass$1(JamilihWeakMap, [{
_createClass(JamilihWeakMap, [{
key: "get",
value: function get$$1(elem) {
elem = typeof elem === 'string' ? $(elem) : elem;
return _get$1(_getPrototypeOf$1(JamilihWeakMap.prototype), "get", this).call(this, elem);
return _get(_getPrototypeOf$1(JamilihWeakMap.prototype), "get", this).call(this, elem);
}
}, {
key: "set",
value: function set(elem, value) {
elem = typeof elem === 'string' ? $(elem) : elem;
return _get$1(_getPrototypeOf$1(JamilihWeakMap.prototype), "set", this).call(this, elem, value);
return _get(_getPrototypeOf$1(JamilihWeakMap.prototype), "set", this).call(this, elem, value);
}
}, {
key: "invoke",
@@ -2456,11 +2456,11 @@
function _typeof$2(obj) {
if (typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol") {
_typeof$2 = function _typeof$$1(obj) {
_typeof$2 = function _typeof$1(obj) {
return _typeof(obj);
};
} else {
_typeof$2 = function _typeof$$1(obj) {
_typeof$2 = function _typeof$1(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
};
}
@@ -3311,13 +3311,13 @@
}, [// Todo: i18nize first values
['Date', 'date'], ['Downloads', 'downloads'], ['Favorited', 'favorites']].map(function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
text$$1 = _ref2[0],
text = _ref2[0],
_ref2$ = _ref2[1],
value = _ref2$ === void 0 ? text$$1 : _ref2$;
value = _ref2$ === void 0 ? text : _ref2$;
return ['option', {
value: value
}, [text$$1]];
}, [text]];
})]]]]], ['div', {
class: 'control'
}, [['label', ['Results per page: ', ['input', {