Skip to content

Commit 67edb36

Browse files
committed
Fix to pass lint
1 parent 6b23561 commit 67edb36

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
2,
9292
"all"
9393
],
94-
"no-use-before-define": 2,
94+
"no-use-before-define": 0,
9595
"handle-callback-err": 2,
9696
"no-mixed-requires": 0,
9797
"no-new-require": 2,

index.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,8 @@ module.exports = function (browserify, options) {
203203

204204
function addHooks () {
205205
browserify.pipeline.get('pack').push(through(function write (row, enc, next) {
206-
next(null, row)
206+
next(null, row);
207207
}, function end (cb) {
208-
209208
// on each bundle, create a new stream b/c the old one might have ended
210209
var compiledCssStream = new ReadableStream();
211210
compiledCssStream._read = function () {};
@@ -221,7 +220,7 @@ module.exports = function (browserify, options) {
221220
compiledCssStream.push(css);
222221
compiledCssStream.push(null);
223222

224-
const writes = [];
223+
var writes = [];
225224

226225
// write the css file
227226
if (cssOutFilename) {
@@ -234,7 +233,7 @@ module.exports = function (browserify, options) {
234233
}
235234
Promise.all(writes)
236235
.then(function () { cb(); })
237-
.catch(function (err) { self.emit('error', err); cb() })
236+
.catch(function (err) { self.emit('error', err); cb(); });
238237
}));
239238
}
240239

@@ -244,13 +243,11 @@ module.exports = function (browserify, options) {
244243
return browserify;
245244
};
246245

247-
function writeFile(filename, content) {
246+
function writeFile (filename, content) {
248247
return new Promise(function (resolve, reject) {
249248
fs.writeFile(filename, content, function (err) {
250-
if (err)
251-
reject(err);
252-
else
253-
resolve();
249+
if (err) reject(err);
250+
else resolve();
254251
});
255252
});
256253
}

0 commit comments

Comments
 (0)