diff --git a/src/language/rule/rule.ts b/src/language/rule/rule.ts index a3380812437..039afeb2d7d 100644 --- a/src/language/rule/rule.ts +++ b/src/language/rule/rule.ts @@ -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(), }; } diff --git a/test/formatters/jsonFormatterTests.ts b/test/formatters/jsonFormatterTests.ts index b86505ee6c6..c4970118b30 100644 --- a/test/formatters/jsonFormatterTests.ts +++ b/test/formatters/jsonFormatterTests.ts @@ -73,7 +73,7 @@ describe("JSON Formatter", () => { character: 1, }, ruleName: "first-name", - ruleSeverity: "ERROR", + ruleSeverity: "error", }, { name: TEST_FILE, @@ -89,7 +89,7 @@ describe("JSON Formatter", () => { character: 0, }, ruleName: "last-name", - ruleSeverity: "ERROR", + ruleSeverity: "error", }, { name: TEST_FILE, @@ -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));