From 4bf5f85d9a2e5fb96ebca417f7049e84df09d43b Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Thu, 27 Jun 2019 15:48:30 -0400 Subject: [PATCH] Lint (remove logs, add spaces) --- src/extensions/scratch3_boost/index.js | 4 ---- src/extensions/scratch3_ev3/index.js | 8 ++------ src/extensions/scratch3_gdx_for/index.js | 6 +----- src/extensions/scratch3_microbit/index.js | 8 ++------ src/extensions/scratch3_wedo2/index.js | 8 ++------ src/io/ble.js | 8 ++------ src/io/bt.js | 10 +++------- 7 files changed, 12 insertions(+), 40 deletions(-) diff --git a/src/extensions/scratch3_boost/index.js b/src/extensions/scratch3_boost/index.js index 5af1fc03e..8934d5a77 100644 --- a/src/extensions/scratch3_boost/index.js +++ b/src/extensions/scratch3_boost/index.js @@ -826,8 +826,6 @@ class Boost { * Disconnects from the current BLE socket and resets state. */ disconnect () { - console.log('BOOST DISCONNECT CALLED'); - if (this._ble) { this._ble.disconnect(); } @@ -839,8 +837,6 @@ class Boost { * Reset all the state and timeout/interval ids. */ reset () { - console.log('BOOST RESET CALLED'); - this._ports = []; this._motors = []; this._sensors = { diff --git a/src/extensions/scratch3_ev3/index.js b/src/extensions/scratch3_ev3/index.js index 481066ac8..8a0e629b5 100644 --- a/src/extensions/scratch3_ev3/index.js +++ b/src/extensions/scratch3_ev3/index.js @@ -599,9 +599,7 @@ class EV3 { /** * Called by the runtime when user wants to disconnect from the EV3 peripheral. */ - disconnect() { - console.log('EV3 DISCONNECT CALLED'); - + disconnect () { if (this._bt) { this._bt.disconnect(); } @@ -612,9 +610,7 @@ class EV3 { /** * Reset all the state and timeout/interval ids. */ - reset() { - console.log('EV3 RESET CALLED'); - + reset () { this._sensorPorts = []; this._motorPorts = []; this._sensors = { diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index adfd188f0..e88b142e6 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -209,9 +209,7 @@ class GdxFor { * Called by the runtime when a user exits the connection popup. * Disconnect from the GDX FOR. */ - disconnect() { - console.log('GDXFOR DISCONNECT CALLED'); - + disconnect () { if (this._ble) { this._ble.disconnect(); } @@ -223,8 +221,6 @@ class GdxFor { * Reset all the state and timeout/interval ids. */ reset () { - console.log('GDXFOR RESET CALLED'); - this._sensors = { force: 0, accelerationX: 0, diff --git a/src/extensions/scratch3_microbit/index.js b/src/extensions/scratch3_microbit/index.js index a136d25d6..6a7b9b6c8 100644 --- a/src/extensions/scratch3_microbit/index.js +++ b/src/extensions/scratch3_microbit/index.js @@ -238,9 +238,7 @@ class MicroBit { /** * Disconnect from the micro:bit. */ - disconnect() { - console.log('MICROBIT DISCONNECT CALLED'); - + disconnect () { if (this._ble) { this._ble.disconnect(); } @@ -251,9 +249,7 @@ class MicroBit { /** * Reset all the state and timeout/interval ids. */ - reset() { - console.log('MICROBIT RESET CALLED'); - + reset () { if (this._timeoutID) { window.clearTimeout(this._timeoutID); this._timeoutID = null; diff --git a/src/extensions/scratch3_wedo2/index.js b/src/extensions/scratch3_wedo2/index.js index 0fc34cb3a..e34d51a45 100644 --- a/src/extensions/scratch3_wedo2/index.js +++ b/src/extensions/scratch3_wedo2/index.js @@ -609,9 +609,7 @@ class WeDo2 { /** * Disconnects from the current BLE socket. */ - disconnect() { - console.log('WEDO2 DISCONNECT CALLED'); - + disconnect () { if (this._ble) { this._ble.disconnect(); } @@ -622,9 +620,7 @@ class WeDo2 { /** * Reset all the state and timeout/interval ids. */ - reset() { - console.log('WEDO2 RESET CALLED'); - + reset () { this._ports = ['none', 'none']; this._motors = [null, null]; this._sensors = { diff --git a/src/io/ble.js b/src/io/ble.js index 2a31b1f62..e95490b36 100644 --- a/src/io/ble.js +++ b/src/io/ble.js @@ -72,8 +72,6 @@ class BLE extends JSONRPC { * Close the websocket. */ disconnect () { - console.log('BLE DISCONNECT CALLED'); - if (this._connected) { this._connected = false; } @@ -203,10 +201,8 @@ class BLE extends JSONRPC { * Disconnect the socket, and if the extension using this socket has a * reset callback, call it. Finally, emit an error to the runtime. */ - handleDisconnectError (e) { - console.error(`BLE error: ${JSON.stringify(e)}`); - console.error(e); - console.log('BLE HANDLEDISCONNECTERROR CALLED'); + handleDisconnectError (/* e */) { + // log.error(`BLE error: ${JSON.stringify(e)}`); if (!this._connected) return; diff --git a/src/io/bt.js b/src/io/bt.js index 6dadbd681..bb9b10761 100644 --- a/src/io/bt.js +++ b/src/io/bt.js @@ -78,9 +78,7 @@ class BT extends JSONRPC { /** * Close the websocket. */ - disconnect() { - console.log('BT DISCONNECT CALLED'); - + disconnect () { if (this._connected) { this._connected = false; } @@ -149,10 +147,8 @@ class BT extends JSONRPC { * Disconnect the socket, and if the extension using this socket has a * reset callback, call it. Finally, emit an error to the runtime. */ - handleDisconnectError (e) { - console.error(`BT error: ${JSON.stringify(e)}`); - console.error(e); - console.log('BT HANDLEDISCONNECTERROR CALLED'); + handleDisconnectError (/* e */) { + // log.error(`BT error: ${JSON.stringify(e)}`); if (!this._connected) return;