Skip to content

Commit

Permalink
Refactor: Only use jshint validthis in functions that need it
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Apr 14, 2018
1 parent 044a360 commit f7ef58f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
* Fix: Do not clone ZipFile or Entry if not required
* Fix: Typos in error messages
* Do not copy event emitter properties to `ZipFile` instances
* Refactor: Only use jshint `validthis` in functions that need it
4 changes: 3 additions & 1 deletion lib/promisify.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* ------------------*/

'use strict';
// jshint -W040

// Exports
module.exports = (yauzl, Promise) => {
Expand Down Expand Up @@ -175,6 +174,7 @@ function readEntryDone(zipFile, event, value, resolver) {
* Events are passed to read or close handler to resolve/reject that promise.
*/
function emit(event, value) {
// jshint validthis:true
// Get resolver and destroy
const resolver = this._resolver;
this._resolver = undefined;
Expand Down Expand Up @@ -206,6 +206,7 @@ function rejectWithStoredError(zipFile, reject) {
* `options.max` can be set to `0` for no limit
*/
function readEntries(numEntries) {
// jshint validthis:true
const entries = [];
return this.walkEntries(entry => {
entries.push(entry);
Expand Down Expand Up @@ -266,6 +267,7 @@ function promisifyOpenReadStream(ZipFile, Promise) {
* Entry `openReadStream` method
*/
function entryOpenReadStream(options) {
// jshint validthis:true
return this.zipFile.openReadStream(this, options);
}

Expand Down

0 comments on commit f7ef58f

Please sign in to comment.