Skip to content

Commit

Permalink
Dev: Replace JSHint with ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Apr 30, 2023
1 parent fb80472 commit ba69fd2
Show file tree
Hide file tree
Showing 9 changed files with 2,271 additions and 451 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!.*
coverage
15 changes: 15 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* --------------------
* yauzl-promise module
* ESLint config
* ------------------*/

'use strict';

// Exports

module.exports = {
extends: [
'@overlookmotel/eslint-config',
'@overlookmotel/eslint-config-node'
]
};
70 changes: 0 additions & 70 deletions .jshintrc

This file was deleted.

10 changes: 5 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ const yauzlOriginal = require('yauzl'),
cloner = require('yauzl-clone');

// Imports
const NativePromise = require('./promise'),
promisify = require('./promisify');
const NativePromise = require('./promise.js'),
promisify = require('./promisify.js');

// Exports
function use(Promise, yauzl, options) {
// Conform options
options = Object.assign({clone: true}, options);
options = {clone: true, ...options};

// Use defaults if not provided
if (!Promise) Promise = NativePromise;
Expand All @@ -39,10 +39,10 @@ function use(Promise, yauzl, options) {

// Add `use` methods
yauzl.use = use;
yauzl.usePromise = function(Promise) {
yauzl.usePromise = function(Promise) { // eslint-disable-line no-shadow
return use(Promise, null);
};
yauzl.useYauzl = function(yauzl, options) {
yauzl.useYauzl = function(yauzl, options) { // eslint-disable-line no-shadow
return use(null, yauzl, options);
};

Expand Down
2 changes: 1 addition & 1 deletion lib/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
let NativePromise;
try {
NativePromise = Promise;
} catch(e) {}
} catch (e) {} // eslint-disable-line no-empty

module.exports = NativePromise;
Loading

0 comments on commit ba69fd2

Please sign in to comment.