Set indent problems to warnings, and fix all errors.

This commit is contained in:
Rachel Fenichel
2018-01-25 10:39:53 -08:00
parent 9072563a00
commit cb75946a3c
3 changed files with 5 additions and 5 deletions

View File

@@ -3,7 +3,7 @@
"curly": ["error", "multi-line"],
"eol-last": ["error"],
"indent": [
"error", 2, # Blockly/Google use 2-space indents
"warn", 2, # Blockly/Google use 2-space indents
# Blockly/Google uses +4 space indents for line continuations.
{
"SwitchCase": 1,

View File

@@ -1162,11 +1162,11 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) {
var token = tokens[i];
if (typeof token == 'number') {
if (token <= 0 || token > args.length) {
throw new Error('Block \"' + this.type + '\": ' +
throw new Error('Block "' + this.type + '": ' +
'Message index %' + token + ' out of range.');
}
if (indexDup[token]) {
throw new Error('Block \"' + this.type + '\": ' +
throw new Error('Block "' + this.type + '": ' +
'Message index %' + token + ' duplicated.');
}
indexDup[token] = true;
@@ -1180,7 +1180,7 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) {
}
}
if(indexCount != args.length) {
throw new Error('Block \"' + this.type + '\": ' +
throw new Error('Block "' + this.type + '": ' +
'Message does not reference all ' + args.length + ' arg(s).');
}
// Add last dummy input if needed.

View File

@@ -388,7 +388,7 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) {
bottom = this.addTrashcan_(bottom);
}
if (this.options.zoomOptions && this.options.zoomOptions.controls) {
bottom = this.addZoomControls_(bottom);
this.addZoomControls_(bottom);
}
if (!this.isFlyout) {