From de8d13eaa1d0dec12d476877ef5116ddadb11cb3 Mon Sep 17 00:00:00 2001 From: picklesrus Date: Wed, 1 Nov 2017 16:56:59 -0700 Subject: [PATCH] Fix lint errors so we can eventually run eslint on travis. --- core/field.js | 8 +++++--- core/mutator.js | 8 +++++++- core/toolbox.js | 14 +++++++++----- core/tooltip.js | 3 ++- core/variable_map.js | 2 +- core/warning.js | 4 +++- core/workspace.js | 4 +++- core/workspace_drag_surface_svg.js | 2 +- 8 files changed, 31 insertions(+), 14 deletions(-) diff --git a/core/field.js b/core/field.js index 1a17519c9..c93cbc95b 100644 --- a/core/field.js +++ b/core/field.js @@ -527,7 +527,8 @@ Blockly.Field.prototype.setValue = function(newValue) { * @param {!Event} e Mouse down event. * @private */ -Blockly.Field.prototype.onMouseDown_ = function(e) { +Blockly.Field.prototype.onMouseDown_ = function( + /* eslint-disable no-unused-vars */ e /* eslint-enable no-unused-vars */) { if (!this.sourceBlock_ || !this.sourceBlock_.workspace) { return; } @@ -537,13 +538,14 @@ Blockly.Field.prototype.onMouseDown_ = function(e) { } }; - /** * Change the tooltip text for this field. * @param {string|!Element} newTip Text for tooltip or a parent element to * link to for its tooltip. */ -Blockly.Field.prototype.setTooltip = function(newTip) { +Blockly.Field.prototype.setTooltip = function( + /* eslint-disable no-unused-vars */ newTip + /* eslint-enable no-unused-vars */) { // Non-abstract sub-classes may wish to implement this. See FieldLabel. }; diff --git a/core/mutator.js b/core/mutator.js index 613771bcc..7261fe382 100644 --- a/core/mutator.js +++ b/core/mutator.js @@ -73,7 +73,13 @@ Blockly.Mutator.prototype.drawIcon_ = function(group) { // Gear teeth. Blockly.utils.createSvgElement('path', {'class': 'blocklyIconSymbol', - 'd': 'm4.203,7.296 0,1.368 -0.92,0.677 -0.11,0.41 0.9,1.559 0.41,0.11 1.043,-0.457 1.187,0.683 0.127,1.134 0.3,0.3 1.8,0 0.3,-0.299 0.127,-1.138 1.185,-0.682 1.046,0.458 0.409,-0.11 0.9,-1.559 -0.11,-0.41 -0.92,-0.677 0,-1.366 0.92,-0.677 0.11,-0.41 -0.9,-1.559 -0.409,-0.109 -1.046,0.458 -1.185,-0.682 -0.127,-1.138 -0.3,-0.299 -1.8,0 -0.3,0.3 -0.126,1.135 -1.187,0.682 -1.043,-0.457 -0.41,0.11 -0.899,1.559 0.108,0.409z'}, + 'd': 'm4.203,7.296 0,1.368 -0.92,0.677 -0.11,0.41 0.9,1.559 0.41,' + + '0.11 1.043,-0.457 1.187,0.683 0.127,1.134 0.3,0.3 1.8,0 0.3,' + + '-0.299 0.127,-1.138 1.185,-0.682 1.046,0.458 0.409,-0.11 0.9,' + + '-1.559 -0.11,-0.41 -0.92,-0.677 0,-1.366 0.92,-0.677 0.11,' + + '-0.41 -0.9,-1.559 -0.409,-0.109 -1.046,0.458 -1.185,-0.682 ' + + '-0.127,-1.138 -0.3,-0.299 -1.8,0 -0.3,0.3 -0.126,1.135 -1.187,' + + '0.682 -1.043,-0.457 -0.41,0.11 -0.899,1.559 0.108,0.409z'}, group); // Axle hole. Blockly.utils.createSvgElement('circle', diff --git a/core/toolbox.js b/core/toolbox.js index 97decfc32..759bbebfc 100644 --- a/core/toolbox.js +++ b/core/toolbox.js @@ -296,8 +296,9 @@ Blockly.Toolbox.prototype.populate_ = function(newTree) { /** * Sync trees of the toolbox. * @param {!Node} treeIn DOM tree of blocks. - * @param {!Blockly.Toolbox.TreeControl} treeOut - * @param {string} pathToMedia + * @param {!Blockly.Toolbox.TreeControl} treeOut The TreeContorol object built + * from treeIn. + * @param {string} pathToMedia The path to the Blockly media directory. * @return {Node} Tree node to open at startup (or null). * @private */ @@ -629,7 +630,8 @@ Blockly.Toolbox.TreeNode.prototype.getExpandIconSafeHtml = function() { * @param {!goog.events.BrowserEvent} e The browser event. * @override */ -Blockly.Toolbox.TreeNode.prototype.onClick_ = function(e) { +Blockly.Toolbox.TreeNode.prototype.onClick_ = function( + /* eslint-disable no-unused-vars */ e /* eslint-disable no-unused-vars */) { // Expand icon. if (this.hasChildren() && this.isUserCollapsible_) { this.toggle(); @@ -648,7 +650,8 @@ Blockly.Toolbox.TreeNode.prototype.onClick_ = function(e) { * @override * @private */ -Blockly.Toolbox.TreeNode.prototype.onMouseDown = function(e) { +Blockly.Toolbox.TreeNode.prototype.onMouseDown = function( + /* eslint-disable no-unused-vars */ e /* eslint-disable no-unused-vars */) { // NOPE. }; @@ -658,7 +661,8 @@ Blockly.Toolbox.TreeNode.prototype.onMouseDown = function(e) { * @override * @private */ -Blockly.Toolbox.TreeNode.prototype.onDoubleClick_ = function(e) { +Blockly.Toolbox.TreeNode.prototype.onDoubleClick_ = function( + /* eslint-disable no-unused-vars */ e /* eslint-disable no-unused-vars */) { // NOP. }; diff --git a/core/tooltip.js b/core/tooltip.js index ac5df5e0c..f256c02cf 100644 --- a/core/tooltip.js +++ b/core/tooltip.js @@ -184,7 +184,8 @@ Blockly.Tooltip.onMouseOver_ = function(e) { * @param {!Event} e Mouse event. * @private */ -Blockly.Tooltip.onMouseOut_ = function(e) { +Blockly.Tooltip.onMouseOut_ = function(/* eslint-disable no-unused-vars */e + /* eslint-enable no-unused-vars */) { if (Blockly.Tooltip.blocked_) { // Someone doesn't want us to show tooltips. return; diff --git a/core/variable_map.js b/core/variable_map.js index d024d9c04..fbf71151b 100644 --- a/core/variable_map.js +++ b/core/variable_map.js @@ -34,7 +34,7 @@ goog.provide('Blockly.VariableMap'); * @param {!Blockly.Workspace} workspace The workspace this map belongs to. * @constructor */ - Blockly.VariableMap = function(workspace) { +Blockly.VariableMap = function(workspace) { /** * A map from variable type to list of variable names. The lists contain all * of the named variables in the workspace, including variables diff --git a/core/warning.js b/core/warning.js index 86413fa65..1c9d3481d 100644 --- a/core/warning.js +++ b/core/warning.js @@ -139,7 +139,9 @@ Blockly.Warning.prototype.setVisible = function(visible) { * @param {!Event} e Mouse up event. * @private */ -Blockly.Warning.prototype.bodyFocus_ = function(e) { + +Blockly.Warning.prototype.bodyFocus_ = function( + /* eslint-disable no-unused-vars */ e /* eslint-enable no-unused-vars */) { this.bubble_.promote_(); }; diff --git a/core/workspace.js b/core/workspace.js index 40fbb3576..fcbd1a0a6 100644 --- a/core/workspace.js +++ b/core/workspace.js @@ -410,7 +410,9 @@ Blockly.Workspace.prototype.deleteVariableInternal_ = function(variable) { * not present. * @deprecated April 2017 */ -Blockly.Workspace.prototype.variableIndexOf = function(name) { + +Blockly.Workspace.prototype.variableIndexOf = function( + /* eslint-disable no-unused-vars */name /* eslint-enable no-unused-vars */) { console.warn( 'Deprecated call to Blockly.Workspace.prototype.variableIndexOf'); return -1; diff --git a/core/workspace_drag_surface_svg.js b/core/workspace_drag_surface_svg.js index 4bf932a45..6309a05a5 100644 --- a/core/workspace_drag_surface_svg.js +++ b/core/workspace_drag_surface_svg.js @@ -93,7 +93,7 @@ Blockly.WorkspaceDragSurfaceSvg.prototype.createDom = function() { 'xmlns:html': Blockly.HTML_NS, 'xmlns:xlink': 'http://www.w3.org/1999/xlink', 'version': '1.1', - 'class': 'blocklyWsDragSurface blocklyOverflowVisible', + 'class': 'blocklyWsDragSurface blocklyOverflowVisible' }, null); this.container_.appendChild(this.SVG_); };