Эх сурвалжийг харах

Merge pull request #766 from HarshCasper/master

Removing unnecessary Semi Colons and Boolean Casts
Alex Sosnovskiy 4 жил өмнө
parent
commit
5abe67a281
3 өөрчлөгдсөн 16 нэмэгдсэн , 2 устгасан
  1. 14 0
      .deepsource.toml
  2. 1 1
      lib/socket.ts
  3. 1 1
      lib/supports.ts

+ 14 - 0
.deepsource.toml

@@ -0,0 +1,14 @@
+version = 1
+
+test_patterns = ["test/**"]
+
+[[analyzers]]
+name = "javascript"
+enabled = true
+
+  [analyzers.meta]
+  environment = [
+    "nodejs",
+    "mocha"
+  ]
+  dialect = "typescript"

+ 1 - 1
lib/socket.ts

@@ -157,7 +157,7 @@ export class Socket extends EventEmitter {
   }
 
   private _cleanup(): void {
-    if (!!this._socket) {
+    if (this._socket) {
       this._socket.onopen = this._socket.onmessage = this._socket.onclose = null;
       this._socket.close();
       this._socket = undefined;

+ 1 - 1
lib/supports.ts

@@ -10,7 +10,7 @@ export const Supports = new class {
 
   isWebRTCSupported(): boolean {
     return typeof RTCPeerConnection !== 'undefined';
-  };
+  }
 
   isBrowserSupported(): boolean {
     const browser = this.getBrowser();