loleaflet/.eslintignore | 2 -- loleaflet/Makefile.am | 2 +- loleaflet/admin/src/Base.js | 24 ++++++++++++------------ 3 files changed, 13 insertions(+), 15 deletions(-)
New commits: commit fab4cbb5e9de3ee99654d21503c6b2ec064c41de Author: Henry Castro <[email protected]> Date: Sat May 26 23:57:26 2018 -0400 loleaflet: fixed js lint errors in admin/src/Base.js Change-Id: I7d2ae94d75fe68d0973dac940a5837b9c8b93eba diff --git a/loleaflet/.eslintignore b/loleaflet/.eslintignore index 2da73fac2..bb6daf5b5 100644 --- a/loleaflet/.eslintignore +++ b/loleaflet/.eslintignore @@ -1,5 +1,3 @@ # We only directly edit toolbar.js in dist/ **/js/w2ui-1.5.rc1.js - -**/src/admin/Base.js **/src/unocommands.js diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index 67fea24c8..ff47889c5 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -129,7 +129,7 @@ $(builddir)/dist/admin-bundle.js: $(LOLEAFLET_ADMIN_DST) \ $(LOLEAFLET_PREFIX)/dist/admin-src.js: $(LOLEAFLET_ADMIN_ALL) @echo "Checking for admin JS errors..." -# @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/admin --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc + @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/admin/src --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc @awk 'FNR == 1 {print ""} 1' $(patsubst %.js,$(srcdir)/%.js,$(call LOLEAFLET_JS,$(srcdir)/admin/build/build.js)) > $@ if ENABLE_DEBUG diff --git a/loleaflet/admin/src/Base.js b/loleaflet/admin/src/Base.js index 837539930..6136f0016 100644 --- a/loleaflet/admin/src/Base.js +++ b/loleaflet/admin/src/Base.js @@ -15,9 +15,9 @@ Base.extend = function(_instance, _static) { // subclass Base._prototyping = true; var proto = new this; extend.call(proto, _instance); - proto.base = function() { - // call this method from any other method to invoke that method's ancestor - }; + proto.base = function() { + // call this method from any other method to invoke that method's ancestor + }; delete Base._prototyping; // create the wrapper for the constructor function @@ -44,11 +44,11 @@ Base.extend = function(_instance, _static) { // subclass klass.toString = this.toString; klass.valueOf = function(type) { //return (type == "object") ? klass : constructor; //-dean - return (type == "object") ? klass : constructor.valueOf(); + return (type == 'object') ? klass : constructor.valueOf(); }; extend.call(klass, _static); // class initialisation - if (typeof klass.init == "function") klass.init(); + if (typeof klass.init == 'function') klass.init(); return klass; }; @@ -56,7 +56,7 @@ Base.prototype = { extend: function(source, value) { if (arguments.length > 1) { // extending with a name/value pair var ancestor = this[source]; - if (ancestor && (typeof value == "function") && // overriding a method? + if (ancestor && (typeof value == 'function') && // overriding a method? // the valueOf() comparison is to avoid circular references (!ancestor.valueOf || ancestor.valueOf() != value.valueOf()) && /\bbase\b/.test(value)) { @@ -72,7 +72,7 @@ Base.prototype = { }; // point to the underlying method value.valueOf = function(type) { - return (type == "object") ? value : method; + return (type == 'object') ? value : method; }; value.toString = Base.toString; } @@ -80,15 +80,15 @@ Base.prototype = { } else if (source) { // extending with an object literal var extend = Base.prototype.extend; // if this object has a customised extend method then use it - if (!Base._prototyping && typeof this != "function") { + if (!Base._prototyping && typeof this != 'function') { extend = this.extend || extend; } var proto = {toSource: null}; // do the "toString" and other methods manually - var hidden = ["constructor", "toString", "valueOf"]; + var hidden = ['constructor', 'toString', 'valueOf']; // if we are prototyping then include the constructor var i = Base._prototyping ? 0 : 1; - while (key = hidden[i++]) { + while ((key = hidden[i++])) { if (source[key] != proto[key]) { extend.call(this, key, source[key]); @@ -110,7 +110,7 @@ Base = Base.extend({ } }, { ancestor: Object, - version: "1.1", + version: '1.1', forEach: function(object, block, context) { for (var key in object) { @@ -122,7 +122,7 @@ Base = Base.extend({ implement: function() { for (var i = 0; i < arguments.length; i++) { - if (typeof arguments[i] == "function") { + if (typeof arguments[i] == 'function') { // if it's a function, call it arguments[i](this.prototype); } else { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
