@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix various lint issues in rJX

Summary: Ref T6953.

Test Plan: `arc lint`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6953

Differential Revision: https://secure.phabricator.com/D11376

+39 -44
+3 -3
webroot/rsrc/externals/javelin/core/__tests__/stratcom.js
··· 3 3 * javelin-dom 4 4 */ 5 5 describe('Stratcom Tests', function() { 6 - node1 = document.createElement('div'); 6 + var node1 = document.createElement('div'); 7 7 JX.Stratcom.addSigil(node1, 'what'); 8 - node2 = document; 9 - node3 = document.createElement('div'); 8 + var node2 = document; 9 + var node3 = document.createElement('div'); 10 10 node3.className = 'what'; 11 11 12 12 it('should disallow document', function() {
+1 -1
webroot/rsrc/externals/javelin/core/__tests__/util.js
··· 29 29 30 30 it('should identify an array from another context as an array', function() { 31 31 var iframe = document.createElement('iframe'); 32 - var name = iframe.name = 'javelin-iframe-test'; 32 + iframe.name = 'javelin-iframe-test'; 33 33 iframe.style.display = 'none'; 34 34 35 35 document.body.insertBefore(iframe, document.body.firstChild);
+1 -1
webroot/rsrc/externals/javelin/core/install.js
··· 236 236 }; 237 237 }; 238 238 var getter = function(prop) { 239 - return function(v) { 239 + return function() { 240 240 return this[prop]; 241 241 }; 242 242 };
+1 -1
webroot/rsrc/externals/javelin/core/util.js
··· 283 283 if (window.opera && window.opera.postError) { 284 284 window.console = {log: function(m) { window.opera.postError(m); }}; 285 285 } else { 286 - window.console = {log: function(m) { }}; 286 + window.console = {log: function() {}}; 287 287 } 288 288 } 289 289
+1 -1
webroot/rsrc/externals/javelin/ext/reactor/core/Reactor.js
··· 38 38 * For internal use by the Reactor system. 39 39 */ 40 40 _postOrder : function(node, result, pending) { 41 - if (typeof result === "undefined") { 41 + if (typeof result === 'undefined') { 42 42 result = []; 43 43 pending = {}; 44 44 }
+1 -1
webroot/rsrc/externals/javelin/ext/reactor/core/ReactorNode.js
··· 57 57 /** 58 58 * For internal use by the Reactor system 59 59 */ 60 - getNextPulse : function(pulse) { 60 + getNextPulse : function() { 61 61 return this._nextPulse; 62 62 }, 63 63 getTransformer : function() {
+3 -3
webroot/rsrc/externals/javelin/ext/reactor/dom/RDOM.js
··· 121 121 122 122 if (__DEV__) { 123 123 if (!found) { 124 - throw new Error("Mismatched radio button value"); 124 + throw new Error('Mismatched radio button value'); 125 125 } 126 126 } 127 127 }); ··· 163 163 return rnode.transform(function(val) { 164 164 if (__DEV__) { 165 165 if (!(val === true || val === false)) { 166 - throw new Error("Send boolean values to checkboxes."); 166 + throw new Error('Send boolean values to checkboxes.'); 167 167 } 168 168 } 169 169 ··· 255 255 256 256 if (__DEV__) { 257 257 if (select.value !== val) { 258 - throw new Error("Mismatched select value"); 258 + throw new Error('Mismatched select value'); 259 259 } 260 260 } 261 261 });
+8 -8
webroot/rsrc/externals/javelin/ext/view/HTMLView.js
··· 26 26 return new JX.ViewVisitor(JX.HTMLView.validate); 27 27 }, 28 28 29 - validate: function(view, children) { 29 + validate: function(view) { 30 30 var spec = this._getHTMLSpec(); 31 31 if (!(view.getName() in spec)) { 32 - throw new Error("invalid tag"); 32 + throw new Error('invalid tag'); 33 33 } 34 34 35 35 var tag_spec = spec[view.getName()]; ··· 37 37 var attrs = view.getAllAttributes(); 38 38 for (var attr in attrs) { 39 39 if (!(attr in tag_spec)) { 40 - throw new Error("invalid attr"); 40 + throw new Error('invalid attr'); 41 41 } 42 42 43 43 var validator = tag_spec[attr]; 44 - if (typeof validator === "function") { 44 + if (typeof validator === 'function') { 45 45 return validator(attrs[attr]); 46 46 } 47 47 } ··· 51 51 52 52 _validateRel: function(target) { 53 53 return target in { 54 - "_blank": 1, 55 - "_self": 1, 56 - "_parent": 1, 57 - "_top": 1 54 + '_blank': 1, 55 + '_self': 1, 56 + '_parent': 1, 57 + '_top': 1 58 58 }; 59 59 }, 60 60 _getHTMLSpec: function() {
+1 -1
webroot/rsrc/externals/javelin/ext/view/ViewInterpreter.js
··· 56 56 if (properties instanceof JX.View || 57 57 properties instanceof JX.HTML || 58 58 properties.nodeType || 59 - typeof properties === "string") { 59 + typeof properties === 'string') { 60 60 children.unshift(properties); 61 61 properties = {}; 62 62 }
+2 -2
webroot/rsrc/externals/javelin/ext/view/ViewPlaceholder.js
··· 53 53 54 54 55 55 56 - JX.behavior('view-placeholder', function(config, statics) { 56 + JX.behavior('view-placeholder', function(config) { 57 57 JX.ViewPlaceholder.register(config.trigger_id, config.id, function() { 58 58 var replace = JX.$(config.id); 59 59 60 60 var children = config.children; 61 - if (typeof children === "string") { 61 + if (typeof children === 'string') { 62 62 children = JX.$H(children); 63 63 } 64 64
+2 -2
webroot/rsrc/externals/javelin/ext/view/__tests__/ViewRenderer.js
··· 11 11 var child = new JX.View({}); 12 12 var parent = new JX.View({}); 13 13 parent.addChild(child); 14 - child.render = function(_) { 14 + child.render = function() { 15 15 child_rendered = true; 16 16 }; 17 17 18 - parent.render = function(rendered_children) { 18 + parent.render = function() { 19 19 child_rendered_first = child_rendered; 20 20 }; 21 21
+1 -2
webroot/rsrc/externals/javelin/lib/Leader.js
··· 219 219 _read: function() { 220 220 var self = JX.Leader; 221 221 222 - leader = window.localStorage.getItem(self._leaderKey) || '0:0'; 222 + var leader = window.localStorage.getItem(self._leaderKey) || '0:0'; 223 223 leader = leader.split(':'); 224 224 225 225 return { ··· 305 305 306 306 } 307 307 }); 308 -
+4 -4
webroot/rsrc/externals/javelin/lib/Request.js
··· 39 39 try { 40 40 return new XMLHttpRequest(); 41 41 } catch (x) { 42 - return new ActiveXObject("Msxml2.XMLHTTP"); 42 + return new ActiveXObject('Msxml2.XMLHTTP'); 43 43 } 44 44 } catch (x) { 45 - return new ActiveXObject("Microsoft.XMLHTTP"); 45 + return new ActiveXObject('Microsoft.XMLHTTP'); 46 46 } 47 47 }, 48 48 ··· 269 269 try { 270 270 if (typeof DOMParser != 'undefined') { 271 271 var parser = new DOMParser(); 272 - doc = parser.parseFromString(text, "text/xml"); 272 + doc = parser.parseFromString(text, 'text/xml'); 273 273 } else { // IE 274 274 // an XDomainRequest 275 - doc = new ActiveXObject("Microsoft.XMLDOM"); 275 + doc = new ActiveXObject('Microsoft.XMLDOM'); 276 276 doc.async = false; 277 277 doc.loadXML(xport.responseText); 278 278 }
+1 -1
webroot/rsrc/externals/javelin/lib/Resource.js
··· 25 25 */ 26 26 load: function(list, callback) { 27 27 var resources = {}, 28 - uri, resource, path, type; 28 + uri, resource, path; 29 29 30 30 list = JX.$AX(list); 31 31
+2 -2
webroot/rsrc/externals/javelin/lib/WebSocket.js
··· 107 107 /** 108 108 * Callback for connection open. 109 109 */ 110 - _onopen: function(e) { 110 + _onopen: function() { 111 111 this._isOpen = true; 112 112 113 113 // Reset the reconnect delay, since we connected successfully. ··· 144 144 /** 145 145 * Callback for connection close. 146 146 */ 147 - _onclose: function(e) { 147 + _onclose: function() { 148 148 this._isOpen = false; 149 149 150 150 var done = false;
+1 -1
webroot/rsrc/externals/javelin/lib/__tests__/JSON.js
··· 7 7 it('should encode and decode an object', function() { 8 8 var object = { 9 9 a: [0, 1, 2], 10 - s: "Javelin Stuffs", 10 + s: 'Javelin Stuffs', 11 11 u: '\x01', 12 12 n: 1, 13 13 f: 3.14,
+1 -1
webroot/rsrc/externals/javelin/lib/__tests__/URI.js
··· 43 43 }); 44 44 45 45 function charRange(from, to) { 46 - res = ''; 46 + var res = ''; 47 47 for (var i = from.charCodeAt(0); i <= to.charCodeAt(0); i++) { 48 48 res += String.fromCharCode(i); 49 49 }
-4
webroot/rsrc/externals/javelin/lib/control/tokenizer/Tokenizer.js
··· 250 250 } 251 251 this._lastvalue = focus.value; 252 252 253 - var root = this._root; 254 253 var metrics = JX.DOM.textMetrics( 255 254 this._focus, 256 255 'jx-tokenizer-metrics'); ··· 353 352 }, 354 353 355 354 _onkeydown : function(e) { 356 - var focus = this._focus; 357 - var root = this._root; 358 - 359 355 var raw = e.getRawEvent(); 360 356 if (raw.ctrlKey || raw.metaKey || raw.altKey) { 361 357 return;
+4 -4
webroot/rsrc/externals/javelin/lib/control/typeahead/Typeahead.js
··· 137 137 if (__DEV__) { 138 138 if (!this._datasource) { 139 139 throw new Error( 140 - "JX.Typeahead.start(): " + 141 - "No datasource configured. Create a datasource and call " + 142 - "setDatasource()."); 140 + 'JX.Typeahead.start(): ' + 141 + 'No datasource configured. Create a datasource and call ' + 142 + 'setDatasource().'); 143 143 } 144 144 } 145 145 this.updatePlaceholder(); ··· 402 402 this._choose(this._display[this._focus]); 403 403 return true; 404 404 } else { 405 - result = this.invoke('query', this._control.value); 405 + var result = this.invoke('query', this._control.value); 406 406 if (result.getPrevented()) { 407 407 return true; 408 408 }
+1 -1
webroot/rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadSource.js
··· 147 147 this._startListener.remove(); 148 148 }, 149 149 150 - didChange : function(value) { 150 + didChange : function() { 151 151 return; 152 152 }, 153 153