Skip to content

Commit

Permalink
Fix --fix-to-stdout with empty file (#59)
Browse files Browse the repository at this point in the history
Previously it printed the help message instead of nothing
  • Loading branch information
aaronjensen authored Dec 6, 2016
1 parent 0b0a219 commit 3c6318d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = function (cwd, args, text) {
cwdDeps.chalk.enabled = currentOptions.color;
var files = currentOptions._;
var stdin = currentOptions.stdin;
if (!files.length && (!stdin || !text)) {
if (!files.length && (!stdin || typeof text != 'string')) {
return options.generateHelp() + '\n';
}
var engine = new cwdDeps.eslint.CLIEngine(
Expand Down

0 comments on commit 3c6318d

Please sign in to comment.