This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 885
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -22,6 +22,7 @@ module Lint { | |||
failureCount: number; | |||
format: string; | |||
output: string; | |||
raw: RuleFailure[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's call this property failures
hmm I'm not sure we need the null formatter. let's remove it and just expose the raw failures array for your use case. |
When using tslint as a library at bitHound, I would like to use the raw object as the output. Expose the raw output as well as add a null formatter that just returns null (since in my case I will not be using the output). I can live without the nullFormatter, but having access to the raw output would be awesome for library users.
Thanks @adidahiya, removed the null formatter and renamed the property |
@@ -84,7 +85,8 @@ module Lint { | |||
return { | |||
failureCount: failures.length, | |||
format: this.options.formatter, | |||
output: output | |||
output: output, | |||
failures: failures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we now alphabetize keys in object literals, and this is enforced by tslint, which is why your build is failing
adidahiya
added a commit
that referenced
this pull request
Aug 5, 2015
Add support for a `null` formatter
thanks @gtanner! |
null
formatter
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using tslint as a library at bitHound, I would like to use the raw object as
the output.
Expose the raw output as well as add a null formatter that just returns
null (since in my case I will not be using the output).
I can live without the nullFormatter, but having access to the raw
output would be awesome for library users like me since I am just going to
json.parse
the output anyways.