We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4cf05e commit 0bc0deeCopy full SHA for 0bc0dee
index.js
@@ -55,11 +55,15 @@ module.exports = function (options) {
55
56
if (file.isBuffer()) {
57
var fix = function (err, config) {
58
- try {
59
- file.contents = new Buffer(fixJS(String(file.contents), config));
60
- this.push(file);
61
- } catch (e) {
62
- this.emit("error", error("Error when running fixmyjs:\n" + e.stack));
+ if (err) {
+ this.emit("error", error("Error when reading .jshint config:\n" + err));
+ } else {
+ try {
+ file.contents = new Buffer(fixJS(String(file.contents), config));
63
+ this.push(file);
64
+ } catch (e) {
65
+ this.emit("error", error("Error when running fixmyjs:\n" + e.stack));
66
+ }
67
}
68
return callback();
69
}.bind(this);
0 commit comments