Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the built-in ESLint reporter (Stylish) #218

Closed
wants to merge 1 commit into from
Closed

Use the built-in ESLint reporter (Stylish) #218

wants to merge 1 commit into from

Conversation

kasperisager
Copy link

This PR refactors Standard to report errors using the built-in reporter in ESLint.

Before:

screen shot 2015-08-03 at 19 46 37

After:

screen shot 2015-08-03 at 19 49 23

This commit refactors Standard to report errors using the built-in
reporter in ESLint.
@jprichardson
Copy link
Member

Not sure what @feross thinks about this PR, but presumably that's why he built snazzy.

@Flet
Copy link
Member

Flet commented Aug 3, 2015

Unfortunately, I don't think this will get merged...

"... the output format of standard is locked – it will never change"
#142 (comment)

And:

"I would prefer to solve this outside of standard core, since it's not an essential feature.
I published a new package snazzy that does just what you need: it transforms "compact" output to "stylish"."
#202

I definitely recommend checking out snazzy!

@kasperisager
Copy link
Author

Snazzy it is then!

@feross
Copy link
Member

feross commented Aug 3, 2015

I'm afraid this change will break the editor tools that rely on the current output format on stdout.

We could try to detect if standard is running in a TTY (with process.stdin.isTTY) and use the stylish formatting in that case, falling back to the current formatting in scripts and when using unix pipes, but this method is not foolproof.

@LinusU
Copy link
Member

LinusU commented Aug 3, 2015

I would love to see some nicer output from standard, but I don't think that the extra effort (although small) of using snazzy outweighs that need.

I'm +1 on this getting merged thought, maybe with isTTY. But somehow I think that we have kind of the worst of two worlds currently. It's not very human readable and it's not very machine readable. I don't know, just my two cents...

@jprichardson
Copy link
Member

It's best to just keep it the same. You can never predict how consumers of your software will use it. isTTY feels like a "non-pure" hack. Mocha uses this and it forced me to do some nasty things in electron-mocha... but that's because they probably didn't anticipate a Node environment that's DOM-enabled.

@feross
Copy link
Member

feross commented Aug 5, 2015

Thanks for the PR, but we don't need this feature in core.

There are many of modules that style the output - it's not that hard to parse. The built-in reporter works just fine, but there's also snazzy, standard-json, and standard-tap for specific styles. Also standard-reporter supports a bunch more.

@feross feross closed this Aug 5, 2015
@kasperisager kasperisager deleted the refactor/eslint-reporter branch August 6, 2015 06:45
@lock lock bot locked as resolved and limited conversation to collaborators May 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants