Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
fix(RuleFailure): don't force uppercase on ruleSeverity in toJson imp…
Browse files Browse the repository at this point in the history
…lementation (#2622)
  • Loading branch information
olore authored and adidahiya committed Oct 5, 2019
1 parent 68c3a14 commit 524f8b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/language/rule/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ export class RuleFailure {
: this.fix.toJson(),
name: this.fileName,
ruleName: this.ruleName,
ruleSeverity: this.ruleSeverity.toUpperCase(),
ruleSeverity: this.ruleSeverity,
startPosition: this.startPosition.toJson(),
};
}
Expand Down
7 changes: 4 additions & 3 deletions test/formatters/jsonFormatterTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("JSON Formatter", () => {
character: 1,
},
ruleName: "first-name",
ruleSeverity: "ERROR",
ruleSeverity: "error",
},
{
name: TEST_FILE,
Expand All @@ -89,7 +89,7 @@ describe("JSON Formatter", () => {
character: 0,
},
ruleName: "last-name",
ruleSeverity: "ERROR",
ruleSeverity: "error",
},
{
name: TEST_FILE,
Expand All @@ -110,9 +110,10 @@ describe("JSON Formatter", () => {
character: 0,
},
ruleName: "full-name",
ruleSeverity: "ERROR",
ruleSeverity: "error",
},
];

/* tslint:enable:object-literal-sort-keys */

const actualResult = JSON.parse(formatter.format(failures));
Expand Down

0 comments on commit 524f8b2

Please sign in to comment.