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

Don't force uppercase on ruleSeverity (#2507) #2622

Merged
merged 3 commits into from
Oct 5, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 3 additions & 2 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 Down Expand Up @@ -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