Skip to content

Commit 729552b

Browse files
authored
Merge pull request #107 from keik/master
Pass lint
2 parents bc53327 + 67edb36 commit 729552b

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

.eslintrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"no-negated-in-lhs": 2,
2525
"no-obj-calls": 2,
2626
"no-regex-spaces": 2,
27-
"quote-props": [1, "consistent-as-needed"],
2827
"no-sparse-arrays": 2,
2928
"no-unreachable": 2,
3029
"use-isnan": 2,
@@ -92,7 +91,7 @@
9291
2,
9392
"all"
9493
],
95-
"no-use-before-define": 2,
94+
"no-use-before-define": 0,
9695
"handle-callback-err": 2,
9796
"no-mixed-requires": 0,
9897
"no-new-require": 2,
@@ -219,7 +218,6 @@
219218
]
220219
}
221220
],
222-
"array-bracket-spacing": [1, "never"],
223221
"wrap-regex": 0,
224222
"constructor-super": 2,
225223
"no-this-before-super": 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)