[tor-commits] [snowflake/master] Enforce consistent indentation in js

arlo at torproject.org arlo at torproject.org
Tue Aug 27 22:20:23 UTC 2019


commit 1b14810d341d777fb6cdc3d8b1ad7e55b4989c32
Author: Arlo Breault <arlolra at gmail.com>
Date:   Tue Aug 27 18:19:51 2019 -0400

    Enforce consistent indentation in js
---
 proxy/.eslintrc.json | 8 +++++++-
 proxy/make.js        | 4 ++--
 proxy/proxypair.js   | 2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/proxy/.eslintrc.json b/proxy/.eslintrc.json
index f94ba96..406f9e5 100644
--- a/proxy/.eslintrc.json
+++ b/proxy/.eslintrc.json
@@ -3,5 +3,11 @@
         "browser": true,
         "es6": true
     },
-    "extends": "eslint:recommended"
+    "extends": "eslint:recommended",
+    "rules": {
+        "indent": ["error", 2, {
+          "SwitchCase": 1,
+          "MemberExpression": 0
+        }]
+    }
 }
diff --git a/proxy/make.js b/proxy/make.js
index 928c9ba..f8f9d7f 100755
--- a/proxy/make.js
+++ b/proxy/make.js
@@ -52,8 +52,8 @@ var copyTranslations = function(outDir) {
 var availableLangs = function() {
   let out = "const availableLangs = new Set([\n";
   let dirs = readdirSync('translation').filter((f) => {
-     const s = statSync(`translation/${f}`);
-     return s.isDirectory();
+    const s = statSync(`translation/${f}`);
+    return s.isDirectory();
   });
   dirs.push('en_US');
   dirs.sort();
diff --git a/proxy/proxypair.js b/proxy/proxypair.js
index fd5a39a..e5f33ea 100644
--- a/proxy/proxypair.js
+++ b/proxy/proxypair.js
@@ -86,7 +86,7 @@ class ProxyPair {
     channel.onopen = () => {
       log('WebRTC DataChannel opened!');
       if (!this.active) {
-          return
+        return;
       }
       this.running = true;
       snowflake.state = Snowflake.MODE.WEBRTC_READY;



More information about the tor-commits mailing list