mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
More lint for unused variables
This commit is contained in:
@@ -107,7 +107,8 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
|
||||
// Block for blending two colours together.
|
||||
{
|
||||
"type": "colour_blend",
|
||||
"message0": "%{BKY_COLOUR_BLEND_TITLE} %{BKY_COLOUR_BLEND_COLOUR1} %1 %{BKY_COLOUR_BLEND_COLOUR2} %2 %{BKY_COLOUR_BLEND_RATIO} %3",
|
||||
"message0": "%{BKY_COLOUR_BLEND_TITLE} %{BKY_COLOUR_BLEND_COLOUR1} " +
|
||||
"%1 %{BKY_COLOUR_BLEND_COLOUR2} %2 %{BKY_COLOUR_BLEND_RATIO} %3",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
|
||||
@@ -297,7 +297,9 @@ Blockly.Block.prototype.unplug = function(opt_healStack) {
|
||||
* @return {!Array.<!Blockly.Connection>} Array of connections.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Block.prototype.getConnections_ = function(all) {
|
||||
Blockly.Block.prototype.getConnections_ = function(
|
||||
/* eslint-disable no-unused-vars */ all
|
||||
/* eslint-enable no-unused-vars */) {
|
||||
var myConnections = [];
|
||||
if (this.outputConnection) {
|
||||
myConnections.push(this.outputConnection);
|
||||
@@ -609,7 +611,7 @@ Blockly.Block.prototype.getColour = function() {
|
||||
*/
|
||||
Blockly.Block.prototype.getHue = function() {
|
||||
return this.hue_;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Change the colour of a block.
|
||||
@@ -1427,7 +1429,9 @@ Blockly.Block.prototype.setCommentText = function(text) {
|
||||
* @param {string=} opt_id An optional ID for the warning text to be able to
|
||||
* maintain multiple warnings.
|
||||
*/
|
||||
Blockly.Block.prototype.setWarningText = function(text, opt_id) {
|
||||
Blockly.Block.prototype.setWarningText = function(text,
|
||||
/* eslint-disable no-unused-vars */ opt_id
|
||||
/* eslint-enable no-unused-vars */) {
|
||||
// NOP.
|
||||
};
|
||||
|
||||
@@ -1435,7 +1439,9 @@ Blockly.Block.prototype.setWarningText = function(text, opt_id) {
|
||||
* Give this block a mutator dialog.
|
||||
* @param {Blockly.Mutator} mutator A mutator dialog instance or null to remove.
|
||||
*/
|
||||
Blockly.Block.prototype.setMutator = function(mutator) {
|
||||
Blockly.Block.prototype.setMutator = function(
|
||||
/* eslint-disable no-unused-vars */ mutator
|
||||
/* eslint-enable no-unused-vars */) {
|
||||
// NOP.
|
||||
};
|
||||
|
||||
|
||||
@@ -58,7 +58,10 @@ goog.require('goog.userAgent');
|
||||
|
||||
|
||||
// Turn off debugging when compiled.
|
||||
// Unused within the Blockly library, but used in Closure.
|
||||
/* eslint-disable no-unused-vars */
|
||||
var CLOSURE_DEFINES = {'goog.DEBUG': false};
|
||||
/* eslint-enable no-unused-vars */
|
||||
|
||||
/**
|
||||
* The main workspace most recently used.
|
||||
|
||||
@@ -70,19 +70,21 @@ Blockly.Comment.prototype.drawIcon_ = function(group) {
|
||||
// Circle.
|
||||
Blockly.utils.createSvgElement('circle',
|
||||
{'class': 'blocklyIconShape', 'r': '8', 'cx': '8', 'cy': '8'},
|
||||
group);
|
||||
group);
|
||||
// Can't use a real '?' text character since different browsers and operating
|
||||
// systems render it differently.
|
||||
// Body of question mark.
|
||||
Blockly.utils.createSvgElement('path',
|
||||
{'class': 'blocklyIconSymbol',
|
||||
'd': 'm6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.405 0.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25 -1.201,0.998 -1.201,1.528 -1.204,2.19z'},
|
||||
group);
|
||||
'd': 'm6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.405' +
|
||||
'0.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25' +
|
||||
'-1.201,0.998 -1.201,1.528 -1.204,2.19z'},
|
||||
group);
|
||||
// Dot of question mark.
|
||||
Blockly.utils.createSvgElement('rect',
|
||||
{'class': 'blocklyIconSymbol',
|
||||
'x': '6.8', 'y': '10.78', 'height': '2', 'width': '2'},
|
||||
group);
|
||||
'x': '6.8', 'y': '10.78', 'height': '2', 'width': '2'},
|
||||
group);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -117,7 +119,9 @@ Blockly.Comment.prototype.createEditor_ = function() {
|
||||
Blockly.bindEventWithChecks_(textarea, 'wheel', this, function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
Blockly.bindEventWithChecks_(textarea, 'change', this, function(e) {
|
||||
Blockly.bindEventWithChecks_(textarea, 'change', this, function(
|
||||
/* eslint-disable no-unused-vars */ e
|
||||
/* eslint-enable no-unused-vars */) {
|
||||
if (this.text_ != textarea.value) {
|
||||
Blockly.Events.fire(new Blockly.Events.BlockChange(
|
||||
this.block_, 'comment', null, this.text_, textarea.value));
|
||||
@@ -207,7 +211,8 @@ Blockly.Comment.prototype.setVisible = function(visible) {
|
||||
* @param {!Event} e Mouse up event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Comment.prototype.textareaFocus_ = function(e) {
|
||||
Blockly.Comment.prototype.textareaFocus_ = function(
|
||||
/* eslint-disable no-unused-vars */ e /* eslint-enable no-unused-vars */) {
|
||||
// Ideally this would be hooked to the focus event for the comment.
|
||||
// However doing so in Firefox swallows the cursor for unknown reasons.
|
||||
// So this is hooked to mouseup instead. No big deal.
|
||||
|
||||
@@ -428,7 +428,9 @@ Blockly.Events.Abstract.prototype.isNull = function() {
|
||||
* Run an event.
|
||||
* @param {boolean} forward True if run forward, false if run backward (undo).
|
||||
*/
|
||||
Blockly.Events.Abstract.prototype.run = function(forward) {
|
||||
Blockly.Events.Abstract.prototype.run = function(
|
||||
/* eslint-disable no-unused-vars */ forward
|
||||
/* eslint-enable no-unused-vars */) {
|
||||
// Defined by subclasses.
|
||||
};
|
||||
|
||||
|
||||
@@ -258,7 +258,8 @@ Blockly.FieldTextInput.prototype.onHtmlInputKeyDown_ = function(e) {
|
||||
* @param {!Event} e Keyboard event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.FieldTextInput.prototype.onHtmlInputChange_ = function(e) {
|
||||
Blockly.FieldTextInput.prototype.onHtmlInputChange_ = function(
|
||||
/* eslint-disable no-unused-vars */ e /* eslint-enable no-unused-vars */) {
|
||||
var htmlInput = Blockly.FieldTextInput.htmlInput_;
|
||||
// Update source block.
|
||||
var text = htmlInput.value;
|
||||
|
||||
Reference in New Issue
Block a user