From 16f0992764a7e7d134fb2a62c0afef43f639aa0a Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Wed, 31 Jul 2019 09:45:27 -0700 Subject: [PATCH] Enable operator-linebreak rule --- .eslintrc.json | 3 ++- core/field_dropdown.js | 4 ++-- core/trashcan.js | 4 ++-- tests/mocha/connection_test.js | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 622b72d03..34abcc2c9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -67,7 +67,8 @@ "no-redeclare": ["off"], "valid-jsdoc": ["error", {"requireReturn": false}], "no-console": ["off"], - "no-multi-spaces": ["error", { "ignoreEOLComments": true }] + "no-multi-spaces": ["error", { "ignoreEOLComments": true }], + "operator-linebreak": ["error", "after"] }, "env": { "browser": true diff --git a/core/field_dropdown.js b/core/field_dropdown.js index d6599e637..10155267b 100644 --- a/core/field_dropdown.js +++ b/core/field_dropdown.js @@ -246,8 +246,8 @@ Blockly.FieldDropdown.prototype.positionMenu_ = function(menu) { var menuSize = Blockly.utils.uiMenu.getSize(menu); - var menuMaxHeightPx = Blockly.FieldDropdown.MAX_MENU_HEIGHT_VH - * document.documentElement.clientHeight; + var menuMaxHeightPx = Blockly.FieldDropdown.MAX_MENU_HEIGHT_VH * + document.documentElement.clientHeight; if (menuSize.height > menuMaxHeightPx) { menuSize.height = menuMaxHeightPx; } diff --git a/core/trashcan.js b/core/trashcan.js index 8ab4c0e7b..4747c644e 100644 --- a/core/trashcan.js +++ b/core/trashcan.js @@ -405,8 +405,8 @@ Blockly.Trashcan.prototype.animateLid_ = function() { * @private */ Blockly.Trashcan.prototype.setLidAngle_ = function(lidAngle) { - var openAtRight = this.workspace_.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT - || (this.workspace_.horizontalLayout && this.workspace_.RTL); + var openAtRight = this.workspace_.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT || + (this.workspace_.horizontalLayout && this.workspace_.RTL); this.svgLid_.setAttribute('transform', 'rotate(' + (openAtRight ? -lidAngle : lidAngle) + ',' + (openAtRight ? 4 : this.WIDTH_ - 4) + ',' + diff --git a/tests/mocha/connection_test.js b/tests/mocha/connection_test.js index ef3714228..b4d171927 100644 --- a/tests/mocha/connection_test.js +++ b/tests/mocha/connection_test.js @@ -7,8 +7,8 @@ suite('Connections', function() { var connections = block.getConnections_(true); for (var i = 0; i < connections.length; i++) { var connection = connections[i]; - if (connection.type == Blockly.PREVIOUS_STATEMENT - || connection.type == Blockly.OUTPUT_VALUE) { + if (connection.type == Blockly.PREVIOUS_STATEMENT || + connection.type == Blockly.OUTPUT_VALUE) { // Only superior connections on inputs get hidden continue; }