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

Print severity (warn/warnings) #310

Closed
chrisirhc opened this issue Oct 29, 2015 · 2 comments

Comments

@chrisirhc
Copy link

commented Oct 29, 2015

When transitioning between standard linting styles, I tend to use warnings to indicate good practices for new code using warnings in a temporary .eslintrc file (severity: 1).

It's useful to point out that the code can follow new code styles, without erroring out on old code.
However, in the current version of standard, all messages are treated equally as errors. Would this be valuable for anybody else?

Perhaps instead, it could output, "W" or "E" at the end of a message for errors, just to be backwards compatible with existing reporters?

@dcousens dcousens added the question label Oct 29, 2015

@dcousens

This comment has been minimized.

Copy link
Member

commented Oct 29, 2015

@feross

This comment has been minimized.

Copy link
Member

commented Nov 21, 2015

@chrisirhc Thanks for opening a thoughtful issue. We've considered this topic in the past, in previous issues.

The conclusion last time was that warnings would be a bit confusing; they would print messages to stderr but still return exit code 0, indicating success. This would leave other contributors to later clean up the warnings, or they'd be perpetually ignored.

I think it's best if standard continues to return a simple pass or fail, without distinguishing between important and less important rules, or between old and new practices.

If/when we introduce breaking changes, we'll do it in a semver major release so users are in control of when they get the new rules. That way, they can fix atomically upgrade standard and fix their whole codebase.

@feross feross closed this Nov 21, 2015

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.