question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No output from #format if the last item

See original GitHub issue
gulp.task('lint', function () {
    return gulp.src(['**/*.js','!node_modules/**'])
        .pipe(eslint())        
        .pipe(eslint.format()); // outputs the lint results to the console.
});

Perhaps this is user error, but it appears that if .pipe(eslint.format()) is the last piped item, there is no output. Is this a bug or am I missing a gulp fundamental here?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
adametrycommented, Feb 5, 2016

There may be an environmental variable at play here. format waits until the end of its stream (specifically, the “prefinish” event) to process and write (to console by default). Often this issue happens when a gulp task doesn’t return the last stream; which results in gulp not waiting for it to complete. However, in this case I the example code appears to work fine.

Could you run gulp lint && echo process done to show me what your console produces?

0reactions
rosskevincommented, Feb 5, 2016

Confirmed. Thank you so much for taking time to look at this code. #format indeed works as advertised.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cant print out last element of array correctly - Stack Overflow
When I pick up the final item, it prints out the image name of the first 7 and the last item remain "empty_item"....
Read more >
Using Format commands to change output view - PowerShell
PowerShell has a extensible formatting system that allows you to present output in lists, tables, or custom layouts.
Read more >
18. A Few FORMAT Recipes - gigamonkeys
However, it's annoying that in the output the last element of the list is followed by a comma and a space. You can...
Read more >
Formatting Numeric Print Output (The Java™ Tutorials ...
This beginner Java tutorial describes fundamentals of programming in the Java programming language.
Read more >
7. Input and Output — Python 3.11.1 documentation
Often you'll want more control over the formatting of your output than simply printing ... (or will force a SyntaxError if there is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found