From 284f9087b23fd0201ddcfc255b018106402fcc26 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Sun, 24 Jan 2016 19:26:24 -0400 Subject: [PATCH 1/2] Throw warnings for unused and undefined variables --- .jshintrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.jshintrc b/.jshintrc index d730076b..b8436293 100644 --- a/.jshintrc +++ b/.jshintrc @@ -44,6 +44,8 @@ "strict" : true, // Require `use strict` pragma in every file. "trailing" : true, // Prohibit trailing whitespaces. "maxlen" : 130, // Limit line length. + "unused" : true, // Prohibit unused variables. + "undef" : true, // Prohibit undefined variables. // == Relaxing Options ================================================ // From 9de813f8cf148dcf561afc5b0f83321b5753910f Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Sun, 24 Jan 2016 19:26:32 -0400 Subject: [PATCH 2/2] Remove unused variables caught by jshint --- lib/elevate.js | 1 - tests/src/writer.spec.js | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/elevate.js b/lib/elevate.js index 0f61dba6..72d1276f 100644 --- a/lib/elevate.js +++ b/lib/elevate.js @@ -16,7 +16,6 @@ 'use strict'; -const _ = require('lodash'); const electron = require('electron'); const isElevated = require('is-elevated'); const sudoPrompt = require('sudo-prompt'); diff --git a/tests/src/writer.spec.js b/tests/src/writer.spec.js index 7432c4ca..0feea72f 100644 --- a/tests/src/writer.spec.js +++ b/tests/src/writer.spec.js @@ -3,7 +3,6 @@ const m = require('mochainon'); const ReadableStream = require('stream').Readable; const path = require('path'); -const umount = require('umount'); const writer = require('../../lib/src/writer'); describe('Writer:', function() {